/* restyle:storm */
/* restyle:ink-gold */
/* Cabinet (me.html) and hero gallery (heroes.html). Tokens, header and footer come from site.css. */
*{box-sizing:border-box;margin:0}
html{-webkit-text-size-adjust:100%}
body{background:var(--ink);color:var(--bone);font-family:var(--sans);font-size:16px;line-height:1.6;min-height:100svh;overflow-x:hidden}
::selection{background:var(--light-soft);color:var(--bone)}
.grain{position:fixed;inset:0;z-index:60;pointer-events:none;opacity:.05;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E")}
.sky{position:fixed;top:0;left:0;right:0;height:340px;z-index:-1;pointer-events:none;background:linear-gradient(180deg,rgba(185,208,234,.07) 0%,rgba(126,154,168,.03) 45%,rgba(11,16,22,0) 100%)}
.shell{max-width:1080px;margin:0 auto;padding:0 28px 72px}
/* narrow screens of /me (sign-in, codes) narrow the content, not the column: the column keeps its box when the
   cabinet answer disagrees with the first frame (cookie without stored sign-in, or the other way round) */
.shell.narrow>*{max-width:464px;margin-left:auto;margin-right:auto}
.label{font-family:var(--mono);font-size:var(--mono-s);letter-spacing:.05em;color:var(--bone-faint)}
a{color:var(--light)}
:focus-visible{outline:1px solid var(--light);outline-offset:3px}
/* headings focused by script after a screen swap (me.js focusHead) need no ring */
h1[tabindex="-1"]:focus{outline:none}
h1{font-family:var(--disp);font-weight:400;font-size:var(--h1);line-height:1.02;margin:10px 0 14px;overflow-wrap:anywhere}
h2{font-family:var(--disp);font-weight:400;font-size:24px;line-height:1.2;margin:34px 0 14px}
.lead{color:var(--bone-dim);max-width:58ch}
.top-pad{padding-top:44px}
/* filled by script: the footer stays off the first screen while the page loads, then does not jump (CH-12, CH-20) */
#heroes,#me{min-height:100svh}
/* скелет загрузки: галерея, лист персонажа, кабинет */
.sk{border-radius:4px;background:linear-gradient(90deg,var(--ink-2) 0%,var(--ink-3) 50%,var(--ink-2) 100%);background-size:200% 100%;animation:skW 1.4s linear infinite}
@keyframes skW{to{background-position:-200% 0}}
@media(prefers-reduced-motion:reduce){.sk{animation:none}}
.sk-tile{aspect-ratio:3/4}
.sk-h1{height:40px;max-width:360px;margin:10px 0 14px}
.sk-line{height:14px;margin:12px 0;max-width:62%}
.sk-line:nth-child(2n){max-width:44%}
.sk-sheet{display:grid;grid-template-columns:280px minmax(0,1fr);gap:28px;margin-top:22px}
@media(max-width:720px){.sk-sheet{grid-template-columns:minmax(0,1fr)}.sk-sheet .sk-tile{max-width:240px}}
.muted,.hc-muted{color:var(--bone-faint);font-size:15px}
[hidden]{display:none!important}
@media(max-width:720px){.shell{padding:0 16px 56px}.shell.narrow>*{max-width:488px}h2{font-size:22px;margin-top:28px}}

/* ─── формы ─── */
.f{display:grid;gap:14px;margin-top:22px}
.f label{display:grid;gap:6px}
.f label>span{font-family:var(--mono);font-size:var(--mono-s);letter-spacing:.05em;color:var(--bone-dim)}
.f label>small{color:var(--bone-faint);font-size:13.5px;line-height:1.45}
.f label>small.f-cnt{justify-self:end;margin-top:-2px;font-family:var(--mono);font-size:13px;letter-spacing:.05em;font-variant-numeric:tabular-nums}
.f input,.f textarea,.f select{width:100%;min-height:46px;padding:10px 14px;border:1px solid var(--rule-2);border-radius:var(--btn-r);background:var(--ink-2);color:var(--bone);font:inherit;font-size:16px}
.f textarea{min-height:110px;resize:vertical;line-height:1.5}
.f input:focus,.f textarea:focus,.f select:focus{outline:none;border-color:var(--light)}
.f input[readonly],.f select:disabled,.f input:disabled{opacity:.6;cursor:not-allowed}
.f .row{display:grid;grid-template-columns:1fr 1fr;gap:14px}
@media(max-width:560px){.f .row{grid-template-columns:1fr}}
.f .acts{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-top:6px}
.err{color:var(--fallen);font-size:14.5px;min-height:1.4em}
.ok-t{color:var(--ok);font-size:14.5px}
.tabs{display:flex;gap:6px;margin-top:26px;border-bottom:1px solid var(--rule)}
.tabs button{min-height:44px;padding:0 14px;background:none;border:none;border-bottom:2px solid transparent;color:var(--bone-dim);font-family:var(--mono);font-size:var(--mono-s);letter-spacing:.05em;cursor:pointer}
.tabs button[aria-selected=true]{color:var(--bone);border-bottom-color:var(--light)}
.linkbtn{background:none;border:none;padding:0;min-height:44px;color:var(--bone-faint);font:inherit;font-size:14.5px;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.linkbtn:hover{color:var(--bone-dim)}
.btn[disabled],.btn-ghost[disabled]{opacity:.5;cursor:progress}
.btn.danger{background:transparent;color:var(--fallen);border-color:rgba(196,116,76,.45)}
.btn-ghost.danger{color:var(--fallen);border-color:rgba(196,116,76,.45)}

/* ─── коды восстановления ─── */
.codes{display:grid;grid-template-columns:repeat(2,1fr);gap:8px;margin:18px 0;padding:16px;border:1px dashed var(--rule-2);border-radius:4px;font-family:var(--mono);font-size:15px;letter-spacing:.03em;color:var(--light)}
.codes span{padding:4px 0}

/* ─── профиль ─── */
.prof{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:16px;padding-top:44px}
.hs-crumb+.prof{padding-top:14px}
.prof>.btn-ghost{min-height:40px;padding:0 16px;font-size:14px}
.prof .meta{display:flex;flex-wrap:wrap;gap:8px 18px;color:var(--bone-dim);font-size:14.5px}
.prof .meta b{color:var(--bone);font-weight:500}
.chips{display:flex;flex-wrap:wrap;gap:8px}
.chip{display:inline-flex;align-items:center;gap:6px;min-height:40px;padding:0 12px;border:1px solid var(--rule-2);border-radius:3px;font-family:var(--mono);font-size:var(--mono-s);letter-spacing:.03em;color:var(--bone-dim);text-decoration:none}
.chip.hot{color:var(--light);border-color:rgba(185,208,234,.4)}
.chip.gm-new{color:var(--light);border-color:rgba(185,208,234,.4)}
.chip.gm-new::before{content:"";width:8px;height:8px;border-radius:50%;background:var(--fallen);flex:none}
.chip[hidden]{display:none}
.panel{margin-top:22px;padding:22px;border:1px solid var(--rule);border-radius:4px;background:var(--ink-2)}
.panel>h2:first-child{margin-top:0}
/* «Что открыто сейчас» in the cabinet: a link and one plain line per place (me.js openNow) */
.me-open{list-style:none;margin:0;padding:0}
.me-open li{display:flex;flex-wrap:wrap;align-items:center;gap:0 14px;border-top:1px solid var(--rule)}
.me-open li:first-child{border-top:0}
.me-open a{display:inline-flex;align-items:center;min-height:44px;min-width:8em;color:var(--light);font-weight:500}
.me-open span{flex:1 1 18em;min-width:0;padding:0 0 10px;color:var(--bone-dim);font-size:14.5px;overflow-wrap:anywhere}
@media(min-width:721px){.me-open span{padding:0}}
.me-next{margin:0 0 12px}
.me-next a{color:var(--light)}
@media(max-width:560px){.panel{padding:16px}}

/* ─── галерея ─── */
.hc-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:18px;margin-top:22px}
@media(max-width:480px){.hc-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}}
.hc-tile{position:relative;display:flex;flex-direction:column;border:1px solid var(--rule);border-radius:4px;background:var(--ink-2);overflow:hidden;transition:border-color .3s var(--ease),transform .3s var(--ease)}
.hc-tile:hover{border-color:var(--rule-2);transform:translateY(-2px)}
.hc-tile.pinned{border-color:rgba(185,208,234,.35)}
.hc-tile .hc-link{display:block}
.hc-pic{position:relative;aspect-ratio:3/4;background:var(--ink-3);overflow:hidden}
.hc-pic img{width:100%;height:100%;object-fit:cover;display:block}
.hc-pic.empty{display:grid;place-items:center;background:radial-gradient(120% 90% at 50% 20%,var(--ink-3),var(--ink-2))}
.hc-pic.empty span{font-family:var(--disp);font-size:64px;color:var(--bone-faint);opacity:.55}
.hc-rank{position:absolute;top:10px;left:10px;display:inline-flex;align-items:flex-start;justify-content:center;gap:1px;min-width:34px;height:38px;padding:6px 6px 0;
  background:#B9D0EA;color:#1A1206;font-family:var(--disp);font-weight:700;font-size:19px;line-height:1;clip-path:polygon(0 0,100% 0,100% 72%,50% 100%,0 72%);box-shadow:0 2px 10px rgba(0,0,0,.4)}
.hc-rank i{font-style:normal;font-family:var(--mono);font-size:13px;font-weight:500;margin-top:1px}
.hc-flag{position:absolute;top:12px;right:10px;padding:3px 8px;border-radius:3px;background:rgba(11,16,22,.82);border:1px solid var(--rule-2);font-family:var(--mono);font-size:13.5px;letter-spacing:.03em;color:var(--bone-dim)}
.hc-cap{display:grid;gap:2px;padding:12px 14px 14px}
.hc-cap b{font-family:var(--disp);font-weight:400;font-size:19px;line-height:1.2;color:var(--bone)}
.hc-cap small{color:var(--bone-faint);font-size:13.5px;line-height:1.35}
.hc-own{display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px;margin-top:6px;font-size:13.5px}
/* тап-зона 40px без сдвига строки: отступ внутрь, отрицательный margin наружу */
.hc-who,.hc-vk{display:inline-block;padding:10px 0;margin:-10px 0}
.hc-who{color:var(--bone-dim);text-decoration:underline;text-decoration-color:var(--rule-2);text-underline-offset:4px}
.hc-who:hover{color:var(--light)}
.hc-who.free{border:none;color:var(--bone-faint)}
.hc-vk{font-family:var(--mono);font-size:14px;letter-spacing:.03em;color:var(--light);text-decoration:none}
/* кнопки кабинета прижаты к низу карточки: в соседних карточках они на одной высоте */
.hc-tile .hc-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:auto;padding:0 10px 12px}
.hc-tile .hc-actions button{flex:1 1 100%;min-height:40px;min-width:0;padding:0 10px}
.hc-tile .hc-actions [data-pin] span{font-size:15px;letter-spacing:0}
#me .hc-own{display:none}
.hc-tile .hc-actions [data-pin][aria-pressed=true]{color:#B9D0EA;border-color:rgba(185,208,234,.5)}
.hc-new{display:grid;place-items:center;align-content:center;gap:10px;min-height:260px;border:1px dashed var(--rule-2);border-radius:4px;background:none;color:var(--bone-dim);font:inherit;cursor:pointer;transition:border-color .3s,color .3s}
.hc-new:hover{border-color:var(--light);color:var(--light)}
.hc-new b{font-family:var(--disp);font-weight:400;font-size:20px}
.filters{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-top:22px}
.filters input{flex:1;min-width:180px;min-height:44px;padding:0 14px;border:1px solid var(--rule-2);border-radius:var(--btn-r);background:var(--ink-2);color:var(--bone);font:inherit}
.filters button{min-height:44px}
.filters button[aria-pressed=true]{border-color:var(--light);color:var(--light)}

/* ─── карточка ─── */
.hc-card{display:grid;grid-template-columns:minmax(220px,340px) 1fr;gap:40px;padding-top:44px}
.hc-side{position:relative;align-self:start;position:sticky;top:80px}
.hc-pic.big{border-radius:4px;border:1px solid var(--rule-2)}
.hc-side .hc-rank{top:14px;left:14px;min-width:44px;height:50px;font-size:25px}
.hc-side .hc-rank i{font-size:12px}
.hc-main h1{margin-top:6px}
.hc-own.big{font-size:15px;color:var(--bone-faint);margin:0 0 18px}
.hc-bar{margin:6px 0 20px}
.hc-bar-t{display:flex;flex-wrap:wrap;justify-content:space-between;gap:4px 12px;font-size:14.5px;color:var(--bone-dim)}
.hc-bar-t b{font-family:var(--mono);font-weight:500;color:var(--bone)}
.hc-track{height:6px;margin-top:8px;border-radius:99px;background:var(--ink-3);overflow:hidden}
.hc-track i{display:block;height:100%;border-radius:inherit;background:var(--light);transition:width .8s var(--ease)}
.hc-bar.ready .hc-track i{background:#B9D0EA}
.hc-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}
.hc-stat{display:grid;justify-items:center;gap:2px;padding:12px 6px;border:1px solid var(--rule);border-radius:4px;background:var(--ink-2)}
.hc-stat b{font-family:var(--disp);font-size:24px;font-weight:400;line-height:1.1}
.hc-stat span{font-family:var(--mono);font-size:13.5px;letter-spacing:.05em;color:var(--bone-faint)}
.hc-traits{list-style:none;padding:0;display:flex;flex-wrap:wrap;gap:8px}
.hc-traits li{max-width:100%;padding:6px 12px;border:1px solid var(--rule-2);border-radius:3px;font-size:14.5px;color:var(--bone-dim)}
.hc-about p+p{margin-top:12px}
.hc-about{color:var(--bone-dim);max-width:62ch}
.hc-links{display:flex;flex-wrap:wrap;gap:10px;margin-top:22px}
.hc-log{list-style:none;padding:0;display:grid;border-top:1px solid var(--rule)}
.hc-log li{display:grid;grid-template-columns:64px 1fr auto;gap:12px;align-items:baseline;padding:10px 0;border-bottom:1px solid var(--rule);font-size:14.5px}
.hc-log .d{font-family:var(--mono);font-size:15px;color:var(--bone-faint)}
.hc-log .w{color:var(--bone-dim)}
.hc-log .w small{color:var(--bone-faint);font-family:var(--mono);font-size:14.5px}
.hc-log b{font-family:var(--mono);font-weight:500;color:var(--ok)}
.hc-log b.neg{color:var(--fallen)}
@media(max-width:820px){
  .hc-card{grid-template-columns:1fr;gap:22px;padding-top:24px}
  .hc-side{position:relative;top:0;max-width:300px}
}
@media(max-width:420px){.hc-stats{grid-template-columns:repeat(2,1fr)}.hc-side{max-width:none}}

/* ─── редактор персонажа ─── */
dialog.ed{margin:auto;width:min(720px,calc(100vw - 24px));max-height:calc(100svh - 24px);padding:0;border:1px solid var(--rule-2);border-radius:4px;background:var(--ink);color:var(--bone)}
dialog.ed::backdrop{background:rgba(5,8,12,.72);backdrop-filter:blur(3px)}
.ed-hd{position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 18px;border-bottom:1px solid var(--rule);background:var(--ink)}
.ed-hd b{font-family:var(--disp);font-weight:400;font-size:20px}
.ed-x{display:grid;place-items:center;width:44px;height:44px;border:none;background:none;color:var(--bone-dim);cursor:pointer;font-size:22px}
.ed-bd{padding:4px 18px 20px}
.ed-pic{display:grid;grid-template-columns:120px 1fr;gap:16px;align-items:center;margin-top:18px}
.ed-pic .hc-pic{border-radius:4px;border:1px solid var(--rule-2)}
.ed-pic .hc-pic.empty span{font-size:40px}
.ed-pic label.btn-ghost{cursor:pointer}
.ed-pic input[type=file]{position:absolute;width:1px;height:1px;opacity:0}
.lock{font-size:13.5px;color:var(--bone-faint)}
.pin{display:flex!important;grid-template-columns:none!important;align-items:center;gap:10px!important;min-height:44px}
.pin input{width:20px!important;min-height:20px!important;height:20px;accent-color:var(--light)}
.pin>span{text-transform:none!important;letter-spacing:0!important;font-family:var(--sans)!important;font-size:15px!important;color:var(--bone)!important}

/* ─── заявки и ранг ─── */
.claims{list-style:none;padding:0;display:grid;gap:8px}
.claims li{display:flex;flex-wrap:wrap;justify-content:space-between;gap:4px 12px;padding:10px 14px;border:1px solid var(--rule);border-radius:4px;font-size:14.5px;color:var(--bone-dim)}
.claims .st{font-family:var(--mono);font-size:14.5px;letter-spacing:.03em;}
.claims .st.open{color:var(--light)}.claims .st.approved{color:var(--ok)}.claims .st.returned{color:var(--fallen)}
.rankbox{display:grid;gap:10px;margin-top:14px;padding:16px;border:1px solid rgba(185,208,234,.45);border-radius:4px;background:rgba(185,208,234,.06)}
.rankbox p{color:var(--bone-dim);font-size:15px}
.rankbox .acts{display:flex;flex-wrap:wrap;gap:10px}
/* a long own-skill name without spaces wraps inside the box, not past the editor (CH-21) */
.skbox{overflow-wrap:anywhere}
.sk-hint{margin:14px 0 -4px;font-size:14px}
.skbox ul{list-style:none;padding:0;margin:0;display:grid;gap:6px;font-size:15px}
.skbox li b{color:var(--bone);font-weight:500}
.empty-state{margin-top:22px;padding:28px;border:1px dashed var(--rule-2);border-radius:4px;color:var(--bone-dim);text-align:center}

/* ─── досье персонажа (hero-dossier.js) ─── */
.hd-tag{margin:2px 0 10px;font-style:italic;color:var(--light)}
.hd-status{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 12px;margin:0 0 18px;padding:12px 14px;border:1px solid var(--rule-2);border-radius:4px;background:var(--ink-2);color:var(--bone)}
.hd-status .cap{font-family:var(--mono);font-size:14px;letter-spacing:.05em;color:var(--bone-faint)}
.hd-sec{margin-top:30px}
.hd-sec h3,.hs-pan h3{margin:16px 0 8px;font-family:var(--mono);font-size:15px;font-weight:500;letter-spacing:.05em;color:var(--bone-faint)}
.hd-story{max-width:62ch;color:var(--bone-dim)}
.hd-story p+p{margin-top:12px}
.hd-src{margin-left:4px;font-family:var(--mono);font-size:14px;color:var(--bone-faint);white-space:nowrap}
.hd-list,.hd-ach,.hd-links,.hd-branches{list-style:none;padding:0;margin:0;display:grid;gap:8px}
.hd-list li{color:var(--bone-dim);line-height:1.5}
.hd-list b{color:var(--bone);font-weight:500}
.hd-branches li{padding:10px 14px;border:1px solid var(--rule);border-left:3px solid var(--rule-2);border-radius:4px}
.hd-branches li.on{border-left-color:var(--light)}
.hd-branches li.pause{border-left-color:#B9D0EA}
.hd-branches li span{margin-left:10px;font-family:var(--mono);font-size:14px;letter-spacing:.05em;color:var(--bone-faint)}
.hd-branches p,.hd-ach p,.hd-links p{margin:4px 0 0;color:var(--bone-dim);font-size:14.5px}
.hd-ach{grid-template-columns:repeat(auto-fill,minmax(200px,1fr))}
.hd-ach li{position:relative;padding:12px 14px 12px 44px;border:1px solid rgba(185,208,234,.35);border-radius:4px;background:rgba(185,208,234,.06)}
.hd-ach b{color:#D3E2F3;font-weight:500}
.hd-quote{margin:0 0 10px;padding:4px 0 4px 16px;border-left:2px solid var(--light);font-style:italic;color:var(--bone);max-width:62ch}
.hd-deeds{margin:0;padding-left:22px;display:grid;gap:8px;color:var(--bone-dim);max-width:66ch}
.hd-links li{display:grid;grid-template-columns:44px 1fr;gap:12px;align-items:start;padding:12px 0;border-bottom:1px solid var(--rule)}
.hd-links img,.hd-links li>i{width:44px;height:44px;border-radius:50%;object-fit:cover;border:1px solid var(--rule-2)}
.hd-links li>i{display:grid;place-items:center;font-style:normal;font-family:var(--disp);color:var(--bone-faint);background:var(--ink-3)}
.hd-links a,.hd-links b{color:var(--bone);font-weight:500}
/* спектр доверия: от врага (красный) через знакомого (серый) к близким (золото) */
.lv0{--lv:#D0584A}.lv1{--lv:var(--fallen)}.lv2{--lv:var(--bone-faint)}.lv3{--lv:var(--ok)}.lv4{--lv:var(--light)}.lv5{--lv:#D3E2F3}
.hd-web{position:relative;max-width:560px;aspect-ratio:440/240;margin:18px auto 6px}
.hd-web svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
.hd-wedge{fill:var(--lv);opacity:.035}
.hd-web g.on .hd-wedge{opacity:.09}
.hd-band{fill:none;stroke:var(--lv);stroke-width:5;stroke-linecap:round;opacity:.35}
.hd-web g.on .hd-band{opacity:1}
.hd-lvl{fill:var(--lv);opacity:.5;font-family:var(--sans);font-size:12.5px}
.hd-web g.on .hd-lvl{opacity:1;font-weight:600}
.hd-end{fill:var(--lv);opacity:.7;font-family:var(--sans);font-size:12.5px}
.hd-spokes line{stroke:var(--lv);stroke-width:1.5;opacity:.6}
.hd-spokes line.lv0,.hd-spokes line.lv1{stroke-dasharray:4 4}
.hd-node{position:absolute;width:calc(10.9% * var(--s,1));aspect-ratio:1;transform:translate(-50%,-50%);border-radius:50%;border:2px solid var(--lv);background:var(--ink-3);box-shadow:0 0 0 3px var(--ink);transition:transform .2s var(--ease)}
/* the portrait fills the node out of flow: the node stays a square from aspect-ratio in every engine
   (WebKit lets an in-flow img stretch it into an oval) */
.hd-node img,.hd-node i{position:absolute;inset:0;width:100%;height:100%;border-radius:50%;object-fit:cover;display:grid;place-items:center;font-style:normal;font-family:var(--disp);color:var(--bone-faint)}
.hd-node.lv5{box-shadow:0 0 0 3px var(--ink),0 0 18px rgba(227,178,106,.45)}
.hd-me{width:14%;border-color:#B9D0EA}
/* no native button skin, tap flash or square focus outline: the ring is a round box-shadow */
button.hd-node{padding:0;cursor:pointer;-webkit-appearance:none;appearance:none;-webkit-tap-highlight-color:transparent;outline:none}
button.hd-node:focus-visible{box-shadow:0 0 0 3px var(--ink),0 0 0 5px var(--light)}
button.hd-node:hover,button.hd-node:focus-visible,button.hd-node[aria-pressed="true"]{transform:translate(-50%,-50%) scale(1.12);z-index:2}
button.hd-node[aria-pressed="true"]{box-shadow:0 0 0 3px var(--ink),0 0 0 5px var(--lv)}
.hd-node[data-tip]::after{content:attr(data-tip);position:absolute;left:50%;top:calc(100% + 6px);transform:translateX(-50%);padding:3px 8px;border-radius:6px;background:var(--ink-2);border:1px solid var(--rule-2);font-size:12.5px;color:var(--bone);white-space:nowrap;opacity:0;pointer-events:none;transition:opacity .15s}
.hd-node:hover::after,.hd-node:focus-visible::after{opacity:1}
.hd-chips{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin:14px 0 18px}
.hd-chip{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:4px 12px 4px 4px;border-radius:3px;border:1px solid var(--rule-2);background:transparent;color:var(--bone);font:inherit;cursor:pointer;text-align:left}
.hd-chip img,.hd-chip i{width:34px;height:34px;border-radius:50%;object-fit:cover;border:2px solid var(--lv);display:grid;place-items:center;font-style:normal;font-family:var(--disp);color:var(--bone-faint);background:var(--ink-3)}
.hd-chip span{display:grid;line-height:1.15}
.hd-chip b{font-weight:600;font-size:14px}
.hd-chip small{font-size:12px;color:var(--lv)}
.hd-chip:hover{border-color:var(--lv)}
.hd-chip[aria-pressed="true"]{border-color:var(--lv);background:color-mix(in srgb,var(--lv) 12%,transparent)}
.hd-pair{max-width:620px;margin:0 auto;padding:18px 20px;border:1px solid var(--rule);border-top:3px solid var(--lv);border-radius:4px;background:var(--ink-2)}
.hd-pair-hd{display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px}
.hd-duo{display:inline-flex}
.hd-duo img,.hd-duo i{width:40px;height:40px;border-radius:50%;object-fit:cover;border:2px solid var(--ink-2);display:grid;place-items:center;font-style:normal;font-family:var(--disp);color:var(--bone-faint);background:var(--ink-3)}
.hd-duo>*+*{margin-left:-12px}
.hd-pair h4{flex:1 1 auto;margin:0;font-family:var(--disp);font-weight:400;font-size:22px;color:var(--bone)}
.hd-pair-hd a{font-size:14px;color:var(--light);text-decoration:none;min-height:44px;display:inline-flex;align-items:center}
.hd-pair-hd a:hover{color:var(--light-hi)}
.hd-pair-v{list-style:none;margin:14px 0 0;padding:0;display:grid;gap:14px}
.hd-pair-v li{padding-left:14px;border-left:2px solid var(--lv)}
.hd-pair-v div{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 10px;font-size:14.5px}
.hd-pair-v span{font-weight:600;color:var(--bone)}
.hd-pair-v b{color:var(--lv);font-weight:600}
.hd-pair-v em{font-style:normal;font-size:13px;color:var(--bone-faint)}
.hd-pair-v p{margin:4px 0 0;line-height:1.5;color:var(--bone-dim)}
.hd-ev{list-style:none;margin:8px 0 0;padding:0;display:grid;gap:4px;font-size:14px;line-height:1.45;color:var(--bone-dim)}
.hd-ev b{font-weight:600}
.hd-ev .up b{color:var(--ok)}.hd-ev .down b{color:#D0584A}
@media(max-width:520px){.hd-lvl,.hd-end{font-size:15px}.hd-node{width:calc(12.5% * var(--s,1))}.hd-node[data-tip]::after{display:none}.hd-pair{padding:16px}}
.hd-vk{border:1px solid var(--rule);border-radius:4px;background:var(--ink-2);margin-top:12px}
.hd-vk summary{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 12px;min-height:52px;padding:14px 18px;cursor:pointer;list-style:none}
.hd-vk summary::-webkit-details-marker{display:none}
.hd-vk summary::after{content:"+";margin-left:auto;font-family:var(--mono);color:var(--bone-faint)}
.hd-vk[open] summary::after{content:"\2212"}
.hd-vk summary span{font-family:var(--disp);font-size:20px;color:var(--bone)}
.hd-vk summary small{font-family:var(--mono);font-size:14px;letter-spacing:.03em;color:var(--bone-faint)}
.hd-vk-post{padding:4px 18px 18px;white-space:pre-wrap;overflow-wrap:anywhere;max-width:72ch;font-size:15px;line-height:1.6;color:var(--bone-dim)}
.hd-vk-post+.hd-vk-post{border-top:1px dashed var(--rule);padding-top:16px}
.hd-vk-h{display:block;margin:14px 0 2px;font-family:var(--mono);font-size:15px;font-weight:500;letter-spacing:.05em;color:var(--light)}
.hd-vk-post>.hd-vk-h:first-child{margin-top:0}
.hd-kind{margin-left:10px;padding:2px 8px;border:1px solid var(--rule-2);border-radius:3px;font-family:var(--mono);font-size:14px;letter-spacing:.03em;color:var(--bone-faint)}
.hd-now{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:8px;margin:0}
.hd-now div{padding:10px 12px;border:1px solid var(--rule);border-radius:4px}
.hd-now dt{font-family:var(--mono);font-size:14px;letter-spacing:.05em;color:var(--bone-faint)}
.hd-now dd{margin:4px 0 0;color:var(--bone)}
.hd-anketa{margin-top:30px;padding:14px 16px;border:1px solid var(--rule-2);border-radius:4px}
.hd-anketa summary{cursor:pointer;font-family:var(--mono);font-size:15px;letter-spacing:.05em;color:var(--light);min-height:28px;display:flex;align-items:center}
.hd-anketa[open] summary{margin-bottom:8px}
.hd-role{color:var(--bone)}
@media(max-width:420px){.hd-ach{grid-template-columns:1fr}.hd-now{grid-template-columns:1fr 1fr}}
.hd-ach .seal{position:absolute;left:12px;top:10px;width:24px;height:24px;display:grid;place-items:center;border-radius:50%;background:#B9D0EA;color:var(--ink);font-size:13px}
.hd-sec h3 small,.hs-pan h3 small{margin-left:6px;text-transform:none;letter-spacing:0;font-family:var(--sans);font-size:12px;color:var(--bone-faint)}
.hd-skill{display:grid;gap:2px;padding:10px 12px;border:1px solid var(--rule);border-radius:4px}
.hd-skill b{color:var(--bone);font-weight:500}
.hd-skill span{color:var(--bone-dim);font-size:14.5px}

/* ─── лист персонажа (hero-sheet.js) ─── */
.hs-crumb{padding-top:18px}
.hs-crumb a{display:inline-flex;align-items:center;min-height:40px;font-family:var(--mono);font-size:var(--mono-s);letter-spacing:.05em;color:var(--bone-dim);text-decoration:none}
.hs-crumb a:hover{color:var(--light)}
/* the neighbours of the list the reader came from, on the same line as the way back */
.hs-crumb{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:0 24px}
.hs-pn{display:flex;gap:0 24px;min-width:0}
.hs-pn a{min-width:0;gap:6px}
.hs-pn a span{max-width:22ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media (max-width:640px){.hs-pn a span{max-width:12ch}}
.hs-ncount{margin:6px 0 0;font-family:var(--mono);font-size:13px;letter-spacing:.05em;color:var(--bone-faint);text-align:right;font-variant-numeric:tabular-nums}
/* overflow-wrap:anywhere: a word with no break (a 24-letter nick, text pasted without spaces) widened the sheet past the screen */
.hs{display:grid;grid-template-columns:minmax(250px,330px) 1fr;gap:40px;padding-top:14px;overflow-wrap:anywhere}
.hs-side{align-self:start;position:sticky;top:76px;display:grid;gap:14px;max-height:calc(100vh - 92px);overflow:auto;scrollbar-width:thin}
.hs-portrait{position:relative}
/* колонка листа влезает в экран без прокрутки: портрет ужимается по высоте экрана, кадр держит лицо */
.hs-portrait .hc-pic.big{max-height:max(260px,calc(100vh - 470px))}
.hs-portrait .hc-pic.big img{object-position:50% 18%}
.hs-portrait .hc-rank{top:14px;left:14px;min-width:44px;height:50px;font-size:25px}
.hs-portrait .hc-rank i{font-size:12px}
.hs .cap{font-family:var(--mono);font-size:14px;letter-spacing:.05em;color:var(--bone-faint)}
.hs-pips{display:flex;flex-wrap:wrap;gap:5px}
.hs-pips i{width:16px;height:16px;border-radius:50%;border:1.5px solid var(--rule-2)}
.hs-pips.hp i{border-radius:4px;transform:rotate(45deg) scale(.82)}
.hs-pips.hp i.on{background:#C2554D;border-color:#C2554D;box-shadow:0 0 8px rgba(194,85,77,.45)}
.hs-pips.cell i.on{background:var(--light);border-color:var(--light);box-shadow:0 0 8px rgba(185,208,234,.45)}
.hs-acts{display:flex;flex-wrap:wrap;gap:8px}
.hs-acts .btn-ghost{min-height:40px;padding:0 16px;font-size:14px}
.hs-main{min-width:0}
.hs-main h1{margin-top:6px}
.hs-own{margin:0 0 16px;color:var(--bone-faint);font-size:15px}
.hs-own .free{color:var(--bone-dim)}
.hs-quote{position:relative;display:flex;flex-direction:column;margin:0 0 20px;padding:14px 18px 14px 44px;border-radius:4px;background:var(--ink-2)}
.hs-quote.none blockquote{font-family:var(--sans);font-size:15px;font-style:normal;color:var(--bone-dim)}
/* the row of quote actions sits on the floor of the held box: a shorter quote no longer pulls «ещё цитата» up */
.hs-qrow{display:flex;flex-wrap:wrap;align-items:center;gap:0 18px;margin-top:auto;padding-top:8px}
.hs-qrow .hs-more{margin-top:0}
.hs-qn{font-family:var(--mono);font-size:14px;letter-spacing:.05em;color:var(--bone-faint);font-variant-numeric:tabular-nums}
.hs-qn:empty{display:none}
.hs-qform{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;margin-top:8px}
.hs-qform[hidden]{display:none}
.hs-qform input{flex:1 1 240px;min-width:0;min-height:40px;padding:0 12px;border:1px solid var(--rule-2);border-radius:4px;background:var(--ink);color:var(--bone);font:inherit;font-size:16px}
.hs-qform input:focus-visible{outline:2px solid var(--light);outline-offset:1px}
.hs-qform .btn-ghost{min-height:40px;padding:0 16px;font-size:14px}
.hs-quote::before{content:"\201C";position:absolute;left:12px;top:-2px;font-family:var(--disp);font-size:52px;color:var(--light);opacity:.5}
.hs-quote blockquote{margin:0;font-family:var(--disp);font-size:19px;line-height:1.45;font-style:italic;color:var(--bone)}
.f small.warn{display:block;margin-top:6px;color:var(--ember-hi)}
.hs-qsrc{margin-top:8px;font-family:var(--mono);font-size:13px;letter-spacing:.05em;color:var(--bone-faint)}
.hs-qsrc:empty{display:none}
/* where the hero is, when it is not a link (a place the world map does not know, or not known yet): plain status
   text on its own line above the pills (so it never splits them), not a pill, since pills are actions */
.hs-acts .hs-where{flex:1 0 100%;order:-1;display:flex;align-items:center;min-height:32px;font-size:14px;line-height:1.4;color:var(--bone-dim)}
.hs-more{margin-top:8px;min-height:40px;padding:0;border:0;background:none;color:var(--light);font:inherit;font-size:13px;cursor:pointer}
.hs-more:hover{color:var(--light-hi)}
.hs-more[hidden]{display:none}
.hs-more:disabled{opacity:.5;cursor:default}
.hs-rank{margin:0 0 22px}
.hs-path{list-style:none;margin:0 0 10px;padding:0;display:grid;grid-template-columns:repeat(5,1fr);position:relative}
.hs-path::before{content:"";position:absolute;left:10%;right:10%;top:17px;height:2px;background:var(--rule-2)}
.hs-path li{position:relative;display:grid;justify-items:center;gap:4px}
.hs-path b{width:36px;height:36px;display:grid;place-items:center;border-radius:50%;border:1.5px solid var(--rule-2);background:var(--ink);font-family:var(--disp);font-size:17px;color:var(--bone-faint)}
.hs-path li.done b{border-color:#B9D0EA;color:#B9D0EA}
.hs-path li.now b{background:#B9D0EA;border-color:#B9D0EA;color:var(--ink);box-shadow:0 0 0 4px rgba(185,208,234,.18)}
.hs-path small{font-size:11.5px;color:var(--bone-dim)}
.hs-tabs{display:flex;gap:4px;margin:8px 0 6px;border-bottom:1px solid var(--rule);overflow-x:auto;scrollbar-width:none}
.hs-tabs button{flex:none;min-height:44px;padding:0 14px;border:0;border-bottom:2px solid transparent;background:none;color:var(--bone-dim);font-family:var(--mono);font-size:15px;letter-spacing:.05em;cursor:pointer}
.hs-tabs button[aria-selected=true]{color:var(--bone);border-bottom-color:var(--light)}
/* a short tab fills the screen under the tab bar: switching from a long one no longer shortens the page under the
   reader and pulls the bar down (CH-19) */
.hs-pan{padding-top:4px;min-height:calc(100svh - 120px)}
.hs-pan>.hd-sec:first-child{margin-top:18px}
.hs-pan>.hd-links,.hs-pan>.hd-list,.hs-pan>.hd-now,.hs-pan>p:first-child{margin-top:18px}
.hs-notes{width:100%;margin-top:10px;padding:12px 14px;border:1px solid var(--rule-2);border-radius:4px;background:var(--ink-2);color:var(--bone);font:inherit;line-height:1.5;resize:vertical}
.hs-tools{display:grid;gap:14px}
/* на телефоне колонки распадаются: портрет, имя и ранг, инструменты, вкладки */
@media(max-width:860px){
  .hs{grid-template-columns:1fr;gap:18px;padding-top:8px}
  .hs-side,.hs-main{display:contents}
  .hs-portrait{order:1;width:min(240px,62vw);justify-self:center}
  .hs-head{order:2;text-align:left}
  .hs-tools{order:3}
  .hs-body{order:4;min-width:0}
}
/* В бою: навыки по типу действия */
.hc-fight{display:grid;gap:22px}
.hc-turn h3{margin:0 0 10px}
.hc-turn h3 small{font-family:var(--sans);font-size:13px;font-weight:400;letter-spacing:0;text-transform:none;color:var(--bone-faint)}
.hc-fxs{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.hc-fx{padding:10px 12px;border:1px solid var(--rule);border-radius:4px}
.hc-fx-h{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 10px}
.hc-fx-h b{color:var(--bone);font-weight:500}
.hc-fx-h small{margin-left:auto;font-family:var(--mono);font-size:14px;letter-spacing:.03em;color:var(--bone-faint)}
.hc-fx p{margin:4px 0 0;color:var(--bone-dim);font-size:14.5px;line-height:1.5}
.hc-chip{font-family:var(--mono);font-size:14px;letter-spacing:.03em;padding:2px 8px;border:1px solid var(--rule);border-radius:3px;color:var(--bone-dim)}
.hc-chip.cell{border-color:var(--light);color:var(--light)}
.hc-common{margin-top:8px;font-size:14px;color:var(--bone-dim)}
.hc-common summary{cursor:pointer;min-height:44px;display:flex;align-items:center;color:var(--bone-faint)}
.hc-common ul{margin:4px 0 0;padding-left:18px;display:grid;gap:4px;line-height:1.45}
.hc-common b{color:var(--bone);font-weight:500}
.hc-kit{list-style:none;margin:0;padding:0;display:grid;gap:8px;color:var(--bone-dim);line-height:1.5}
.hc-kit .cap{display:block}
/* Статус персонажа: с кем можно сыграть */
.hc-state{display:inline-flex;align-items:center;gap:6px;font-family:var(--mono);font-size:14px;letter-spacing:.03em;color:var(--bone-faint)}
.hc-state::before{content:"";width:7px;height:7px;border-radius:50%;background:currentColor}
.hc-state.active{color:var(--ok)}
.hc-state.search{color:var(--light)}
.hc-state.away{color:#D6A85A}
.hs-own .hc-state{margin-right:12px}
/* Фильтры галереи */
.gf-tog{display:inline-flex;align-items:center;gap:8px}
/* «Случайный»: the die with the word, on a phone the die alone so the row stays one line */
.gf-rnd{display:inline-flex;align-items:center;gap:8px}
.gf-rnd svg{flex:none}
@media (max-width:640px){.filters .gf-rnd{flex:none;width:44px;min-width:44px;padding:0;justify-content:center;border-radius:50%}.gf-rnd span{display:none}.filters .gf-tog{padding:0 16px}.filters input{min-width:120px}}
.gf-n:not(:empty){min-width:20px;height:20px;padding:0 6px;border-radius:3px;background:var(--light);color:var(--ink);font-family:var(--mono);font-size:14px;display:inline-grid;place-items:center}
.gf-panel{margin-top:12px;padding:16px;border:1px solid var(--rule);border-radius:4px;display:grid;gap:14px}
.gf-grp{border:0;margin:0;padding:0;min-width:0}
.gf-grp legend{padding:0;margin-bottom:8px;font-family:var(--mono);font-size:14px;letter-spacing:.05em;color:var(--bone-faint)}
.gf-opts{display:flex;flex-wrap:wrap;gap:8px}
.gf-opts button,.gf-chip{display:inline-flex;align-items:center;gap:8px;min-height:40px;padding:0 14px;border:1px solid var(--rule-2);border-radius:3px;background:none;color:var(--bone-dim);font:inherit;font-size:14px;cursor:pointer}
.gf-opts button small{font-family:var(--mono);font-size:14px;color:var(--bone-faint)}
.gf-opts button[aria-pressed=true]{border-color:var(--light);color:var(--light);background:rgba(185,208,234,.08)}
.gf-opts button[aria-pressed=true] small{color:var(--light)}
.gf-opts button:disabled{opacity:.35;cursor:default}
.gf-on:not(:empty){display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:12px}
.gf-chip{border-color:var(--light);color:var(--light)}
.gf-chip span{font-size:16px;line-height:1}
.gf-reset{min-height:40px;padding:0 6px;background:none;border:0;color:var(--bone-faint);font:inherit;font-size:14px;text-decoration:underline;text-underline-offset:4px;cursor:pointer}
.gf-count{margin-left:auto;font-family:var(--mono);font-size:15px;color:var(--bone-faint)}
/* the tile the reader came back from: a ring of quiet light that fades */
.hc-tile.hc-was{outline:2px solid var(--light);outline-offset:3px}
@media (prefers-reduced-motion:no-preference){.hc-tile.hc-was{animation:hc-was 2.6s var(--ease) both}}
@keyframes hc-was{0%,55%{outline-color:var(--light)}100%{outline-color:transparent}}
/* Связи: игроки или NPC */
.hd-seg{display:flex;width:max-content;max-width:100%;margin:0 auto 6px;padding:4px;border:1px solid var(--rule-2);border-radius:3px;gap:4px}
.hd-seg button{display:inline-flex;align-items:center;gap:8px;min-height:40px;padding:0 18px;border:0;border-radius:3px;background:none;color:var(--bone-dim);font:inherit;font-size:14px;cursor:pointer}
.hd-seg button small{font-family:var(--mono);font-size:14px;color:var(--bone-faint)}
.hd-seg button[aria-selected=true]{background:rgba(185,208,234,.12);color:var(--light)}
.hd-seg button[aria-selected=true] small{color:var(--light)}
/* NPC: выбывшие (мёртв, пропал, в плену) серые, длинный список под «Ещё» */
.hd-node.gone img,.hd-node.gone i,.hd-chip.gone img,.hd-chip.gone i{filter:grayscale(1);opacity:.5}
.hd-node.gone{border-style:dashed}
.hd-chip.gone b{color:var(--bone-dim)}
.hd-chips:not(.open) .more{display:none}
.hd-more{min-height:44px;padding:0 16px;border:1px dashed var(--rule-2);border-radius:3px;background:none;color:var(--bone-dim);font:inherit;font-size:14px;cursor:pointer}
.hd-npc-st{display:flex;flex-wrap:wrap;gap:4px 10px;margin:-4px 0 12px;font-size:14px;color:var(--bone-dim)}
.hd-npc-st b{font-family:var(--mono);font-size:14px;letter-spacing:.03em;color:var(--ok)}
.hd-npc-st b.gone{color:var(--bone-faint)}
.hd-ev li{position:relative}
.hd-ev-x{display:inline-grid;place-items:center;width:32px;height:32px;margin:-6px -6px -6px 4px;vertical-align:middle;border:0;border-radius:50%;background:none;color:var(--bone-faint);font-size:18px;line-height:1;cursor:pointer}
.hd-ev-x:hover,.hd-ev-x:focus-visible{color:#D0584A;background:rgba(208,88,74,.1)}
/* Отношения (hero-rels.js): шапка с объяснением, строки владельца с ползунком, поиск, подсказки, взгляд других */
.hr-head{max-width:620px;margin:0 auto 4px;text-align:center}
.hr-head h2{margin:4px 0 8px}
.hr-head p{margin:0 auto;max-width:56ch;font-size:15px;line-height:1.55;color:var(--bone-dim)}
.hr-head .hr-map{margin-top:6px;font-size:14px}
.hr-head .hr-map a{text-decoration:none}
.hr-head .hr-hint{margin-top:8px;font-size:14px;color:var(--light)}
.hr-add{max-width:620px;margin:14px auto 12px;display:grid;justify-items:center;gap:10px}
.hr-add-btn{min-height:44px}
.hr-add-btn[aria-expanded=true]{border-color:var(--light);color:var(--light)}
.hr-find{position:relative;width:100%}
.hr-find input{width:100%;min-height:46px;padding:10px 14px;border:1px solid var(--rule-2);border-radius:var(--btn-r);background:var(--ink-2);color:var(--bone);font:inherit;font-size:16px}
.hr-find input:focus{outline:none;border-color:var(--light)}
.hr-opts{list-style:none;margin:6px 0 0;padding:4px;border:1px solid var(--rule-2);border-radius:4px;background:var(--ink-2);display:grid;gap:2px;max-height:320px;overflow-y:auto}
.hr-opts li[role=option]{display:flex;align-items:center;gap:10px;min-height:48px;padding:6px 10px;border-radius:4px;cursor:pointer}
.hr-opts li[aria-selected=true],.hr-opts li[role=option]:hover{background:rgba(185,208,234,.1)}
.hr-opts img,.hr-opts i,.hr-sugg img,.hr-sugg i,.hr-in img,.hr-in i{flex:none;width:34px;height:34px;border-radius:50%;object-fit:cover;display:grid;place-items:center;font-style:normal;font-family:var(--disp);color:var(--bone-faint);background:var(--ink-3);border:1px solid var(--rule-2)}
.hr-opts span,.hr-sugg span,.hr-in span{display:grid;line-height:1.2;min-width:0}
.hr-opts b,.hr-sugg b{font-weight:600;font-size:14.5px;color:var(--bone)}
.hr-opts small,.hr-sugg small{font-size:12.5px;color:var(--bone-faint);overflow:hidden;text-overflow:ellipsis}
.hr-opt-none{padding:12px;font-size:14px;color:var(--bone-faint)}
.hr-live:empty{display:none}
.hr-undo{max-width:620px;margin:12px auto 0;display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:4px 12px;font-size:14px;color:var(--bone-dim)}
.hr-undo b{color:var(--bone);font-weight:600}
.hr-undo button{min-height:40px;padding:0 6px;border:0;background:none;color:var(--light);font:inherit;font-size:14px;text-decoration:underline;text-underline-offset:4px;cursor:pointer}
.hr-err{margin:0;font-size:13px;color:#D0584A}
.hr-empty{max-width:620px;margin:18px auto 0;padding:22px 20px;border:1px dashed var(--rule-2);border-radius:4px;text-align:center;color:var(--bone-dim);font-size:15px}
.hr-none{text-align:center;margin-top:14px}
.hd-chips.hr-rows{display:grid;justify-content:stretch;gap:6px;max-width:620px;margin:14px auto 18px}
.hr-row{display:grid;grid-template-columns:minmax(0,170px) minmax(0,1fr) 40px;align-items:center;gap:4px 12px;padding:4px 4px 4px 4px;border:1px solid var(--rule);border-radius:4px;background:var(--ink-2)}
.hr-row:has(.hr-who[aria-pressed=true]){border-color:var(--lv);background:color-mix(in srgb,var(--lv) 8%,var(--ink-2))}
.hr-row .hr-err{grid-column:1/-1;padding:0 8px 6px}
.hr-who{display:flex;align-items:center;gap:8px;min-height:44px;min-width:0;padding:2px 6px 2px 2px;border:0;border-radius:3px;background:none;color:var(--bone);font:inherit;text-align:left;cursor:pointer}
.hr-who img,.hr-who i{flex:none;width:34px;height:34px;border-radius:50%;object-fit:cover;border:2px solid var(--lv);display:grid;place-items:center;font-style:normal;font-family:var(--disp);color:var(--bone-faint);background:var(--ink-3)}
.hr-who span{display:grid;line-height:1.15;min-width:0}
.hr-who b{font-weight:600;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hr-who small{font-size:12px;color:var(--lv)}
.hr-row.gone .hr-who img,.hr-row.gone .hr-who i{filter:grayscale(1);opacity:.5}
.hr-wait{grid-column:2/-1;font-size:13px;color:var(--bone-faint)}
.hr-x{display:grid;place-items:center;width:40px;height:40px;border:0;border-radius:50%;background:none;color:var(--bone-faint);font-size:20px;line-height:1;cursor:pointer}
.hr-x:hover,.hr-x:focus-visible{color:#D0584A;background:rgba(208,88,74,.1)}
/* ползунок: шесть равных зон в цветах ступеней, бегунок в цвете текущей */
.hr-meter{--zones:linear-gradient(90deg,#D0584A 0 16.66%,var(--fallen) 16.66% 33.33%,var(--bone-faint) 33.33% 50%,var(--ok) 50% 66.66%,var(--light) 66.66% 83.33%,#D3E2F3 83.33% 100%);
  -webkit-appearance:none;appearance:none;width:100%;height:44px;margin:0;background:none;cursor:pointer;touch-action:pan-y}
.hr-meter:focus{outline:none}
.hr-meter::-webkit-slider-runnable-track{height:8px;border-radius:99px;background:var(--zones);opacity:.85}
.hr-meter::-moz-range-track{height:8px;border-radius:99px;background:var(--zones);opacity:.85}
.hr-meter::-webkit-slider-thumb{-webkit-appearance:none;width:26px;height:26px;margin-top:-9px;border-radius:50%;border:3px solid var(--lv);background:var(--ink);box-shadow:0 0 0 3px var(--ink-2),0 2px 8px rgba(0,0,0,.5);transition:transform .15s var(--ease)}
.hr-meter::-moz-range-thumb{width:20px;height:20px;border-radius:50%;border:3px solid var(--lv);background:var(--ink);box-shadow:0 0 0 3px var(--ink-2)}
.hr-meter:active::-webkit-slider-thumb,.hr-meter:focus-visible::-webkit-slider-thumb{transform:scale(1.18)}
.hr-meter:focus-visible::-webkit-slider-thumb{box-shadow:0 0 0 3px var(--ink-2),0 0 0 5px var(--light)}
.hr-meter:focus-visible::-moz-range-thumb{box-shadow:0 0 0 3px var(--ink-2),0 0 0 5px var(--light)}
.hd-pair-v .hr-edit{display:grid;gap:10px;margin-top:10px}
.hd-pair-v .hr-edit .cap{font-weight:500}
.hr-edit label{display:grid;gap:4px}
.hr-edit input,.hr-edit textarea{width:100%;min-height:44px;padding:9px 12px;border:1px solid var(--rule-2);border-radius:var(--btn-r);background:var(--ink);color:var(--bone);font:inherit;font-size:16px;line-height:1.45;resize:vertical}
.hr-edit input:focus,.hr-edit textarea:focus{outline:none;border-color:var(--light)}
.hr-sec{max-width:620px;margin:28px auto 0}
.hs-pan .hr-sec h3{margin:0 0 12px;font-family:var(--disp);font-weight:400;font-size:20px;letter-spacing:0;text-transform:none;color:var(--bone);text-align:center}
.hr-sugg{list-style:none;margin:0;padding:0;display:grid;gap:6px}
.hr-sugg li{display:grid;grid-template-columns:34px minmax(0,1fr) auto;align-items:center;gap:10px;padding:6px 6px 6px 8px;border:1px dashed var(--rule-2);border-radius:4px}
.hr-sugg .btn-ghost{min-height:40px;padding:0 14px}
.hr-in{display:flex;flex-wrap:wrap;justify-content:center;gap:8px}
.hr-in-chip{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:4px 12px 4px 4px;border-radius:3px;border:1px solid var(--rule-2);color:var(--bone);text-decoration:none}
.hr-in-chip img,.hr-in-chip i{border:2px solid var(--lv)}
.hr-in-chip b{font-weight:600;font-size:14px}
.hr-in-chip small{font-size:12px;color:var(--lv)}
.hr-in-chip:hover{border-color:var(--lv)}
@media(max-width:520px){.hr-row{grid-template-columns:minmax(0,1fr) 40px;padding:4px 4px 0}.hr-row .hr-meter{grid-column:1/-1;grid-row:2;width:calc(100% - 20px);justify-self:center}.hr-wait{grid-column:1/-1;padding:0 8px 8px}}
/* touch: an invisible tap zone of at least 40px around the small «ВК ↗» link; the look does not change
   (small portraits on the relation arc get theirs in hero-dossier.js: a tap near a node picks the nearest one) */
@media(pointer:coarse){.hc-vk{position:relative}.hc-vk::before{content:'';position:absolute;inset:-2px -6px}}
/* forged items on the hero sheet: tier colour from kuznya-data.js */
.hs-items{list-style:none;padding:0;margin:0;display:grid;gap:10px}
.hs-item{--c:#B9D0EA;padding:12px 14px;border:1px solid var(--rule);border-left:3px solid var(--c);border-radius:4px;background:var(--ink-2)}
.hs-item.t-imennaya{--c:#D3E2F3}.hs-item.t-trofeynaya{--c:#E0B268}.hs-item.t-relikviya{--c:#E07A3A}
.hs-item b{display:block;color:var(--c);font-weight:500;margin-bottom:4px}
.hs-item p{margin:2px 0 0;font-size:14px;color:var(--bone-dim);line-height:1.5}

/* анкета вживую (hero-dossier.js, /api/feed): то, что вышло в ВК после сверки, открыто и с голубой кромкой */
.hd-vk-new{border-color:var(--light)}
.hd-vk-new summary span{color:var(--light-hi)}

/* hero-journey.js: who plays the hero, fate, the change journal, the request to change locked fields, skills for VK */
.hj-link{padding:0;border:0;background:none;font:inherit;color:var(--light);text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.hj-link:hover{color:var(--light-hi)}
.hj-link:focus-visible{outline:1px solid var(--light);outline-offset:3px;border-radius:2px}
.hc-state.fate{color:var(--fallen)}
.hj-fate{display:grid;gap:4px;margin:0 0 18px;padding:12px 16px;border:1px solid rgba(196,116,76,.45);border-left:3px solid var(--fallen);border-radius:4px;background:rgba(196,116,76,.07);color:var(--bone);font-size:15.5px;line-height:1.5}
.hj-fate.gone{border-color:var(--rule-2);border-left-color:var(--storm);background:var(--ink-2)}
.hj-fate .cap{color:var(--fallen)}
.hj-fate.gone .cap{color:var(--storm)}
.hj-fate small{color:var(--bone-faint);font-size:13.5px}
.hj-hist{list-style:none;padding:0;margin:0;display:grid}
.hj-hist li{display:grid;grid-template-columns:150px 1fr auto;gap:4px 16px;align-items:baseline;padding:10px 0;border-bottom:1px solid var(--rule)}
.hj-hist li:last-child{border-bottom:0}
.hj-hist time{font-family:var(--mono);font-size:14px;letter-spacing:.03em;color:var(--bone-faint)}
.hj-hist p{margin:0;color:var(--bone-dim);font-size:15px;line-height:1.5;overflow-wrap:anywhere}
.hj-hist .who{font-family:var(--mono);font-size:13px;letter-spacing:.04em;color:var(--bone-faint)}
.hj-hist li.k-fate p,.hj-hist li.k-accepted p,.hj-hist li.k-rank p{color:var(--bone)}
.hj-hist li.k-fate time{color:var(--fallen)}
@media(max-width:560px){.hj-hist li{grid-template-columns:1fr auto}.hj-hist p{grid-column:1/-1;grid-row:2}}
.hd-branches a{color:inherit;text-decoration:underline;text-decoration-color:var(--rule-2);text-underline-offset:3px}
.hd-branches a:hover{color:var(--light)}
dialog.hj-dlg{width:min(640px,calc(100vw - 24px))}
.hj-dlg .ed-bd{display:grid;gap:14px}
.hj-dlg .acts{display:flex;flex-wrap:wrap;gap:10px}
.hj-f{display:grid;gap:12px;margin:0}
.hj-pre{margin:0;max-height:220px;overflow:auto;padding:12px 14px;border:1px solid var(--rule);border-radius:4px;background:var(--ink-2);color:var(--bone-dim);font:14px/1.55 var(--sans);white-space:pre-wrap;overflow-wrap:anywhere}
.hj-pre:focus-visible{outline:1px solid var(--light);outline-offset:2px}
.hj-shot img{display:block;width:100%;height:auto;border:1px solid var(--rule);border-radius:4px}
.hj-change summary{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 12px;cursor:pointer;color:var(--bone-dim);font-size:15px}
.hj-change summary b{color:var(--bone);font-weight:500}
.hj-change summary .muted{font-size:14px}
.hj-change[open] summary{margin-bottom:4px}
.hj-find{margin:14px 0 0;color:var(--bone-dim);font-size:15px}
.hj-find summary{cursor:pointer;color:var(--light);width:fit-content}
.hj-find p{margin:10px 0}
.hj-free{list-style:none;padding:0;margin:0;display:flex;flex-wrap:wrap;gap:8px}
.hj-free li{display:inline-flex;align-items:baseline;gap:8px;padding:6px 12px;border:1px solid var(--rule);border-radius:4px;font-size:14.5px}
.hj-free li .muted{font-size:13.5px}

/* the oath scale on the hero card (hero-dossier.js oathBar): a loading bar to the next oath */
.hd-oath{margin:10px 0 14px;padding:10px 12px;border:1px solid var(--rule);border-radius:4px;background:var(--ink)}
.hd-oath p{margin:0 0 8px;display:flex;flex-wrap:wrap;justify-content:space-between;gap:4px 12px;align-items:baseline}
.hd-oath b{font-weight:500;color:var(--bone)}
.hd-oath p span{font-family:var(--mono);font-size:13px;letter-spacing:.04em;color:var(--bone-faint)}
.hd-oath-bar{position:relative;display:block;height:10px;border-radius:5px;background:var(--ink-3);overflow:hidden;box-shadow:inset 0 0 0 1px var(--rule)}
.hd-oath-bar i{position:absolute;inset:0 auto 0 0;border-radius:5px;background:linear-gradient(90deg,color-mix(in srgb,var(--light) 45%,transparent),var(--light))}
.hd-oath.is-ready{border-color:var(--light)}
