:root {
  --bg: #141821; --bg2: #1c2230; --bg3: #232b3c; --line: #2f3850;
  --paper: #f0e6cc; --paper2: #e2d4b0; --ink: #2b2418; --ink2: #6e6046; --edge: #b9a67c;
  --gold: #c9973a; --gold2: #e6bf6a; --red: #b5463c; --green: #4c8648; --blue: #5b84b1;
  --silver: #d5dbe6; --gem: #6fd3ea; --obs: #b98cf5;
  --text: #ebe5d5; --muted: #8f96a8;
  --serif: Georgia, 'Noto Serif', 'Times New Roman', serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: #0a0c11; color: var(--text); font-family: var(--sans); font-size: 16px; }
body { overscroll-behavior: none; }
button, input, select { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; padding: 0; }
svg.ic { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -0.25em; }
.link { text-decoration: underline; text-underline-offset: 2px; }

#app { max-width: 480px; height: 100%; margin: 0 auto; display: flex; flex-direction: column; position: relative; overflow: hidden;
  background: radial-gradient(120% 60% at 50% 0, #1e2638 0, var(--bg) 60%) var(--bg); }
.boot { margin: auto; font-family: var(--serif); font-size: 1.4rem; color: var(--gold2); animation: pulse 1.4s infinite; }

/* ---------- вход ---------- */
.auth { margin: auto; width: 100%; padding: 28px 22px; animation: rise .5s both; }
.logo { text-align: center; margin-bottom: 26px; }
.logo .mark { width: 76px; height: 76px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; color: var(--gold2);
  background: radial-gradient(circle at 30% 25%, #2d3547, #161a23); border: 1px solid var(--gold); box-shadow: 0 8px 30px #0008; }
.logo .mark svg { width: 38px; height: 38px; }
.logo h1 { font-family: var(--serif); font-weight: 400; font-size: 1.9rem; margin: 0; color: var(--paper); letter-spacing: .5px; }
.logo p { margin: 6px 0 0; color: var(--muted); font-size: .9rem; }
.seg { display: flex; background: var(--bg2); border-radius: 12px; padding: 4px; margin-bottom: 14px; box-shadow: inset 0 0 0 1px var(--line); }
.seg button { flex: 1; padding: 10px 4px; border-radius: 9px; color: var(--muted); transition: .2s; }
.seg button.on { background: var(--paper); color: var(--ink); font-weight: 600; }
.seg.small button { font-size: .82rem; padding: 8px 2px; }
.field { display: block; margin-bottom: 12px; }
.field span { display: block; font-size: .8rem; color: var(--muted); margin: 0 0 5px 4px; }
.field input, .sellform input, .sellform select { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg2); color: var(--text); outline: none; transition: border-color .2s; }
.field input:focus, .sellform input:focus { border-color: var(--gold); }
.ver { text-align: center; color: #626a7c; font-size: .78rem; margin: 18px 0 4px; }

/* ---------- кнопки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 11px 16px; border-radius: 12px; font-weight: 600; white-space: nowrap;
  background: linear-gradient(#dcab4e, #b9862c); color: #2a1d05; box-shadow: 0 2px 0 #7c5a1b, 0 6px 14px #0005, inset 0 1px 0 #fff5; transition: transform .08s, filter .2s, opacity .2s; }
.btn:active { transform: translateY(2px) scale(.98); box-shadow: 0 0 0 #7c5a1b; }
.btn.wide { width: 100%; padding: 14px; font-size: 1.02rem; }
.btn.red { background: linear-gradient(#c6564b, #9a362d); color: #fff3ee; box-shadow: 0 2px 0 #6b231d, 0 6px 14px #0005, inset 0 1px 0 #fff3; }
.btn.ghost { background: transparent; color: var(--ink2); box-shadow: inset 0 0 0 1px var(--edge); }
.btn.dark { background: var(--bg2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.btn.sm { padding: 8px 11px; font-size: .86rem; border-radius: 10px; }
.btn[disabled] { opacity: .45; filter: grayscale(.6); pointer-events: none; }
.btn .cur { color: inherit; }

/* ---------- валюты ---------- */
.cur { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cur svg { width: 1em; height: 1em; }
.cur.silver svg { color: #8f99ab; } .cur.diamonds svg { color: #2e9fbb; } .cur.obsidian svg { color: #7b47c9; }

/* ---------- верхняя панель ---------- */
.top { z-index: 3; background: linear-gradient(#232a3b, #171b26); border-bottom: 1px solid #3b3320; box-shadow: 0 4px 14px #0007; }
.brand { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 6px 0 4px; font-family: var(--serif); font-size: .82rem; letter-spacing: 3px; text-transform: uppercase; color: var(--gold2);
  background: linear-gradient(90deg, transparent, #3a2c12 30%, #3a2c12 70%, transparent); }
.brand { position: relative; justify-content: flex-start; padding-left: 12px; white-space: nowrap; letter-spacing: 1.6px; font-size: .76rem; gap: 7px; }
.msk { margin-left: auto; padding-right: 10px; display: inline-flex; align-items: center; gap: 4px; font: 500 .72rem var(--sans); letter-spacing: .3px; text-transform: none; color: #cfc7b0; font-variant-numeric: tabular-nums; }
.msk svg { width: 12px; height: 12px; } .msk b { font-weight: 500; }
.brand i { width: 6px; height: 6px; background: var(--gold); transform: rotate(45deg); }
.notices { padding: 4px 10px 0; }
.notice { display: flex; align-items: center; gap: 7px; padding: 4px 8px; margin-top: 3px; border-radius: 8px; font-size: .8rem; background: #ffffff0a; color: #d9d2bd; animation: rise .3s both; }
.notice > svg { color: var(--gold2); }
.notice.daily { background: #c9973a26; } .notice.daily > svg { color: #f1c463; }
.notice.mail > svg { color: var(--gem); }
.notice .ntext { flex: 1; min-width: 0; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notice .cd { color: var(--muted); font-variant-numeric: tabular-nums; }
.notice .nx { color: var(--muted); padding: 2px; display: grid; } .notice .nx svg { width: 14px; height: 14px; }
.bar { padding: 7px 10px 6px; }
.brow { display: flex; align-items: center; gap: 7px; }
.brow + .brow { margin-top: 6px; }
.brow .cur { font-size: .86rem; } .brow .cur.silver { color: var(--silver); } .brow .cur.diamonds { color: var(--gem); } .brow .cur.obsidian { color: var(--obs); }
.brow .cur svg { color: inherit; }
.mailbtn { position: relative; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: #ffffff0d; color: var(--gold2); flex: none; }
.dot { position: absolute; top: -4px; right: -5px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--red); color: #fff; font: 700 .64rem/16px var(--sans); font-style: normal; text-align: center; }
.who { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1; text-align: left; }
.who b { font-family: var(--serif); font-weight: 400; font-size: 1.02rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lvl { flex: none; font-size: .7rem; font-weight: 700; background: var(--gold); color: #2a1d05; border-radius: 20px; padding: 2px 7px; }
.pill { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 7px; border-radius: 8px; background: #0000004d; box-shadow: inset 0 0 0 1px #ffffff12; font-size: .78rem; font-variant-numeric: tabular-nums; color: #d9d2bd; white-space: nowrap; }
.pill svg { width: 14px; height: 14px; color: var(--gold2); }
.pill.hp { flex: 1; min-width: 84px; } .pill.hp svg { color: #e0655a; }
.pill.time b { font-weight: 500; }
.mini { flex: 1; min-width: 18px; height: 6px; border-radius: 4px; background: #000a; overflow: hidden; }
.mini i { display: block; height: 100%; width: 0; border-radius: 4px; background: linear-gradient(90deg, #4f8a4b, #8ac67d); transition: width .8s linear; }
.mini.low i { background: linear-gradient(90deg, #9c382f, #d66f60); }
.petpill { width: 84px; } .petpill .mini i { background: linear-gradient(90deg, #3b7fa3, #7cc6e4); }
.petpill.none { width: auto; color: var(--muted); } .petpill.none > svg { color: var(--muted); }
.petpill .buy { display: grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--gold); }
.petpill .buy svg { width: 10px; height: 10px; color: #2a1d05; }
.xp { height: 3px; background: #0d1016; overflow: hidden; }
.xp i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), #9cc0e6); transition: width .6s cubic-bezier(.2,.8,.2,1); }

main { flex: 1; overflow-y: auto; padding: 12px 12px 24px; -webkit-overflow-scrolling: touch; }
main.enter > * { animation: rise .32s both; }
main.enter > *:nth-child(2) { animation-delay: .03s; } main.enter > *:nth-child(3) { animation-delay: .06s; }
main.enter > *:nth-child(4) { animation-delay: .09s; } main.enter > *:nth-child(5) { animation-delay: .12s; }
main.enter > *:nth-child(n+6) { animation-delay: .15s; }

.nav { display: flex; background: linear-gradient(#1b202c, #12151d); border-top: 1px solid #3b3320; padding-bottom: env(safe-area-inset-bottom); z-index: 3; }
.nav button { position: relative; flex: 1; padding: 8px 0 7px; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: .7rem; color: var(--muted); transition: color .2s, transform .1s; }
.nav button svg { width: 22px; height: 22px; }
.nav button.on { color: var(--gold2); }
.nav button.on::before { content: ''; position: absolute; top: 0; width: 28px; height: 2px; border-radius: 2px; background: var(--gold); }
.nav button:active { transform: scale(.92); }
.nav .dot { top: 3px; right: calc(50% - 20px); }

/* ---------- заголовки и плитки ---------- */
.back { display: inline-flex; align-items: center; gap: 3px; color: var(--muted); padding: 2px 8px 6px 0; font-size: .88rem; }
.ttl { display: flex; align-items: center; gap: 12px; margin: 2px 0 12px; }
.ttl h2 { font-family: var(--serif); font-weight: 400; font-size: 1.4rem; margin: 0; color: var(--paper); }
.ttl p { margin: 2px 0 0; font-size: .82rem; color: var(--muted); line-height: 1.3; }
h3 { display: flex; align-items: center; gap: 10px; font-size: .74rem; text-transform: uppercase; letter-spacing: 1.4px; color: var(--gold2); margin: 18px 2px 8px; font-weight: 600; }
h3::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, #6b5526, transparent); }
.tile { width: 42px; height: 42px; flex: none; border-radius: 12px; display: grid; place-items: center; color: var(--gold2);
  background: radial-gradient(circle at 30% 20%, #3a3220, #17140c); box-shadow: inset 0 0 0 1px #6b5526, 0 2px 6px #0006; }
.tile svg { width: 23px; height: 23px; }
.tile.big { width: 50px; height: 50px; border-radius: 14px; } .tile.big svg { width: 28px; height: 28px; }
.tile.sm { width: 36px; height: 36px; border-radius: 10px; } .tile.sm svg { width: 19px; height: 19px; }
.tile.dark { background: radial-gradient(circle at 30% 20%, #3b3222, #211b10); }
.orn { display: flex; align-items: center; margin: 12px 30px; height: 8px; background: linear-gradient(90deg, transparent, #6b5526 50%, transparent) center / 100% 1px no-repeat; }
.orn i { margin: auto; width: 8px; height: 8px; background: var(--gold); transform: rotate(45deg); box-shadow: 0 0 0 3px var(--bg); }
.tag { flex: none; font-size: .68rem; font-weight: 700; padding: 2px 7px; border-radius: 20px; background: var(--red); color: #fff; font-variant-numeric: tabular-nums; }
.gap { height: 10px; }

.row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 11px 12px; border-radius: 14px; margin-bottom: 8px;
  background: linear-gradient(#222a3a, #1b2130); box-shadow: inset 0 0 0 1px var(--line), 0 3px 8px #0004; transition: transform .1s, filter .2s; }
.row:active { transform: scale(.98); filter: brightness(1.2); }
.row .info { flex: 1; min-width: 0; } .row .info b { display: block; font-family: var(--serif); font-weight: 400; font-size: 1.1rem; color: var(--paper); }
.row .info small { display: block; color: var(--muted); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row > svg.ic { color: #5a6378; }

.hero-banner { position: relative; border-radius: 16px; overflow: hidden; box-shadow: 0 0 0 1px #6b5526, 0 8px 20px #0007; }
.banner { display: block; width: 100%; height: 132px; }
.hero-banner .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 14px 10px; background: linear-gradient(transparent, #0c0e14e6); }
.hero-banner .cap b { display: block; font-family: var(--serif); font-weight: 400; font-size: 1.2rem; color: var(--paper); }
.hero-banner .cap span { font-size: .8rem; color: #c9c2ad; }

/* ---------- карточки ---------- */
.card { position: relative; color: var(--ink); border-radius: 16px; padding: 13px; margin-bottom: 10px;
  background: linear-gradient(170deg, #f4ebd3, var(--paper2)); box-shadow: 0 6px 16px #0006, inset 0 0 0 1px #fff6, inset 0 0 0 3px #c9b88a40; }
.card .sub { color: var(--ink2); font-size: .86rem; line-height: 1.35; } p.sub { margin: 4px 0 8px; }
.card.dark { background: var(--bg2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.card.dark .sub { color: var(--muted); }
.hint { font-size: .78rem; color: var(--ink2); line-height: 1.35; margin: 10px 0 0; } .hint.light { color: var(--muted); margin: -2px 4px 0; }
.story { font-family: var(--serif); font-style: italic; line-height: 1.5; margin: 0; }
.empty { text-align: center; color: var(--muted); padding: 22px 12px; font-size: .9rem; line-height: 1.4; }
.grid2 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.grid2 div { background: #0000000d; border-radius: 10px; padding: 7px 8px; }
.grid2 small { display: block; font-size: .7rem; color: var(--ink2); } .grid2 b { font-family: var(--serif); font-size: 1.05rem; font-weight: 400; }

.entry { padding: 10px 0; border-bottom: 1px dashed var(--edge); font-family: var(--serif); line-height: 1.4; }
.entry:last-child { border-bottom: 0; padding-bottom: 2px; } .entry:first-child { padding-top: 2px; }
.entry time, .letter time { display: block; font-family: var(--sans); font-size: .72rem; color: var(--ink2); margin-bottom: 2px; }
.letter b { font-family: var(--serif); font-weight: 400; font-size: 1.1rem; } .letter p { margin: 4px 0 8px; font-size: .9rem; line-height: 1.4; }
.letter.new { box-shadow: 0 6px 16px #0006, inset 0 0 0 2px var(--gold); }

.stat, .slot { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #0000001a; }
.stat:last-child, .slot:last-child { border-bottom: 0; padding-bottom: 2px; } .stat:first-child, .slot:first-child { padding-top: 2px; }
.stat .info, .slot .info { flex: 1; min-width: 0; }
.stat .info > b em { font-style: normal; color: var(--green); font-size: .88rem; margin-left: 4px; }
.stat .val { font-family: var(--serif); font-size: 1.25rem; font-weight: 400; margin-left: 6px; }
.stat .sub { font-size: .8rem; } .stat .eff { font-size: .8rem; color: #4a3f2a; margin-top: 1px; }
.stat.bump .val { display: inline-block; animation: bump .45s; }
.capbar { height: 4px; border-radius: 3px; background: #0000001f; margin-top: 5px; overflow: hidden; }
.capbar i { display: block; height: 100%; background: linear-gradient(90deg, #b9862c, #e6bf6a); border-radius: 3px; transition: width .4s; }
.slot .info b { display: block; } .slot .info b.trophy { color: #8a4fc7; }
.slot .info small { display: block; color: var(--ink2); font-size: .74rem; } .slot .info i { color: var(--ink2); }
.col { display: flex; flex-direction: column; gap: 5px; align-items: stretch; text-align: center; }
.bonus { color: var(--green); font-size: .82rem; font-weight: 600; }
.sellform { display: flex; gap: 6px; margin: 8px 0; } .sellform input { flex: 1; min-width: 0; padding: 9px 10px; border-radius: 10px; background: #fffaf0; color: var(--ink); border-color: var(--edge); }
.sellform select { width: auto; padding: 9px 6px; border-radius: 10px; background: #fffaf0; color: var(--ink); border-color: var(--edge); }

/* ---------- противники ---------- */
.foe-head { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.foe-head > div { min-width: 0; }
.foe-head b { font-family: var(--serif); font-weight: 400; font-size: 1.15rem; display: block; }
.ava { width: 56px; height: 56px; border-radius: 50%; flex: none; display: grid; place-items: center; font-family: var(--serif); font-size: 1.5rem; color: var(--paper);
  background: radial-gradient(circle at 30% 25%, #4a5670, #232a39); box-shadow: 0 0 0 2px var(--gold), 0 4px 10px #0006; }
.ava svg { width: 28px; height: 28px; }
.ava.foe { background: radial-gradient(circle at 30% 25%, #7a4039, #32191a); box-shadow: 0 0 0 2px #8a4a40, 0 4px 10px #0006; }
.ava.foe.silver { background: radial-gradient(circle at 30% 25%, #6c7483, #2b303a); box-shadow: 0 0 0 2px #aab2c2, 0 4px 10px #0006; }
.ava.foe.diamond { background: radial-gradient(circle at 30% 25%, #2f7d92, #12333d); box-shadow: 0 0 0 2px #6fd3ea, 0 4px 10px #0006; }
.ava.foe.obsidian { background: radial-gradient(circle at 30% 25%, #5a3a86, #1c1230); box-shadow: 0 0 0 2px #b98cf5, 0 4px 10px #0006; }
.ava.pet { background: radial-gradient(circle at 30% 25%, #3d6f8a, #16303d); box-shadow: 0 0 0 2px #7cc6e4, 0 4px 10px #0006; }
.ava.dawn { background: radial-gradient(circle at 30% 25%, #d99a3c, #6d3b12); } .ava.dusk { background: radial-gradient(circle at 30% 25%, #5d5aa8, #1f1d45); box-shadow: 0 0 0 2px #9d9ae6, 0 4px 10px #0006; }
.tier { display: inline-flex; align-items: center; gap: 4px; font-size: .68rem; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; }
.tier svg { width: 12px; height: 12px; }
.tier.easy { color: #5d6675; } .tier.normal { color: #a8731f; } .tier.hard { color: var(--red); }
.bandit-diamond .tier { color: #1f8ba6; } .bandit-obsidian .tier { color: #7b47c9; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.chip { font-size: .76rem; background: #0000000f; border-radius: 20px; padding: 3px 8px; color: var(--ink2); display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.chip svg { width: 12px; height: 12px; } .chip.strong { font-weight: 700; color: var(--ink); }
.card.dark .chip { background: #ffffff0d; color: var(--muted); }
.cmp { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; margin: 8px 0 10px; }
.cmp div { background: #0000000d; border-radius: 10px; padding: 6px 2px 5px; text-align: center; font-size: .8rem; font-variant-numeric: tabular-nums; line-height: 1.25; }
.cmp svg { display: block; margin: 0 auto 2px; width: 15px; height: 15px; color: var(--ink2); }
.cmp b { display: block; } .cmp b.up { color: var(--green); } .cmp b.down { color: var(--red); }
.cmp span { color: var(--ink2); font-size: .76rem; } .cmp em { font-style: normal; color: #1f8ba6; }
.rew { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: .84rem; color: var(--ink2); margin: 0 0 10px; }
.rew .cur { color: var(--ink); }
.steps { display: flex; gap: 6px; margin-bottom: 10px; }
.steps i { flex: 1; height: 34px; border-radius: 9px; display: grid; place-items: center; font-style: normal; font-family: var(--serif); background: #0d1016; color: #5a6378; box-shadow: inset 0 0 0 1px var(--line); }
.steps i.done { background: #2f4a2d; color: #a9d19f; } .steps i.cur { box-shadow: inset 0 0 0 2px var(--gold); color: var(--gold2); animation: pulse 1.6s infinite; }
.steps i.boss { border-radius: 9px 9px 16px 16px; } .steps i.boss:not(.done) { color: #d97a6c; }

/* ---------- списки ---------- */
.list .pl { display: flex; align-items: center; gap: 8px; padding: 9px 0; border-bottom: 1px solid #0000001a; }
.list .pl:last-child { border-bottom: 0; padding-bottom: 2px; } .list .pl:first-child { padding-top: 2px; }
.list .n { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 50%; font-family: var(--serif); color: var(--ink2); }
.list .n.top1 { background: #d9a93c; color: #3a2804; } .list .n.top2 { background: #b9c0cc; color: #2a2f38; } .list .n.top3 { background: #c08a5a; color: #37210c; }
.list .pl b { flex: 1; min-width: 0; font-weight: 600; } .list .pl b small { display: block; font-weight: 400; color: var(--ink2); font-size: .76rem; }
.list .pl.me b { color: #a2681a; }
.fac.mine { box-shadow: 0 6px 16px #0006, inset 0 0 0 2px var(--gold); }
.hydra-card { text-align: center; } .hydra-art { width: 78%; max-width: 280px; margin: -4px auto 0; display: block; }
.hname { display: block; font-family: var(--serif); font-weight: 400; font-size: 1.15rem; color: var(--paper); margin: 2px 0 8px; }
.hydra-card .sub { margin: 10px 0; }

/* ---------- полосы здоровья ---------- */
.hp { height: 10px; background: #0008; border-radius: 6px; overflow: hidden; box-shadow: inset 0 0 0 1px #fff1; }
.hp i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #4f8a4b, #86c07a); border-radius: 6px; transition: width .4s cubic-bezier(.2,.8,.2,1); }
.hp.low i { background: linear-gradient(90deg, #9c382f, #d06a5c); }
.hp.big { height: 14px; } .hp.big i { background: linear-gradient(90deg, #8f2f2a, #d9584c); }
.hp.sm { height: 5px; flex: 1; } .hp.sm i { background: linear-gradient(90deg, #3b7fa3, #7cc6e4); }
.hpn { font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; margin-top: 4px; }

/* ---------- бой ---------- */
.battle { position: absolute; inset: 0; z-index: 10; background: radial-gradient(circle at 50% 0, #32222e, #0e1016 70%); display: flex; flex-direction: column; padding: 16px 14px; animation: fade .25s both; }
.battle h2 { font-family: var(--serif); font-weight: 400; font-size: 1.3rem; text-align: center; margin: 0 0 14px; color: var(--gold2); }
.fighters { display: flex; align-items: flex-start; gap: 6px; }
.fighters .f { flex: 1; text-align: center; position: relative; min-width: 0; }
.fighters .f .ava { margin: 0 auto 8px; width: 68px; height: 68px; font-size: 1.9rem; }
.fighters .f .nm { font-family: var(--serif); font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fighters .f > .hp { margin: 7px 6px 0; }
.fighters .vs { font-family: var(--serif); color: var(--muted); padding-top: 24px; }
.petrow { display: flex; align-items: center; gap: 5px; margin: 7px 6px 0; font-size: .72rem; color: #9fc7d9; transition: opacity .3s; }
.petrow svg { width: 12px; height: 12px; } .petrow span { max-width: 74px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.petrow.out { opacity: .35; } .petrow.hit { animation: shake .35s; }
.f.hit .ava { animation: shake .35s; } .f.dodge .ava { animation: dodge .4s; }
.fly { position: absolute; left: 50%; top: 16px; transform: translateX(-50%); font-weight: 800; font-size: 1.3rem; color: #ff8d7c; text-shadow: 0 2px 6px #000; pointer-events: none; animation: fly .8s forwards; }
.fly.crit { color: var(--gold2); font-size: 1.7rem; } .fly.miss { color: #b9c2d6; font-size: 1rem; }
.blog { flex: 1; overflow: hidden; margin: 14px 0 12px; display: flex; flex-direction: column-reverse; gap: 4px; mask-image: linear-gradient(transparent, #000 35%); -webkit-mask-image: linear-gradient(transparent, #000 35%); }
.blog p { margin: 0; font-size: .85rem; color: #aab1c2; text-align: center; animation: rise .25s both; }
.blog p.me { color: #d7e3c9; } .blog p.crit { color: var(--gold2); } .blog p.miss { color: #8f96a8; }
.outcome { animation: rise .4s both; margin: auto 0 0; }
.outcome .res { font-family: var(--serif); font-size: 1.7rem; text-align: center; margin-bottom: 2px; }
.outcome .res.win { color: #3f7a3a; } .outcome .res.lose { color: var(--red); }
.outcome > .sub { text-align: center; margin-bottom: 10px; }
.kv { display: flex; justify-content: space-between; align-items: center; padding: 5px 0; border-bottom: 1px dashed var(--edge); font-size: .92rem; }
.acts { display: flex; gap: 8px; margin-top: 12px; } .acts .btn { flex: 1; }
.lvlup { text-align: center; background: #2a251d; color: var(--gold2); border-radius: 10px; padding: 8px; margin-bottom: 8px; font-weight: 600; font-size: .9rem; animation: bump .6s; }

/* ---------- окна и уведомления ---------- */
.modal { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; padding: 24px; background: #000a; animation: fade .2s both; }
.modal .card { width: 100%; margin: 0; animation: rise .25s both; } .modal p { margin: 2px 0 0; font-size: 1rem; line-height: 1.4; }
#toasts { position: fixed; left: 0; right: 0; bottom: 24px; display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; z-index: 50; }
.toast { background: #2a251d; color: var(--paper); padding: 10px 16px; border-radius: 22px; font-size: .9rem; box-shadow: 0 6px 20px #000a; animation: toast 2.6s both; max-width: 90%; text-align: center; }
.toast.err { background: #7c2b24; } .toast.good { background: #2f5a2c; }

@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse { 50% { opacity: .45; } }
@keyframes bump { 40% { transform: scale(1.25); color: var(--green); } }
@keyframes shake { 20% { transform: translateX(-7px) rotate(-4deg); } 50% { transform: translateX(6px) rotate(3deg); } 80% { transform: translateX(-3px); } }
@keyframes dodge { 50% { transform: translateY(-10px) scale(.94); opacity: .7; } }
@keyframes fly { from { opacity: 0; transform: translate(-50%, 10px) scale(.7); } 25% { opacity: 1; transform: translate(-50%, -6px) scale(1.1); } to { opacity: 0; transform: translate(-50%, -40px); } }
@keyframes toast { 0% { opacity: 0; transform: translateY(14px); } 10%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-8px); } }
@media (max-width: 359px) { .pill.time:last-child { display: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ================= v.0.0.4: детализация оформления ================= */
#app { background:
  radial-gradient(#ffffff09 1px, transparent 1.6px) 0 0 / 22px 22px,
  radial-gradient(120% 50% at 50% 0, #232c42 0, transparent 60%),
  linear-gradient(#141821, #10131b); }
main { background: linear-gradient(90deg, #0006, transparent 14px, transparent calc(100% - 14px), #0006); }

/* верхняя панель: рамка и орнамент */
.top { position: relative; border-bottom: 2px solid #6b5526; box-shadow: 0 4px 14px #0008, inset 0 -1px 0 #0008; }
.top::after { content: ''; position: absolute; left: 50%; bottom: -6px; width: 10px; height: 10px; margin-left: -5px; background: var(--gold); transform: rotate(45deg); box-shadow: 0 0 0 2px #171b26; z-index: 1; }
.brand { border-bottom: 1px solid #6b552680; text-shadow: 0 1px 0 #000; }
.pill { box-shadow: inset 0 0 0 1px #6b552670, inset 0 1px 3px #000a; background: linear-gradient(#0c0e14, #171b26); }
.mailbtn { background: radial-gradient(circle at 30% 20%, #3a3220, #17140c); box-shadow: inset 0 0 0 1px #6b5526; }
.lvl { background: linear-gradient(#f0c869, #b9862c); box-shadow: 0 1px 0 #7c5a1b, inset 0 1px 0 #fff6; }
.petpill.caged > svg { color: #9aa3b5; } .petpill.caged .mini i { background: linear-gradient(90deg, #5c6472, #9aa3b5); }
.petpill.dead { width: auto; } .petpill.dead svg { color: #d0655a; }
.xp { height: 4px; }

/* нижняя панель */
.nav { border-top: 2px solid #6b5526; }
.nav button.on { text-shadow: 0 0 12px #e6bf6a80; } .nav button.on svg { filter: drop-shadow(0 0 5px #e6bf6a90); }

/* шапки разделов с иллюстрацией */
.scene { position: relative; border-radius: 16px; overflow: hidden; margin: 0 0 12px; background: #151925; box-shadow: 0 0 0 1px #6b5526, 0 0 0 4px #17140c, 0 0 0 5px #3b3320, 0 8px 20px #0008; }
.scene-art { display: block; width: 100%; height: 92px; }
.scene::after { content: ''; position: absolute; left: 0; right: 0; top: 60px; height: 34px; background: linear-gradient(transparent, #151925); pointer-events: none; }
.scene .ttl { position: relative; z-index: 1; margin: -22px 12px 0; padding-bottom: 11px; align-items: flex-end; }
.scene .ttl h2 { text-shadow: 0 2px 6px #000; } .scene .ttl > div { padding-bottom: 1px; }
.scene .tile.big { box-shadow: inset 0 0 0 1px #c9973a, 0 0 0 3px #151925, 0 4px 10px #000a; }
.ttl .ava { width: 54px; height: 54px; }
.hero-banner { box-shadow: 0 0 0 1px #6b5526, 0 0 0 4px #17140c, 0 0 0 5px #3b3320, 0 8px 20px #0008; margin: 4px; }

/* плитки и строки меню */
.tile { position: relative; background:
  radial-gradient(circle at 5px 5px, #c9973a 0 1.1px, transparent 1.6px), radial-gradient(circle at calc(100% - 5px) 5px, #c9973a 0 1.1px, transparent 1.6px),
  radial-gradient(circle at 5px calc(100% - 5px), #c9973a 0 1.1px, transparent 1.6px), radial-gradient(circle at calc(100% - 5px) calc(100% - 5px), #c9973a 0 1.1px, transparent 1.6px),
  radial-gradient(circle at 30% 20%, #45391f, #17140c); box-shadow: inset 0 0 0 1px #8a6d2f, inset 0 0 8px #000a, 0 2px 6px #0007; }
.tile.dark { background: radial-gradient(circle at 30% 20%, #3b3222, #211b10); }
.tile svg { filter: drop-shadow(0 1px 1px #000a); }
.row { position: relative; overflow: hidden; padding-left: 15px; background: linear-gradient(100deg, #262f42, #1a2030 70%); box-shadow: inset 0 0 0 1px #37415a, inset 0 1px 0 #ffffff12, 0 3px 8px #0005; }
.row::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(#e6bf6a, #8a6d2f); }
.row::after { content: ''; position: absolute; right: -24px; top: -24px; width: 90px; height: 90px; border-radius: 50%; border: 1px solid #ffffff0a; box-shadow: 0 0 0 12px #ffffff05, 0 0 0 26px #ffffff03; pointer-events: none; }
h3::before { content: ''; width: 6px; height: 6px; flex: none; background: var(--gold); transform: rotate(45deg); }
.orn { background: linear-gradient(90deg, transparent, #8a6d2f 50%, transparent) center / 100% 1px no-repeat; }
.orn i { box-shadow: 0 0 0 3px #141821, 14px -14px 0 -2px #8a6d2f, -14px 14px 0 -2px #8a6d2f; }

/* карточки: фактура бумаги и уголки */
.card { background:
  radial-gradient(circle at 10% 8%, #fffaf0aa 0, transparent 34%), radial-gradient(circle at 92% 96%, #c2a86a66 0, transparent 38%),
  repeating-linear-gradient(0deg, transparent 0 23px, #a08a5a14 23px 24px),
  linear-gradient(170deg, #f5ecd5, #e0d1ab);
  box-shadow: 0 6px 16px #0007, inset 0 0 0 1px #fff7, inset 0 0 0 4px #c9b88a38, inset 0 0 24px #a0834a30; }
.card::before, .card::after { content: ''; position: absolute; width: 13px; height: 13px; border: 2px solid #a8853d; opacity: .75; pointer-events: none; }
.card::before { top: 5px; left: 5px; border-right: 0; border-bottom: 0; border-radius: 5px 0 0 0; }
.card::after { bottom: 5px; right: 5px; border-left: 0; border-top: 0; border-radius: 0 0 5px 0; }
.card.dark { background: linear-gradient(170deg, #20283a, #181d2a); box-shadow: inset 0 0 0 1px #37415a, inset 0 0 20px #0006; }
.card.dark::before, .card.dark::after { border-color: #6b5526; }
.letter.new, .fac.mine { box-shadow: 0 6px 16px #0007, inset 0 0 0 2px var(--gold), inset 0 0 24px #a0834a30; }
.grid2 div, .cmp div { box-shadow: inset 0 0 0 1px #a08a5a40; background: #7a643a14; }
.chip { box-shadow: inset 0 0 0 1px #a08a5a30; }
.btn { text-shadow: 0 1px 0 #fff4; box-shadow: 0 2px 0 #7c5a1b, 0 6px 14px #0005, inset 0 1px 0 #fff6, inset 0 0 0 1px #8a6420; }
.btn.red { text-shadow: 0 1px 0 #0006; box-shadow: 0 2px 0 #6b231d, 0 6px 14px #0005, inset 0 1px 0 #fff3, inset 0 0 0 1px #7a2a22; }
.btn.ghost, .btn.dark { text-shadow: none; }
.btn.dark { box-shadow: inset 0 0 0 1px #4a5672, inset 0 1px 0 #ffffff14, 0 3px 8px #0005; background: linear-gradient(#273044, #1b2130); }
.seg { box-shadow: inset 0 0 0 1px #37415a, inset 0 2px 5px #0008; }
.seg button.on { background: linear-gradient(#f5ecd5, #e0d1ab); box-shadow: 0 1px 0 #a08a5a, inset 0 0 0 1px #fff8; }

/* портреты */
.ava { position: relative; box-shadow: 0 0 0 2px var(--gold), 0 0 0 4px #17140c, 0 0 0 5px #6b5526, 0 4px 10px #0008; overflow: hidden; }
.ava .pt { width: 100%; height: 100%; display: block; }
.ava.foe { box-shadow: 0 0 0 2px #8a4a40, 0 0 0 4px #17140c, 0 0 0 5px #5a2d28, 0 4px 10px #0008; }
.ava.foe.silver { box-shadow: 0 0 0 2px #aab2c2, 0 0 0 4px #17140c, 0 0 0 5px #5d6675, 0 4px 10px #0008; }
.ava.foe.diamond { box-shadow: 0 0 0 2px #6fd3ea, 0 0 0 4px #17140c, 0 0 0 5px #1f6c80, 0 4px 10px #0008; }
.ava.foe.obsidian { box-shadow: 0 0 0 2px #b98cf5, 0 0 0 4px #17140c, 0 0 0 5px #5a3a86, 0 4px 10px #0008; }
.ava.pet { box-shadow: 0 0 0 2px #7cc6e4, 0 0 0 4px #17140c, 0 0 0 5px #2f6a85, 0 4px 10px #0008; }
.ava.pet.caged { background: radial-gradient(circle at 30% 25%, #5c6472, #262b35); box-shadow: 0 0 0 2px #9aa3b5, 0 0 0 4px #17140c, 0 0 0 5px #4a5260, 0 4px 10px #0008; }
.ava.pet.caged::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 9px, #0b0d12cc 9px 12px); }
.ava.pet.dead { background: radial-gradient(circle at 30% 25%, #6b3a36, #261414); box-shadow: 0 0 0 2px #a8554c, 0 0 0 4px #17140c, 0 0 0 5px #5a2d28, 0 4px 10px #0008; }
.petcard.dead { filter: saturate(.75); }
.petchip svg { margin-left: 1px; }
.cmp.solo div { padding: 6px 2px; } .cmp.solo b { font-family: var(--serif); font-weight: 400; font-size: 1rem; }
.rules-t { display: block; font-family: var(--serif); font-weight: 400; font-size: 1.05rem; color: var(--gold2); margin-bottom: 6px; }
.rules { margin: 0; padding-left: 18px; font-size: .84rem; line-height: 1.45; color: #c3c9d6; } .rules li { margin: 3px 0; } .rules li::marker { color: var(--gold); }
.empty.big { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 16px; }
.empty.big svg { width: 34px; height: 34px; color: var(--gold2); } .empty.big b { font-family: var(--serif); font-weight: 400; font-size: 1.1rem; color: var(--paper); }
.bad { color: var(--red); font-weight: 600; font-size: .84rem; text-align: right; }
.steps i { background: linear-gradient(#0d1016, #171b26); } .steps i.done { background: linear-gradient(#35553a, #26402a); }
.list .n { box-shadow: inset 0 0 0 1px #a08a5a50; }

/* бой: арена с факелами и песком */
.battle { background:
  radial-gradient(circle at 8% 6%, #f6a23a30 0, transparent 26%), radial-gradient(circle at 92% 6%, #f6a23a30 0, transparent 26%),
  radial-gradient(120% 40% at 50% 100%, #3a2a1c 0, transparent 70%),
  radial-gradient(circle at 50% 0, #3a2530, #0e1016 70%); }
.battle h2 { display: flex; align-items: center; justify-content: center; gap: 10px; }
.battle h2::before, .battle h2::after { content: ''; width: 34px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.battle h2::after { transform: scaleX(-1); }
.fighters { position: relative; padding-bottom: 14px; }
.fighters::after { content: ''; position: absolute; left: 6%; right: 6%; bottom: 0; height: 2px; background: linear-gradient(90deg, transparent, #6b5526, transparent); }
.fighters .vs { width: 34px; height: 34px; margin-top: 16px; padding: 0; display: grid; place-items: center; border-radius: 50%; font-size: .78rem; color: var(--gold2); background: radial-gradient(circle at 30% 20%, #45391f, #17140c); box-shadow: inset 0 0 0 1px #8a6d2f; }
.petrow { padding: 3px 6px; border-radius: 8px; background: #0006; box-shadow: inset 0 0 0 1px #2f6a8560; position: relative; }
.petrow.out { opacity: .4; filter: grayscale(1); } .petrow.out span { text-decoration: line-through; }
.fly.small { font-size: 1rem; top: auto; bottom: -4px; color: #9fd6ee; }
.blog p.petline { color: #8fb9cc; font-size: .8rem; } .blog p.petline.me { color: #a9d8c0; } .blog p.petline.crit, .blog p.crit { color: var(--gold2); }
.outcome .res { letter-spacing: .5px; }

/* ================= v.0.0.5: убежище и задания ================= */
.pill.act { cursor: pointer; transition: transform .1s, filter .2s; }
.pill.act:active { transform: scale(.94); filter: brightness(1.3); }
.tag.gold { background: linear-gradient(#e0b355, #b9862c); color: #2a1d05; }
.chip.gold { background: #c9973a26; color: #8a6418; font-weight: 600; box-shadow: inset 0 0 0 1px #c9973a55; }
.card.dark .chip.gold { background: #c9973a26; color: var(--gold2); }

/* постройки убежища */
.build .tile.big { margin-right: 2px; }
.build .foe-head b { font-size: 1.1rem; }
.lvls { display: flex; gap: 4px; margin: 2px 0 10px; }
.lvls i { flex: 1; height: 6px; border-radius: 3px; background: #0000001f; box-shadow: inset 0 0 0 1px #a08a5a40; }
.lvls i.on { background: linear-gradient(90deg, #b9862c, #e6bf6a); box-shadow: inset 0 0 0 1px #8a6420; }
.harvest { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 12px; background: #7a643a1a; box-shadow: inset 0 0 0 1px #a08a5a40; }
.harvest div { flex: 1; } .harvest small { display: block; font-size: .72rem; color: var(--ink2); }
.harvest b { font-family: var(--serif); font-size: 1.2rem; font-weight: 400; }
.build .capbar { margin: 7px 2px 0; }

/* задания */
.quest.done { box-shadow: 0 6px 16px #0007, inset 0 0 0 2px var(--green), inset 0 0 24px #a0834a30; }
.quest.taken { filter: saturate(.7); opacity: .82; }
.quest .foe-head { margin-bottom: 10px; } .quest .foe-head b { font-family: var(--serif); font-weight: 400; font-size: 1.12rem; }
.qbar { position: relative; height: 20px; border-radius: 10px; background: #0000001f; box-shadow: inset 0 0 0 1px #a08a5a40; overflow: hidden; margin-bottom: 9px; }
.qbar i { display: block; height: 100%; border-radius: 10px; background: linear-gradient(90deg, #4f8a4b, #86c07a); transition: width .5s cubic-bezier(.2,.8,.2,1); }
.qbar span { position: absolute; inset: 0; display: grid; place-items: center; font-size: .76rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.notice.quest > svg { color: #86c07a; }

/* ================= v.0.0.7: артефакты и приветствие ================= */
.hero-banner .cap { padding: 26px 14px 11px; }
.counts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.cnt { display: inline-flex; align-items: center; gap: 5px; font-size: .76rem; color: #cdc6b2; background: #0000005c; border-radius: 20px; padding: 3px 9px; box-shadow: inset 0 0 0 1px #ffffff1a; }
.cnt svg { width: 13px; height: 13px; color: var(--gold2); } .cnt b { color: #fff; font-weight: 700; }
.dotlive { width: 7px; height: 7px; border-radius: 50%; background: #5fd36a; box-shadow: 0 0 6px #5fd36a; animation: live 2s infinite; }
@keyframes live { 50% { opacity: .35; } }

.ava.art { background: radial-gradient(circle at 30% 25%, #5a3a86, #1c1230); box-shadow: 0 0 0 2px #b98cf5, 0 0 0 4px #17140c, 0 0 0 5px #5a3a86, 0 4px 10px #0008; }
.ava.art.faust { background: radial-gradient(circle at 30% 25%, #8a3a44, #2a1016); box-shadow: 0 0 0 2px #e0736f, 0 0 0 4px #17140c, 0 0 0 5px #6b2a2e, 0 4px 10px #0008; }
.ava.art.ixia { background: radial-gradient(circle at 30% 25%, #c9a04a, #4a3410); box-shadow: 0 0 0 2px #f6d27a, 0 0 0 4px #17140c, 0 0 0 5px #8a6d2f, 0 4px 10px #0008; }
.ava.art.silas { background: radial-gradient(circle at 30% 25%, #3e4a60, #121722); box-shadow: 0 0 0 2px #9fb0c8, 0 0 0 4px #17140c, 0 0 0 5px #4a5668, 0 4px 10px #0008; }
.card.art.none { filter: saturate(.55); } .card.art.none .ava.art { filter: grayscale(.8); }
.card.art.top { box-shadow: 0 6px 16px #0007, inset 0 0 0 2px var(--gold), inset 0 0 26px #a0834a40; }
.artbar { height: 7px; border-radius: 4px; background: #0000001f; box-shadow: inset 0 0 0 1px #a08a5a40; overflow: hidden; margin: 2px 0 9px; }
.artbar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #8a4fc7, #c79bf0); transition: width .5s cubic-bezier(.2,.8,.2,1); }
.eff.big { font-size: .95rem; line-height: 1.35; margin-bottom: 7px; } .eff.big b { font-weight: 700; }
.eff .dim, .eff.big .dim { color: var(--ink2); font-style: italic; }
.card.art .acts { flex-wrap: wrap; } .card.art .acts .btn:first-child { flex: 1 0 100%; }
.grid2 em.art { display: block; font-style: normal; font-size: .72rem; color: #8a4fc7; font-weight: 600; }
.artproc { display: flex; align-items: center; gap: 7px; font-size: .86rem; font-weight: 600; color: #6b4a1a; background: #c9973a1f; border-radius: 10px; padding: 7px 10px; margin: 6px 0; box-shadow: inset 0 0 0 1px #c9973a4d; }
.artproc svg { width: 16px; height: 16px; color: #a8731f; }
.blog p.claws { color: #e0a0f0; font-weight: 600; } .fly.claws { color: #e0a0f0; font-size: 1.8rem; }

/* ================= v.0.0.9: снаряжение, ритуалы, чат, форум ================= */
.nav button { font-size: .66rem; }
.buffrow { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid #ffffff12; font-size: .88rem; }
.buffrow:last-child { border-bottom: 0; } .buffrow > svg { color: #b98cf5; } .buffrow span { flex: 1; min-width: 0; }
.buffrow small { color: var(--muted); font-variant-numeric: tabular-nums; }
.stat .info > b em.rite { color: #8a4fc7; }
.prices { display: flex; gap: 6px; margin: 8px 0 10px; }
.prices span { flex: 1; text-align: center; font-size: .72rem; color: var(--ink2); background: #7a643a14; border-radius: 9px; padding: 5px 2px; box-shadow: inset 0 0 0 1px #a08a5a40; }
.prices b { display: block; font-size: .95rem; color: var(--ink); }

/* снаряжение */
.cells { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.cells.worn { grid-template-columns: repeat(5, 1fr); }
.cellbox { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.cname { font-size: .62rem; color: var(--ink2); text-align: center; line-height: 1.1; height: 1.1em; overflow: hidden; }
.cell { position: relative; width: 100%; aspect-ratio: 1; border-radius: 12px; display: grid; place-items: center; color: var(--gold2);
  background: radial-gradient(circle at 30% 20%, #45391f, #17140c); box-shadow: inset 0 0 0 1px #8a6d2f, inset 0 0 8px #000a, 0 2px 6px #0007; transition: transform .1s, box-shadow .2s; }
.cell svg { width: 60%; height: 60%; filter: drop-shadow(0 1px 1px #000a); }
.cell:active { transform: scale(.93); }
.cell.empty { color: #6a5f44; background: #0000001f; box-shadow: inset 0 0 0 1px #a08a5a40; }
.cell.empty svg { width: 36%; height: 36%; }
.cell.trophy { box-shadow: inset 0 0 0 1px #b98cf5, inset 0 0 10px #4a2a7a, 0 2px 6px #0007; color: #d7b3ff; }
.cell.on { box-shadow: inset 0 0 0 2px #e6bf6a, 0 0 0 2px #e6bf6a66, 0 2px 8px #0008; }
.cell .lv { position: absolute; right: 3px; bottom: 2px; font-style: normal; font-size: .6rem; font-weight: 700; color: #e9dfc0; text-shadow: 0 1px 2px #000; }
.sheet { animation: rise .25s both; } .sheet .acts .btn { flex: 1; }

/* ритуалы */
.card.rite .foe-head b { font-family: var(--serif); font-weight: 400; font-size: 1.15rem; }
.card.rite.ready { box-shadow: 0 6px 16px #0007, inset 0 0 0 2px #8a4fc7, inset 0 0 24px #a0834a30; }
.card.rite.live { box-shadow: 0 6px 16px #0007, inset 0 0 0 2px var(--green), inset 0 0 24px #a0834a30; }
.card.rite .acts .btn:first-child { flex: 1; }
.story.sm { font-size: .88rem; margin: 2px 0 8px; }
.tier .cd { font-variant-numeric: tabular-nums; }

/* чат */
.msgs { display: flex; flex-direction: column; gap: 8px; padding-bottom: 8px; }
.msg { display: flex; gap: 8px; align-items: flex-end; }
.msg.me { flex-direction: row-reverse; }
.ava.sm { width: 32px; height: 32px; flex: none; box-shadow: 0 0 0 1px var(--gold), 0 0 0 2px #17140c; }
.bubble { max-width: 76%; padding: 7px 11px 5px; border-radius: 14px 14px 14px 4px; background: linear-gradient(170deg, #f5ecd5, #e0d1ab); color: var(--ink); box-shadow: 0 2px 8px #0005, inset 0 0 0 1px #fff6; }
.msg.me .bubble { border-radius: 14px 14px 4px 14px; background: linear-gradient(170deg, #e4d9bd, #cdbd93); }
.bubble b { display: block; font-size: .78rem; color: #7a6238; font-weight: 700; }
.bubble p { margin: 2px 0 0; font-size: .92rem; line-height: 1.35; word-break: break-word; }
.bubble time { display: block; text-align: right; font-size: .66rem; color: var(--ink2); margin-top: 1px; }
.lvl.sm { font-size: .6rem; padding: 1px 5px; margin-left: 4px; vertical-align: 1px; }
.sendbar { position: sticky; bottom: 0; display: flex; gap: 7px; padding: 8px 0 2px; background: linear-gradient(transparent, var(--bg) 24%); }
.sendbar input { flex: 1; min-width: 0; padding: 11px 14px; border-radius: 22px; border: 1px solid var(--line); background: var(--bg2); color: var(--text); outline: none; }
.sendbar input:focus { border-color: var(--gold); }
.sendbar .btn { width: 44px; padding: 0; border-radius: 50%; } .sendbar .btn svg { width: 20px; height: 20px; }

/* форум */
.row.topic .info b { font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.post .phead { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.post .phead b { flex: 1; min-width: 0; font-size: .92rem; }
.post .phead time { font-size: .72rem; color: var(--ink2); }
.post.mine { box-shadow: 0 6px 16px #0007, inset 0 0 0 2px #c9973a80, inset 0 0 24px #a0834a30; }
.ptext { margin: 0; font-size: .95rem; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
#topicForm input, #topicForm textarea, #postForm textarea { width: 100%; margin-bottom: 7px; padding: 10px 12px; border-radius: 11px; border: 1px solid var(--edge); background: #fffaf0; color: var(--ink); outline: none; font-family: inherit; resize: vertical; }
#topicForm input:focus, #topicForm textarea:focus, #postForm textarea:focus { border-color: var(--gold); }

/* бой: кнопка подробностей */
.battle .outcome { margin-top: 14px; }
.battle .outcome #bDetails { margin-top: 10px; }
.battle .blog { min-height: 120px; }

/* ================= v.0.1.0: друзья ================= */
.frow { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid #0000001a; }
.frow:last-child { border-bottom: 0; padding-bottom: 2px; } .frow:first-child { padding-top: 2px; }
.frow .info { flex: 1; min-width: 0; }
.frow .info b { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; font-size: .98rem; }
.frow .info small { display: flex; align-items: center; gap: 5px; color: var(--ink2); font-size: .76rem; }
.frow .col { gap: 4px; }
.notice.friends > svg { color: #86c07a; }
#friendForm .btn { white-space: nowrap; }

/* ================= v.0.1.1: меню списком вместо нижней панели ================= */
.nav { display: none; }
main { padding-bottom: 14px; }
.menu { margin: 18px -2px 0; }
.mgroup { border-radius: 14px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line), 0 3px 10px #0005; margin-bottom: 10px; background: linear-gradient(#20283a, #1a2030); }
.mgroup.main { background: linear-gradient(#262f42, #1d2433); box-shadow: inset 0 0 0 1px #3f4a66, 0 4px 12px #0006; }
.mrow { position: relative; display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; padding: 12px 13px; color: var(--text); font-size: 1rem;
  border-bottom: 1px solid #ffffff0f; transition: background .15s, transform .08s; }
.mrow:last-child { border-bottom: 0; }
.mrow:active { background: #ffffff12; transform: scale(.995); }
.mrow > svg:first-child { width: 20px; height: 20px; color: var(--gold2); }
.mrow span { flex: 1; min-width: 0; font-family: var(--serif); font-weight: 400; letter-spacing: .2px; }
.mrow > svg:last-child { width: 15px; height: 15px; color: #5a6378; }
.mrow.on { background: linear-gradient(90deg, #c9973a24, transparent); }
.mrow.on span { color: var(--gold2); }
.mrow.on::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--gold); }
.mrow .dot { position: static; margin-left: 2px; }
.foot { text-align: center; padding: 6px 0 4px; font-size: .74rem; color: #626a7c; line-height: 1.7; }
.foot .link { color: #8d93a3; }
.foot span { color: #4e5567; }
.sendbar { bottom: auto; position: static; background: none; padding: 8px 0 0; }

/* ================= v.0.1.2: лавка, клан, война ================= */
.seg.small button svg { width: 20px; height: 20px; vertical-align: -4px; }
.worncard { background: linear-gradient(170deg, #e8dcbe, #d4c39a); }
.worncard b.dim { color: var(--ink2); font-style: italic; font-weight: 400; }
.shopitem .foe-head { margin-bottom: 8px; } .shopitem .foe-head b { font-family: var(--serif); font-weight: 400; font-size: 1.1rem; }
.shopitem.low { filter: saturate(.6); } .shopitem.have { box-shadow: 0 6px 16px #0007, inset 0 0 0 2px #4c8648, inset 0 0 24px #a0834a30; }
.delta { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-bottom: 9px; font-size: .84rem; font-weight: 600; }
.delta .up { color: var(--green); } .delta .down { color: var(--red); } .delta .same { color: var(--ink2); font-weight: 400; }
.btn s { opacity: .55; font-weight: 400; margin-left: 2px; }
.ava.art.off { filter: grayscale(.85) brightness(.75); }
.ava.foe.big { width: 74px; height: 74px; margin: 0 auto 8px; display: grid; }
.card.war { box-shadow: 0 6px 16px #0007, inset 0 0 0 2px var(--red), inset 0 0 24px #a0834a30; }
.warscore { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 10px 0; }
.warscore div { flex: 1; text-align: center; padding: 8px 6px; border-radius: 12px; background: #0000000d; box-shadow: inset 0 0 0 1px #a08a5a40; }
.warscore div.me { box-shadow: inset 0 0 0 2px var(--gold); }
.warscore small { display: block; font-size: .72rem; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.warscore b { font-family: var(--serif); font-size: 1.6rem; font-weight: 400; }
.warscore > span { font-family: var(--serif); color: var(--ink2); }
.list .pl b small { display: block; font-weight: 400; color: var(--ink2); font-size: .74rem; }
.btn.red.sm { padding: 8px 11px; }

/* ================= v.0.1.3: война кланов и прорыв ================= */
.crest { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 8px; color: var(--gold2);
  background: radial-gradient(circle at 30% 20%, #45391f, #17140c); box-shadow: inset 0 0 0 1px #8a6d2f; }
.crest svg { width: 18px; height: 18px; }
.card .crest { color: #8a6418; background: #7a643a1f; box-shadow: inset 0 0 0 1px #a08a5a55; }
.cnt .ic { color: var(--gold2); }
.crests { display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; margin: 8px 0 4px; }
.crests .cell { border-radius: 9px; } .crests .cell svg { width: 55%; height: 55%; }
b.faded, .tag.faded { opacity: .5; filter: grayscale(1); }
.tag.faded { background: #8a8577; }

.sides { display: flex; gap: 8px; margin: 10px 0; }
.sidebar { flex: 1; min-width: 0; padding: 8px; border-radius: 12px; background: #0000000d; box-shadow: inset 0 0 0 1px #a08a5a40; }
.sidebar.me { box-shadow: inset 0 0 0 2px var(--gold); }
.sname { font-size: .74rem; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 5px; }
.defbar, .wallbar { height: 10px; border-radius: 5px; background: #0000001f; overflow: hidden; box-shadow: inset 0 0 0 1px #a08a5a40; }
.wallbar { height: 6px; margin-bottom: 3px; }
.defbar i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, #8f2f2a, #d9584c); transition: width .5s; }
.wallbar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #5c6472, #aab2c2); transition: width .5s; }
.defn { font-size: .82rem; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; }
.defn small { font-weight: 400; color: var(--ink2); }
.defn.dealt { font-weight: 400; font-size: .74rem; color: var(--ink2); }
.warlog { max-height: 180px; overflow-y: auto; margin-top: 2px; }
.warlog p { margin: 0; padding: 5px 0; font-size: .82rem; color: var(--ink2); border-bottom: 1px dashed var(--edge); }
.warlog p:last-child { border-bottom: 0; } .warlog p.me { color: var(--ink); font-weight: 600; }

.card.raid.hot { box-shadow: 0 6px 16px #0007, inset 0 0 0 3px var(--red), inset 0 0 30px #b5463c30; }
.raidbig { text-align: center; padding: 14px 0 16px; }
.raidbig svg { width: 34px; height: 34px; color: var(--ink2); }
.raidbig b { display: block; font-family: var(--serif); font-size: 1.7rem; font-weight: 400; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.raidbig span { font-size: .84rem; color: var(--ink2); }
.hitwrap { text-align: center; margin-bottom: 10px; }
.hitbtn { width: 100%; height: 130px; border-radius: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: linear-gradient(#3a3242, #221d29); color: #8d93a3; box-shadow: inset 0 0 0 2px #4a4356; transition: transform .08s, box-shadow .2s, background .2s; }
.hitbtn svg { width: 38px; height: 38px; } .hitbtn span { font-family: var(--serif); font-size: 1.4rem; letter-spacing: 1px; }
.hitbtn.on { background: linear-gradient(#d4584a, #9a2f26); color: #fff3ee; box-shadow: inset 0 0 0 2px #ff8d7c, 0 0 24px #b5463c88; animation: hotpulse .6s infinite; }
.hitbtn.on:active { transform: scale(.97); }
.hitbtn.done { background: linear-gradient(#35553a, #26402a); color: #a9d19f; box-shadow: inset 0 0 0 2px #4c8648; }
@keyframes hotpulse { 50% { box-shadow: inset 0 0 0 2px #ff8d7c, 0 0 38px #b5463c; } }
.hitbar { height: 7px; border-radius: 4px; background: #0000001f; overflow: hidden; margin: 8px 0 4px; box-shadow: inset 0 0 0 1px #a08a5a40; }
.hitbar i { display: block; height: 100%; background: linear-gradient(90deg, #d4584a, #f0a090); transition: width .25s linear; }
.hitn { font-size: .82rem; color: var(--ink2); font-variant-numeric: tabular-nums; }

/* ================= v.0.1.4: кузнец, пропуск, сравнение характеристик ================= */
.acts.two { margin-top: 10px; } .acts.two .btn { flex: 1; font-size: .9rem; padding: 10px 8px; }
.lookwrap { flex: 1; overflow-y: auto; margin-bottom: 10px; }
.lrow { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid #0000001a; }
.lrow:last-child { border-bottom: 0; }
.lrow.head { border-bottom: 1px solid #a08a5a55; padding-bottom: 10px; }
.lrow .lk { flex: 0 0 38%; text-align: center; font-size: .82rem; color: var(--ink2); display: flex; align-items: center; justify-content: center; gap: 5px; }
.lrow .lk svg { width: 15px; height: 15px; }
.lrow .lv { flex: 1; min-width: 0; font-family: var(--serif); font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.lrow .lv.r { text-align: right; }
.lrow .lv em { font-style: normal; font-family: var(--sans); font-size: .9rem; font-weight: 700; color: var(--green); margin-left: 1px; }
.lrow .lv.r em { color: var(--red); }
.lcol b { font-family: var(--serif); font-weight: 400; font-size: 1.05rem; }
.lcol { flex: 1; min-width: 0; } .lcol.foe { text-align: right; }
.lrow.head .lv i { color: var(--ink2); } .lrow.head .lv small { display: block; font-size: .74rem; color: var(--ink2); }
.lrow.head .lv.r { text-align: right; }

.sharp { font-family: var(--sans); font-weight: 700; font-size: .9rem; color: #1f8ba6; }
.card.superb { box-shadow: 0 6px 16px #0007, inset 0 0 0 2px #b98cf5, inset 0 0 26px #7b47c930; }
.lvls i.hot { background: #b5463c33; }
.grid2 b.bad { color: var(--red); }
.card.live { box-shadow: 0 6px 16px #0007, inset 0 0 0 2px var(--gold), inset 0 0 26px #a0834a40; }
.kv span svg { width: 15px; height: 15px; vertical-align: -3px; margin-right: 5px; color: var(--ink2); }
.delta .up { color: var(--ink); font-weight: 600; }

/* ===== v.0.1.6: восемь новых артефактов ===== */
.ava.art.viridian { background: radial-gradient(circle at 30% 25%, #3e6b3a, #122012); box-shadow: 0 0 0 2px #8fc87f, 0 0 0 4px #17140c, 0 0 0 5px #3c6334, 0 4px 10px #0008; }
.ava.art.corvus { background: radial-gradient(circle at 30% 25%, #4a4652, #16141a); box-shadow: 0 0 0 2px #b7aec4, 0 0 0 4px #17140c, 0 0 0 5px #514a5c, 0 4px 10px #0008; }
.ava.art.celesta { background: radial-gradient(circle at 30% 25%, #2f6a72, #0f1f23, #0f1f23); box-shadow: 0 0 0 2px #86d2dc, 0 0 0 4px #17140c, 0 0 0 5px #2e6168, 0 4px 10px #0008; }
.ava.art.morrava { background: radial-gradient(circle at 30% 25%, #2b6a52, #0e1f19); box-shadow: 0 0 0 2px #6fd4a8, 0 0 0 4px #17140c, 0 0 0 5px #2a6050, 0 4px 10px #0008; }
.ava.art.chevre { background: radial-gradient(circle at 30% 25%, #6b5330, #1e1710); box-shadow: 0 0 0 2px #e0bb7d, 0 0 0 4px #17140c, 0 0 0 5px #6a5330, 0 4px 10px #0008; }
.ava.art.durgan { background: radial-gradient(circle at 30% 25%, #74452a, #201309); box-shadow: 0 0 0 2px #e59a62, 0 0 0 4px #17140c, 0 0 0 5px #6e422a, 0 4px 10px #0008; }
.ava.art.niira { background: radial-gradient(circle at 30% 25%, #4b3a74, #15101f); box-shadow: 0 0 0 2px #b79ae8, 0 0 0 4px #17140c, 0 0 0 5px #4a3a70, 0 4px 10px #0008; }
.ava.art.tenebris { background: radial-gradient(circle at 30% 25%, #233150, #0b0e16); box-shadow: 0 0 0 2px #8aa6e0, 0 0 0 4px #17140c, 0 0 0 5px #27344f, 0 4px 10px #0008; }

/* рисованные иконки-картинки вместо линий */
img.ic { width: 1.25em; height: 1.25em; object-fit: contain; flex: none; vertical-align: -0.25em; }
.tile img.ic, .tile.big img.ic { width: 1.6em; height: 1.6em; vertical-align: -0.35em; }

/* ===== v.0.1.9: зелья, свитки, цены артефактов ===== */
.acts.col { flex-direction: column; gap: 8px; }
.acts.col .acts { width: 100%; }
.blog p.scrollhit { color: #c79bf0; font-weight: 600; }
.shopitem .acts .btn { font-size: .9rem; }

/* полотно главной: картина целиком, подпись под ней */
.hero-banner.art img.banner { height: auto; aspect-ratio: 900 / 334; object-fit: cover; }
.hero-banner.art .cap { position: static; padding: 11px 14px 12px;
  background: linear-gradient(#0c0e14, #0c0e14), #0c0e14; border-top: 1px solid #3b3320; }

/* ===== v.0.1.12: обменник, обсидиан, полотна разделов ===== */
.scene-art.pic { height: 112px; object-fit: cover; object-position: center; }
.scene:has(.scene-art.pic)::after { top: 78px; }
.curbtn { display: inline-flex; gap: 6px; background: none; border: 0; padding: 0; margin: 0; color: inherit; font: inherit; cursor: pointer; }
.curbtn:active { opacity: .7; }

/* ===== v.0.1.13: экраны боя в духе старой арены, аукцион, кузнец ===== */
.vsnames { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin: 2px 0 10px; text-align: center; }
.vsnames b { font-family: var(--serif); font-weight: 400; font-size: 1.05rem; color: var(--paper); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vsnames i { font-style: normal; font-weight: 800; font-size: .9rem; color: var(--gold); letter-spacing: .08em; }
.vsnames.sm b { font-size: .95rem; } .vsnames.sm i svg { width: 18px; height: 18px; color: var(--ink2); }
.vsport { display: flex; justify-content: center; gap: 48px; margin-bottom: 12px; }
.vsport .ava.big { width: 96px; height: 96px; border-radius: 12px; }
.vsport .ava.big svg { width: 56px; height: 56px; }
.vsstats { display: flex; flex-direction: column; gap: 4px; margin: 0 auto 8px; max-width: 300px; }
.vsrow { display: grid; grid-template-columns: 1fr 34px 1fr; align-items: center; }
.vsrow .l, .vsrow .r { font-family: var(--serif); font-size: 1.25rem; text-align: center; color: var(--paper); font-variant-numeric: tabular-nums; }
.vsrow .l em, .vsrow .r em { font-style: normal; font-family: var(--sans); font-size: .85rem; font-weight: 700; color: var(--green); margin-left: 2px; }
.vsrow .ic { display: flex; justify-content: center; } .vsrow .ic svg, .vsrow .ic img { width: 22px; height: 22px; }
.vsline { display: grid; grid-template-columns: 1fr 34px 1fr; align-items: center; max-width: 300px; margin: 0 auto 12px; text-align: center; font-family: var(--serif); font-size: 1.05rem; color: var(--paper); }
.vsline > svg, .vsline > img, .vsline > i { grid-column: 2; grid-row: 1; justify-self: center; width: 20px; height: 20px; color: #c5484a; }
.vsline > span:first-of-type { grid-column: 1; } .vsline > span:last-of-type { grid-column: 3; }
.vsline.pets { font-family: var(--sans); font-size: .9rem; color: var(--ink2); } .vsline.pets svg { color: var(--ink2); }
.vssub { text-align: center; color: var(--ink2); font-size: .9rem; margin: 10px 0 14px; }
.battle .brows { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.battle .brows .row { width: 100%; }
.outcome.txt { text-align: left; padding: 14px 16px; }
.outcome.txt .res { text-align: left; margin-bottom: 4px; }
.outcome .rh { margin-top: 12px; font-weight: 700; color: var(--ink2); font-size: .88rem; }
.outcome .rl { font-size: 1rem; line-height: 1.45; } .outcome .rl .cur { font-weight: 600; }
.bname { margin: 10px 0 8px; padding: 6px 14px; text-align: center; font-family: var(--serif); font-size: 1.05rem; color: #1a1408; background: linear-gradient(90deg, #a07a3a, #e2c272, #a07a3a); border-radius: 6px; }
.bside { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 8px; }
.bside .ava { width: 72px; height: 72px; flex: none; border-radius: 10px; } .bside .ava svg { width: 42px; height: 42px; }
.blist { flex: 1; display: flex; flex-direction: column; gap: 6px; padding-top: 4px; }
.bl { font-size: .95rem; line-height: 1.5; } .bl b { color: var(--paper); font-weight: 600; } .bl.none { color: var(--ink2); }
.bb { display: inline-flex; align-items: center; gap: 2px; margin-right: 8px; font-weight: 700; color: var(--green); }
.bb svg, .bb img { width: 15px; height: 15px; } .bb.none { color: var(--ink2); font-weight: 400; }
/* кузнец */
.sharptab { display: flex; flex-direction: column; gap: 3px; margin: 8px 0 10px; }
.srow { display: grid; grid-template-columns: 1fr 34px 18px 34px 1fr; align-items: center; font-size: .9rem; color: var(--ink2); }
.srow .sk { display: flex; align-items: center; gap: 5px; } .srow .sk svg, .srow .sk img { width: 15px; height: 15px; }
.srow .sv { text-align: center; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; } .srow .sv.up { color: var(--green); }
.srow .arr { text-align: center; } .srow small { text-align: right; font-size: .78rem; } .srow.grow small { color: var(--green); font-weight: 700; }
/* аукцион */
.slot.auc .info small { display: block; line-height: 1.35; }
.slot.auc.lead { box-shadow: inset 3px 0 0 var(--green); }
.slot .chip.strong { color: var(--green); }
.curbtn { padding: 8px 2px; margin: -8px 0; min-height: 34px; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }

/* экраны боя прокручиваются, если не влезают */
.battle { overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.battle > * { flex-shrink: 0; }
.battle .brows { padding-bottom: 20px; }
/* окна подтверждения: если текст длинный — тоже листаются, кнопки не уезжают за край */
.modal { overflow-y: auto; place-items: unset; overscroll-behavior: contain; }
.modal > .card { margin: auto 0; align-self: center; }
/* журнал боя в «Деталях»: можно отлистать к началу */
.blog { overflow-y: auto; max-height: 55vh; min-height: 160px; flex: none; }

/* ===== v.0.1.14: страницы кланов ===== */
.cpage { text-align: center; }
.cptitle { font-family: var(--serif); font-size: 1.35rem; color: var(--gold2); letter-spacing: .03em; margin: 4px 0 12px;
  display: flex; align-items: center; justify-content: center; gap: 10px; }
.cptitle::before, .cptitle::after { content: ''; width: 34px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.cptitle::after { transform: scaleX(-1); }
.cpcrest { width: 132px; height: 132px; margin: 0 auto 12px; border-radius: 14px; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 35%, #3a2a36, #12141c 75%); box-shadow: 0 0 0 2px var(--gold), 0 0 0 5px #17140c, 0 0 0 6px #6b5526, 0 8px 22px #000a; }
.cpcrest svg { width: 78px; height: 78px; color: var(--gold2); }
.motto { font-family: var(--serif); font-style: italic; font-size: 1.05rem; color: var(--paper); margin: 0 10px 12px; line-height: 1.35; }
.cinfo { text-align: left; }
.cinfo .ci { padding: 3px 0; font-size: .98rem; color: var(--ink); }
.cinfo .ci > span { color: var(--ink2); }
.cinfo .ci b { font-weight: 600; color: var(--ink); }
.cinfo .link, b.link { cursor: pointer; text-decoration: underline; text-decoration-color: #a0834a88; text-underline-offset: 3px; }
.list .clan-row { width: 100%; background: none; border: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.clan-row .crest.big svg { width: 34px; height: 34px; }
.crest.big { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 10px; background: #12141c; box-shadow: 0 0 0 1px #6b5526; flex: none; }
.pl.wrap { flex-wrap: wrap; }
.whyline { flex-basis: 100%; font-size: .78rem; color: #a5443b; padding-left: 44px; margin-top: -2px; }
.rulestext { white-space: pre-wrap; text-align: left; line-height: 1.45; color: var(--ink); }
form.stack { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
form.stack textarea { resize: vertical; min-height: 90px; }

/* ===== v.0.1.15: вещи с особыми свойствами ===== */
b.rare, .rare { color: #3f6fc4; }
.card b.rare { color: #2f5fb3; }
.perk { display: inline-flex; align-items: center; gap: 4px; font-size: .82rem; font-weight: 700; color: #7a4fc0; margin-top: 2px; }
.perk svg, .perk img.ic { width: 13px; height: 13px; }
span.bonus + .perk { display: flex; }
.battle .perk { color: #c9a3ff; }
.sharptab .perkrow { border-top: 1px dashed #a08a5a55; margin-top: 4px; padding-top: 6px; grid-template-columns: 1fr 50px 16px 50px 1fr; }
.sharptab .perkrow .sv { font-size: .82rem; white-space: nowrap; }
.sharptab .perkrow .sk { color: #7a4fc0; font-weight: 700; }

/* v.0.1.16: клан, профиль странника */
.list .pl .mbtns { display: flex; gap: 6px; flex-shrink: 0; }
.list .pl.wrap .mbtns { margin-left: auto; }
.list .pl .gifts { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: .85rem; flex-shrink: 0; }
.link { cursor: pointer; text-decoration: underline; text-decoration-color: #a0834a88; text-underline-offset: 3px; }
#clanTabs { margin-top: 16px; scroll-margin-top: 8px; }
#clanTabs .tag { font-size: .7rem; padding: 1px 6px; }
.pstats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 12px 0 4px; }
.pstats > div { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; border-radius: 10px; background: #0000000d; box-shadow: inset 0 0 0 1px #a08a5a40; }
.pstats .ic svg, .pstats .ic img { width: 22px; height: 22px; }
.pstats b { font-family: var(--serif); font-size: 1.05rem; color: var(--ink); }
.card.stats .kv span { color: var(--ink2); }

/* v.0.1.18: ссылки, войны */
.ctag { font-size: .78em; font-weight: 600; color: var(--gold, #b9862c); margin-left: 4px; text-decoration: none; }
.bubble .link, .phead .link { color: inherit; }
.wtable { margin: 12px 0 4px; border-top: 1px dashed #a08a5a55; }
.wtable .wrow { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; padding: 6px 2px; border-bottom: 1px dashed #a08a5a33; }
.wtable .wrow span { font-family: var(--serif); font-size: 1.05rem; color: var(--ink); }
.wtable .wrow span:last-child { text-align: right; }
.wtable .wrow small { color: var(--ink2); font-size: .78rem; text-align: center; }
.sidebar .wcrest { display: flex; justify-content: center; margin-bottom: 4px; }
.sidebar .wcrest svg, .sidebar .wcrest img { width: 40px; height: 40px; }
.sidebar .sallies { font-size: .75rem; color: var(--ink2); text-align: center; margin: -2px 0 4px; }
.sidebar.won .sname { color: #2f6b2a; }
.warrow b { min-width: 0; }
.chip.hot { background: #a3322a; color: #fff; }
.warlog p time { color: var(--ink2); font-size: .75rem; margin-right: 6px; }

/* v.0.1.22: поддержка */
#supportForm { margin-top: 10px; }
#supportForm textarea { width: 100%; resize: vertical; font: inherit; }
.list .pl.ticket b { min-width: 0; }
.list .pl.ticket .ttext { display: block; font-weight: 400; font-size: .85rem; color: var(--ink2); margin-top: 3px; white-space: pre-wrap; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* v.0.1.23: согласие при регистрации */
.auth .agree { display: flex; gap: 10px; align-items: flex-start; margin: 2px 4px 14px; font-size: .82rem; color: var(--muted); line-height: 1.35; }
.auth .agree input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--gold); flex: none; }
.auth .agree a { color: var(--gold2); }
