/* «Аудиорейд» — пиксельная тёмная таверна. Свой облик игры; тема Telegram задаёт только светлый вариант. */
:root {
  --bg: #17131c;
  --panel: #241d2b;
  --panel-2: #2f2638;
  --ink: #f1e6d2;
  --muted: #a99bb5;
  --gold: #f2c230;
  --accent: #7cf08a;
  --danger: #ff6b6b;
  --edge: #0c0a10;
  --rank-0: #8b8b8b;
  --rank-1: #3fa34d;
  --rank-2: #3b7dd8;
  --rank-3: #f2c230;
  --tier-0: #c2a37a; --tier-1: #d08a48; --tier-2: #3b7dd8; --tier-3: #a33a3a;
  --tier-4: #b8c4d0; --tier-5: #d8e2ee; --tier-6: #f2c230;
  --pixel: "Press Start 2P", monospace;
  --text: "PT Sans", system-ui, sans-serif;
}
:root[data-theme="light"] {
  --bg: #efe4cc;
  --panel: #fbf3e2;
  --panel-2: #f1e3c6;
  --ink: #2b2130;
  --muted: #6d5f78;
  --edge: #3a2c42;
  --accent: #2c9a3d;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 var(--text); -webkit-tap-highlight-color: transparent; }
body { padding: 12px 16px calc(84px + env(safe-area-inset-bottom)); min-height: 100vh; }
h1, h2, h3, .px { font-family: var(--pixel); font-weight: 400; letter-spacing: .02em; }
h1 { font-size: 15px; line-height: 1.6; margin: 4px 0 12px; }
h2 { font-size: 12px; line-height: 1.6; margin: 18px 0 10px; color: var(--gold); }
p { margin: 6px 0; }
.muted { color: var(--muted); font-size: 14px; }

/* пиксельная рамка: ступенчатая тень вместо скругления */
.box {
  background: var(--panel); padding: 14px; margin: 10px 0; position: relative;
  box-shadow: 0 -4px 0 0 var(--edge), 0 4px 0 0 var(--edge), -4px 0 0 0 var(--edge), 4px 0 0 0 var(--edge),
              inset 0 -4px 0 0 rgba(0,0,0,.25), inset 0 4px 0 0 rgba(255,255,255,.06);
}
.btn {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; width: 100%; border: 0; cursor: pointer; text-align: left;
  font: 11px/1.6 var(--pixel); color: var(--ink); background: var(--panel-2); padding: 14px; margin: 12px 0;
  box-shadow: 0 -4px 0 0 var(--edge), 0 4px 0 0 var(--edge), -4px 0 0 0 var(--edge), 4px 0 0 0 var(--edge), inset 0 -4px 0 0 rgba(0,0,0,.3);
}
.btn:active { transform: translateY(2px); box-shadow: 0 -4px 0 0 var(--edge), 0 2px 0 0 var(--edge), -4px 0 0 0 var(--edge), 4px 0 0 0 var(--edge); }
.btn .sub { display: block; flex-basis: 100%; font: 13px/1.3 var(--text); color: var(--muted); margin-top: 4px; letter-spacing: 0; }
.btn.primary { background: var(--accent); color: #102014; }
.btn.primary .sub { color: #23432a; }
.btn.danger { background: var(--danger); color: #2a0e0e; }
.btn[disabled] { opacity: .45; }
.row { display: flex; gap: 12px; }
.row > .btn { flex: 1; justify-content: center; text-align: center; }

/* герой: кот, ранг, баллы */
.hero { display: flex; gap: 16px; align-items: center; }
.frame { padding: 8px; background: var(--panel-2); box-shadow: 0 0 0 4px var(--rank-c, var(--rank-0)), 0 0 0 8px var(--edge); flex: none; }
.frame.r3, .frame.t6 { animation: glow 2.4s steps(6) infinite; }
.frame[class*=" t"] { box-shadow: 0 0 0 4px var(--tier-c, var(--tier-0)), 0 0 0 8px var(--edge); }
.frame.t6 { animation-name: glow6; }
@keyframes glow6 { 50% { box-shadow: 0 0 0 4px var(--tier-6), 0 0 0 8px var(--edge), 0 0 18px 6px rgba(242,194,48,.45); } }
@keyframes glow { 50% { box-shadow: 0 0 0 4px var(--rank-3), 0 0 0 8px var(--edge), 0 0 18px 6px rgba(242,194,48,.45); } }
.cat { display: block; image-rendering: pixelated; }
.rank { font: 10px/1.6 var(--pixel); color: var(--rank-c); }
.points { font: 18px/1.4 var(--pixel); color: var(--gold); margin: 6px 0; }
.bar { height: 10px; background: var(--edge); margin-top: 8px; }
.bar > i { display: block; height: 100%; background: var(--accent); }

/* карточка реплики */
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 2px; }
.tag { font: 9px/1.6 var(--pixel); padding: 4px 6px; background: var(--panel-2); color: var(--muted); }
.tag.own { background: #5b3a8a; color: #f0e2ff; }
.tag.patched { background: #3a5b8a; color: #e2efff; }
.tag.warn { background: #8a5b1a; color: #fff0d8; }
.play {
  width: 72px; height: 72px; flex: none; border: 0; background: var(--gold); color: #2a1d05; font: 22px var(--pixel); cursor: pointer;
  box-shadow: 0 -4px 0 0 var(--edge), 0 4px 0 0 var(--edge), -4px 0 0 0 var(--edge), 4px 0 0 0 var(--edge), inset 0 -6px 0 0 rgba(0,0,0,.25);
}
.player { display: flex; gap: 16px; align-items: center; }
.player .bar { flex: 1; height: 14px; }
.transcript { font-size: 17px; line-height: 1.7; }
.transcript .s { transition: color .2s; color: var(--muted); }
.transcript .s.now { color: var(--ink); }
.transcript .w { cursor: pointer; padding: 1px 0; }
.transcript .w.sel { background: var(--danger); color: #1a0606; }
.transcript .w.chk { background: var(--gold); color: #1a1405; }
.en { font-size: 14px; color: var(--muted); border-top: 4px dotted var(--panel-2); margin-top: 12px; padding-top: 10px; }
.banner { background: var(--gold); color: #2a1d05; font: 10px/1.7 var(--pixel); padding: 10px 12px; margin: 10px 0; }

/* нижние вкладки */
#tabs { position: fixed; left: 0; right: 0; bottom: 0; display: flex; background: var(--panel); padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 0 0 var(--edge); }
#tabs button { flex: 1; background: none; border: 0; color: var(--muted); font: 9px/1.6 var(--pixel); padding: 6px 0; cursor: pointer; }
#tabs button .ico { display: block; font-size: 20px; margin-bottom: 4px; font-family: system-ui; }
#tabs button.on { color: var(--gold); }

/* лист категорий */
#sheet { position: fixed; inset: 0; background: rgba(8,6,12,.7); display: flex; align-items: flex-end; z-index: 10; }
#sheet[hidden] { display: none; }
#sheet .box { width: 100%; margin: 0; max-height: 80vh; overflow: auto; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
.cats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cats .btn { margin: 4px 0; font-size: 9px; padding: 12px 10px; }
.cats .btn.on { background: var(--danger); color: #1a0606; }
textarea, input[type=text] { width: 100%; font: 16px var(--text); background: var(--bg); color: var(--ink); border: 0; padding: 10px; box-shadow: inset 0 0 0 4px var(--edge); }

/* рейтинг, ачивки */
.lb { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 4px dotted var(--panel-2); }
.lb .n { font: 11px var(--pixel); width: 32px; color: var(--muted); }
.lb .name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.lb .pts { flex: none; font: 11px var(--pixel); color: var(--gold); }
.lb.me { background: var(--panel-2); }
.ach { display: grid; grid-template-columns: 1fr; gap: 8px; }
.ach .a { display: flex; gap: 10px; align-items: center; background: var(--panel-2); padding: 8px; font-size: 13px; opacity: .5; }
.ach .a img { width: 40px; height: 40px; flex: none; image-rendering: pixelated; filter: grayscale(1) brightness(.6); box-shadow: 0 0 0 2px var(--edge); }
.ach .a > div { flex: 1; }
.ach .a.got { opacity: 1; box-shadow: inset 0 0 0 2px var(--gold); }
.ach .a.got img { filter: none; box-shadow: 0 0 0 2px var(--gold); }
.ach .a b { display: block; font: 9px/1.6 var(--pixel); margin-bottom: 2px; }
.ach .when { display: block; color: var(--muted); font-size: 11px; }
.shield, .fx-shield { flex: none; min-width: 30px; height: 34px; display: grid; place-items: center; font: 10px var(--pixel); color: #3a2a00;
  background: linear-gradient(#ffe48a, #c99a1e); clip-path: polygon(0 0, 100% 0, 100% 65%, 50% 100%, 0 65%); }
.ach .a:not(.got) .shield { filter: grayscale(1); }
.ach-pts { font: 10px var(--pixel); color: var(--gold); margin-left: 6px; }
.toggle { display: flex; gap: 8px; align-items: center; margin: 14px 0; color: var(--muted); font-size: 14px; }

/* Плашки достижения и уровня (fx.js): сверху, короткие, по клику закрываются. */
.fx { position: fixed; left: 50%; top: 12px; z-index: 50; transform: translateX(-50%); width: min(92vw, 380px);
  animation: fx-in .35s ease-out both; cursor: pointer; }
.fx.out { animation: fx-out .4s ease-in both; }
.fx.calm, .fx.calm.out { animation-duration: .01s; }
@keyframes fx-in { from { opacity: 0; transform: translate(-50%, -24px); } }
@keyframes fx-out { to { opacity: 0; transform: translate(-50%, -12px); } }
.ach-toast { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: linear-gradient(#2a2118, #15100b);
  box-shadow: 0 0 0 2px #8a6a2a, 0 0 0 4px #1b1420, 0 8px 24px rgba(0,0,0,.5); }
.ach-toast::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 30%, rgba(255,230,150,.25) 50%, transparent 70%) -150% 0 / 200% 100% no-repeat;
  animation: fx-shine 1.4s .3s ease-out both; }
.fx.calm::after { display: none; }
@keyframes fx-shine { to { background-position: 250% 0; } }
.fx-icon img { width: 44px; height: 44px; display: block; image-rendering: pixelated; box-shadow: 0 0 0 2px #c99a1e; }
.fx-body { flex: 1; min-width: 0; }
.fx-body small { display: block; font-size: 11px; color: #c9b27a; letter-spacing: .02em; }
.fx-body b { display: block; font: 10px/1.6 var(--pixel); color: #ffe48a; }
.lvl-toast { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 10px; text-align: center;
  background: rgba(12,10,16,.82); box-shadow: 0 0 0 2px rgba(201,154,30,.6), 0 8px 24px rgba(0,0,0,.5); }
.lvl-toast::before { content: ""; position: absolute; inset: -20px -10px; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(255,215,90,.35), transparent 65%); animation: fx-pulse 1.6s ease-out both; }
.fx.calm::before { animation: none; }
@keyframes fx-pulse { from { opacity: 0; transform: scale(.6); } 40% { opacity: 1; } to { opacity: .6; transform: scale(1); } }
.lvl-text small { display: block; font-size: 12px; color: #f3e6c0; text-shadow: 0 1px 2px #000; }
.lvl-text b { display: block; font: 16px/1.4 var(--pixel); color: #ffd84a; text-shadow: 0 2px 0 #6a4a00, 0 0 12px rgba(255,200,60,.6); }
.lvl-text span { display: block; font: 9px/1.8 var(--pixel); color: #ffe9a8; text-shadow: 0 1px 2px #000; }
.lvl-cat img { display: block; image-rendering: pixelated; filter: drop-shadow(0 0 8px rgba(255,210,80,.7)); }
.furs { display: flex; flex-wrap: wrap; gap: 10px; }
.furs button { background: var(--panel-2); border: 0; padding: 6px; cursor: pointer; }
.furs button.on { box-shadow: inset 0 0 0 4px var(--accent); }

#toast { position: fixed; left: 16px; right: 16px; top: 16px; background: var(--gold); color: #2a1d05; font: 10px/1.7 var(--pixel); padding: 12px; z-index: 20; box-shadow: 0 0 0 4px var(--edge); }
#toast[hidden] { display: none; }
.center { text-align: center; padding: 40px 0; }
.ranks { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 14px 8px; text-align: center; margin-top: 12px; }
.ranks .locked img { filter: grayscale(1) brightness(.45); }
.xpbar { height: 8px; background: var(--panel-2); margin: 6px 0; box-shadow: 0 0 0 2px var(--edge); }
.xpbar { position: relative; }
.xpbar i { display: block; height: 100%; background: var(--accent); }
.xpbar b { position: absolute; top: 0; height: 100%; background: #4a7fd8; opacity: .7; }
.hero .title { font-size: 13px; color: var(--gold); margin-top: 2px; }
.rested { font-size: 12px; color: #8fb6ff; margin-top: 4px; }
.quests .qhead { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.quests .qhead img { width: 24px; height: 24px; image-rendering: pixelated; }
.quests .qhead b { font-size: 9px; color: var(--gold); flex: 1; }
.quests .q { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; font-size: 14px; }
.quests .q.done { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(255,255,255,.25); }
.zones .zone { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; font-size: 13px; margin: 8px 0; }
.zones .zone .xpbar { grid-column: 1 / -1; height: 5px; margin: 0; }
.zones .zone.done span:first-child { color: var(--gold); }
.zones .zone.done span:first-child::before { content: "✓ "; }
select { width: 100%; padding: 10px; font: inherit; background: var(--panel-2); color: var(--ink); border: 0; box-shadow: 0 0 0 2px var(--edge); }
.quest-toast { text-align: center; padding: 6px 10px; background: rgba(12,10,16,.8); box-shadow: 0 0 0 2px rgba(201,154,30,.45); }
.quest-toast b { display: block; font-size: 14px; color: #ffd84a; text-shadow: 0 1px 2px #000; }
.quest-toast span { display: block; font-size: 12px; color: #f3e6c0; }
.lb .cat { flex: none; }
.ranks .frame { display: inline-block; }
.ranks .rank { font-size: 7px; }
/* «Это не ошибка» */
.nb { border-bottom: 4px dotted var(--panel-2); padding: 8px 0; }
.nb summary { cursor: pointer; font-weight: 700; }
.nb p { margin: 6px 0 2px; color: var(--muted); font-size: 15px; }
.nb-sheet { margin-top: 12px; }
.nb-sheet summary { cursor: pointer; }
/* разбор (автор) */
#tabs button[hidden] { display: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.chip { background: var(--panel-2); color: var(--muted); border: 0; font: 9px/1.6 var(--pixel); padding: 8px 10px; cursor: pointer; }
.chip.on { background: var(--gold); color: #2a1d05; }
.agent { background: #23324a; color: #dce8ff; padding: 10px; margin: 8px 0; font-size: 15px; }
:root[data-theme="light"] .agent { background: #dce8ff; color: #1b2a44; }
.shots { display: flex; gap: 8px; overflow-x: auto; margin: 8px 0; }
.shots img { height: 140px; display: block; box-shadow: 0 0 0 4px var(--edge); }
.rv-card { background: var(--panel-2); padding: 10px; margin: 8px 0; }
.play.small { width: 44px; height: 44px; font-size: 14px; flex: none; }
.transcript.small { font-size: 15px; line-height: 1.6; color: var(--ink); }
.rv.done { opacity: .6; }
.rv-btns .btn { font-size: 10px; }
.rv-note { margin-top: 8px; }
/* отметки на карточке */
.marks .mark { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 4px dotted var(--panel-2); }
.marks .mark span { flex: 1; }
.marks .x { background: var(--danger); color: #1a0606; border: 0; width: 36px; height: 36px; font: 14px var(--pixel); cursor: pointer; flex: none; }

/* Рейд «Путь Ваниллы» (src/raid.js): карточка босса, полоска над репликой, путь из 12 боссов, плашка победы. */
img.boss { width: 64px; height: 64px; flex: none; image-rendering: pixelated; display: block; }
img.boss.dead { filter: grayscale(1) brightness(.7); }
img.boss.sil { filter: brightness(0) drop-shadow(0 0 1px rgba(201,154,30,.6)); opacity: .75; }
.raid { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; cursor: pointer; box-shadow: inset 0 0 0 2px #6a1d1d; }
.raid .raid-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.raid small, .path small { color: var(--muted); font-size: 11px; }
.raid b.px { font: 10px/1.6 var(--pixel); color: #ffb0a0; overflow-wrap: anywhere; }
.raid.done b.px { color: var(--gold); }
.hp { position: relative; height: 14px; background: #2a0d0d; box-shadow: 0 0 0 2px var(--edge); }
.hp i { display: block; height: 100%; background: linear-gradient(#e0483c, #a51f1f); transition: width .6s ease-out; }
.hp span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; color: #fff; text-shadow: 0 1px 1px #000; white-space: nowrap; }
.raid-top { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted); }
.raid-top span { overflow-wrap: anywhere; }
.raidstrip { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; padding: 4px 8px; background: var(--panel); font-size: 12px; position: relative; }
.raidstrip img.boss { width: 32px; height: 32px; image-rendering: auto; }
.raidstrip .nm { flex: none; max-width: 38%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #ffb0a0; }
.raidstrip .hp { flex: 1; height: 8px; }
.raidstrip.hit .hp { animation: hp-hit .5s ease-out; }
.raidstrip .hp .dmg { position: absolute; right: 0; top: -16px; font: 11px var(--pixel); color: #ff8a7a; pointer-events: none;
  text-shadow: 0 1px 0 #000; animation: hp-float .9s ease-out both; }
@keyframes hp-hit { 30% { filter: brightness(1.8); } }
@keyframes hp-float { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(-12px); } }
@media (prefers-reduced-motion: reduce) { .raidstrip.hit .hp, .hp i, .kill-toast img.boss { animation: none; transition: none; } .raidstrip .hp .dmg { display: none; } }
.path { display: grid; gap: 8px; }
.pb { display: flex; gap: 10px; align-items: center; background: var(--panel); padding: 8px; }
.pb.cur { box-shadow: inset 0 0 0 2px #c0392b; }
.pb.dead { opacity: .8; }
.pb.k-raid img.boss { box-shadow: 0 0 0 2px #6a4a9a; }
.pb-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pb-info b { font: 9px/1.6 var(--pixel); overflow-wrap: anywhere; }
.pb.dead .pb-info b { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--ink) 55%, transparent); }
.ach .a img.bossico { image-rendering: auto; }
.ach .a img.sil { filter: brightness(0); opacity: .6; }
.pb-info .hp { height: 8px; }
.pb-info .reward { font-size: 11px; color: var(--gold); }
.kill-toast { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 10px; text-align: center;
  background: #140606; box-shadow: 0 0 0 2px rgba(192,57,43,.8), 0 8px 24px rgba(0,0,0,.6); }
.kill-toast img.boss { animation: kill-fade 2.4s 1.2s ease-in both; }
@media (max-width: 360px) { .kill-toast .lvl-text b { font-size: 12px; } .kill-toast img.boss { width: 48px; height: 48px; image-rendering: auto; } }
.fx.calm img.boss { animation: none; filter: grayscale(1); }
@keyframes kill-fade { to { filter: grayscale(1) brightness(.6); } }
:root[data-theme="light"] .raid b.px, :root[data-theme="light"] .raidstrip .nm { color: #8a1f14; }
:root[data-theme="light"] .raid { box-shadow: inset 0 0 0 2px #b0473c; }
:root[data-theme="light"] .pb-info .reward { color: #8a6400; }
/* светлая тема: золотой текст на кремовом почти не виден — темнее (фоны с --gold не трогаем) */
:root[data-theme="light"] .hero .title, :root[data-theme="light"] .quests .qhead b, :root[data-theme="light"] .zones .zone.done span:first-child,
:root[data-theme="light"] .ach-pts, :root[data-theme="light"] .lb .pts, :root[data-theme="light"] .points { color: #8a6400; }

/* Экран «Стата» (web/stats.js, только автор). */
.sgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 10px; }
.sgrid div { background: var(--panel-2); padding: 8px; min-width: 0; }
.sgrid b { display: block; font: 12px/1.6 var(--pixel); color: var(--gold); overflow-wrap: anywhere; }
.sgrid small { display: block; font-size: 11px; color: var(--muted); }
.sbars { display: grid; gap: 4px; margin: 6px 0; }
.sb { display: grid; grid-template-columns: minmax(0, 38%) 1fr auto; gap: 8px; align-items: center; font-size: 12px; }
.sb .sl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb .sv { white-space: nowrap; }
.sb .sv small { color: var(--muted); }
.st { display: inline-block; height: 8px; background: var(--panel-2); position: relative; width: 100%; vertical-align: middle; }
.st i { display: block; height: 100%; background: var(--accent); }
.stbl { width: 100%; border-collapse: collapse; font-size: 12px; table-layout: fixed; }
.stbl th { text-align: left; color: var(--muted); font-weight: normal; font-size: 11px; }
.stbl td, .stbl th { padding: 3px 4px; border-bottom: 1px solid var(--panel-2); overflow: hidden; }
.stbl th:nth-child(3), .stbl td:nth-child(3) { width: 38%; }
.stbl td .st { width: 55%; margin-right: 6px; }
.hours { display: flex; align-items: flex-end; gap: 2px; height: 70px; }
.hours i { flex: 1; background: var(--accent); min-height: 2px; }
.hours-l { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); }
:root[data-theme="light"] .sgrid b { color: #8a6400; }
#view code { overflow-wrap: anywhere; word-break: break-word; }

/* Админка «Люди» (web/panel.js). */
.psearch { gap: 8px; }
.psearch input { flex: 1; min-width: 0; }
.plist { display: grid; gap: 6px; }
.prow { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: var(--panel-2); border: 0; padding: 8px; color: inherit; font: inherit; cursor: pointer; }
.prow img.cat { flex: none; }
.pmain { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.pmain .tag { margin: 2px 4px 0 0; }
.ptrust { flex: none; text-align: right; font: 10px/1.6 var(--pixel); }
.ptrust small { display: block; font: 11px var(--text); color: var(--muted); }
.ptrust.bad { color: var(--danger); }
.ptrust.good { color: var(--accent); }
.phead { display: flex; gap: 12px; align-items: center; }
.phead > div { min-width: 0; overflow-wrap: anywhere; }
.phead h1 { margin: 0; }
.jrow { padding: 6px 0; border-bottom: 1px solid var(--panel-2); font-size: 13px; overflow-wrap: anywhere; }
.jrow[data-person]:not([data-person=""]) { cursor: pointer; }

/* Карточка босса — кнопка «в бой» (тап = прослушка), «Путь ›» в углу — экран пути. */
.raid.fight { position: relative; }
.raid.fight:active { transform: translateY(1px); box-shadow: inset 0 0 0 2px #a83232; }
.raid-path { position: absolute; top: 6px; right: 6px; background: var(--panel-2); border: 0; color: var(--muted); font: 12px var(--text); padding: 4px 8px; cursor: pointer; }
.raid.fight small { padding-right: 64px; }
.raid-go { font: 9px/1.8 var(--pixel); color: #ffb0a0; }

/* Разбор: группа отметок по одному слову (web/app.js groupBlock). */
.rv-group { margin: 8px 0; padding: 6px 0 6px 10px; box-shadow: inset 2px 0 0 var(--accent); }
.rv-mem { display: flex; gap: 8px; align-items: center; padding: 4px 0; font-size: 13px; overflow-wrap: anywhere; }
.rv-mem input { flex: none; width: 18px; height: 18px; }
.rv-mem .play { flex: none; }
.rv-mem.done { opacity: 0.5; }

/* Разбор: раздел «уже подтверждённые слова — ждут патча» (web/app.js review). */
.known-sec > summary { cursor: pointer; list-style: none; }
.known-sec > summary::-webkit-details-marker { display: none; }
.known-sec[open] > summary { margin-bottom: 8px; }
.known-sec .top-words { display: block; margin-top: 4px; font-size: 12px; }

/* Перемотка: полоска — тап/протяжка (крупная зона касания), ±5 с и время под ней. */
.player .seekwrap { flex: 1; min-width: 0; }
.player .bar { cursor: pointer; touch-action: none; margin-top: 0; padding: 10px 0; background-clip: content-box; height: 34px; box-sizing: border-box; }
.seekbtns { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; }
.seek { background: var(--panel-2); border: 0; color: inherit; font: 12px var(--text); padding: 6px 10px; cursor: pointer; }

/* Репутация а-ля WoW (web/app.js repBar): красный — ненависть/враждебность, оранжевый — неприязнь,
   жёлтый — равнодушие, зелёный — дружелюбие и выше. */
:root { --rep-hated: #d43c3c; --rep-unfriendly: #ee7a2e; --rep-neutral: #e8c547; --rep-friendly: #4cc35a; --rep-exalted: #3fd9c4; }
:root[data-theme="light"] { --rep-hated: #b1261f; --rep-unfriendly: #b8560f; --rep-neutral: #8a6d00; --rep-friendly: #22792e; --rep-exalted: #0f7d70; }
.r-hated, .r-hostile { --rep-c: var(--rep-hated); }
.r-unfriendly { --rep-c: var(--rep-unfriendly); }
.r-neutral { --rep-c: var(--rep-neutral); }
.r-friendly, .r-honored, .r-revered { --rep-c: var(--rep-friendly); }
.r-exalted { --rep-c: var(--rep-exalted); }
.rep { margin: 6px 0 2px; }
.rep-t { font: 10px/1.8 var(--pixel); color: var(--rep-c); }
.repbar { position: relative; height: 14px; background: var(--panel-2); box-shadow: 0 0 0 2px var(--edge); margin-top: 2px; }
.repbar i { display: block; height: 100%; background: var(--rep-c); opacity: .85; }
.repbar span { position: absolute; inset: 0; text-align: center; font: 11px/14px var(--text); color: var(--text-c, #fff); text-shadow: 0 1px 2px #000; }
.rep.compact { margin: 4px 0 0; }
.rep.compact .rep-t { font-size: 8px; }
.rep.compact .repbar { height: 6px; box-shadow: none; }
.rep.compact .repbar span { display: none; }
.lb .pts[class*="r-"] { color: var(--rep-c); }

/* Разбор: «🔥 N чел.» и блок «та же фраза в паке» (web/app.js offerSpread). */
.tag.hot { background: #8a2b33; color: #fff; }
.spread { margin-top: 8px; display: grid; gap: 6px; }
.spread input { padding: 6px 8px; }

/* «🔄 Исправления» (web/app.js fixesScreen, src/fixes.js). */
.new { display: inline-block; background: #d9412b; color: #fff; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 6px; vertical-align: middle; animation: newpulse 1.6s ease-in-out infinite; }
.tag.new { animation: none; }
@keyframes newpulse { 50% { opacity: .55; } }
.btn.locked { opacity: .5; }
.fix { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line, rgba(127,127,127,.2)); }
.fix:last-child { border-bottom: 0; }
.fix.locked { opacity: .5; }
.btn.small { width: auto; padding: 6px 12px; margin: 0; white-space: nowrap; }
.banner.fixb { background: #1f5f8b; color: #fff; }

/* «Как правильно?» (src/polls.js) */
.poll-word { font-size: 18px; color: var(--gold); margin-bottom: 6px; }
.poll-ctx { margin: 8px 0; font-style: italic; opacity: .9; }
.poll-opts { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.poll-res span { display: block; margin-bottom: 4px; }
.poll-res.mine > span { color: var(--gold); }
.cmp-sides { display: flex; gap: 10px; margin: 10px 0; }
.cmp-side { flex: 1; display: flex; flex-direction: column; gap: 6px; align-items: stretch; padding: 8px; border: 1px solid var(--line, #333); border-radius: 8px; }
.cmp-side b { text-align: center; font-size: 18px; }
.cmp-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; font-size: 12px; }
.small { font-size: 12px; }
.cmp-next { margin-top: 10px; font-size: 18px; padding: 14px; }
