

/* Layout: one narrow column like a phone app; streak hero → today's reading → reflection → calendar → awards */
:root{
  --bg:#f5f6fa; --surface:#ffffff; --ink:#1b2340; --muted:#626a85; --line:#dfe2ec;
  --flame:#ff7a1a; --flame2:#ffc53d; --flame-soft:#fff0e2; --xp:#6b4fd8; --xp-soft:#ece7ff;
  --ice:#3fa7e0; --ice-soft:#e2f3fc; --ok:#1f9d63; --off:#c9cddb;
  --display:"Alegreya",Georgia,"Times New Roman",serif;
  --body:"Golos Text",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  --r:16px;
  --s-nt:#6b4fd8; --s-ot:#e8650a; --link:#1d6fd6; --link-soft:#e6f0fc; --trail:#e7dcc8;
}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]){
  --bg:#10142a; --surface:#1a1f3a; --ink:#eef0fa; --muted:#a2a8c4; --line:#2c3356;
  --flame:#ff8a33; --flame2:#ffcf5c; --flame-soft:#3a2614; --xp:#a08cff; --xp-soft:#2a2550;
  --ice:#5cbcf0; --ice-soft:#16324a; --ok:#3fcf8a; --off:#3a4166; --s-nt:#8a72f0; --s-ot:#e06a12; --link:#6aa8ff; --link-soft:#1a2b4a; --trail:#3a3550; color-scheme:dark}}
:root[data-theme="dark"]{
  --bg:#10142a; --surface:#1a1f3a; --ink:#eef0fa; --muted:#a2a8c4; --line:#2c3356;
  --flame:#ff8a33; --flame2:#ffcf5c; --flame-soft:#3a2614; --xp:#a08cff; --xp-soft:#2a2550;
  --ice:#5cbcf0; --ice-soft:#16324a; --ok:#3fcf8a; --off:#3a4166; --s-nt:#8a72f0; --s-ot:#e06a12; --link:#6aa8ff; --link-soft:#1a2b4a; --trail:#3a3550; color-scheme:dark}
*{box-sizing:border-box}
[hidden]{display:none!important}
html,body{background:var(--bg);color:var(--ink)}
/* без увеличения экрана двойным нажатием (масштаб двумя пальцами работает) */
html{touch-action:manipulation}
button,a,summary,input,select,textarea,[role=button]{touch-action:manipulation}
body{font-family:var(--body);font-size:16px;line-height:1.5;padding-inline:16px;padding-block:16px 48px}
.app{max-width:520px;margin:0 auto;display:flex;flex-direction:column;gap:16px}
h1,h2{font-family:var(--display);text-wrap:balance;margin:0;line-height:1.15}
h2{font-size:1.35rem}
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:18px;display:flex;flex-direction:column;gap:12px}
.label{font-size:.75rem;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);font-weight:600}
.muted{color:var(--muted)}
button{font:inherit;cursor:pointer;border:0;border-radius:12px}
button:focus-visible,a:focus-visible,textarea:focus-visible{outline:3px solid var(--xp);outline-offset:2px}

/* top bar */
.top{display:flex;align-items:center;gap:12px;justify-content:space-between}
.brand{display:flex;align-items:center;gap:8px}
.brand h1{font-size:1.6rem}
.lvl{display:flex;align-items:center;gap:8px;min-width:0}
.lvl-badge{background:var(--xp);color:#fff;font-weight:700;border-radius:10px;padding:2px 10px;font-size:.85rem;white-space:nowrap}
.xpbar{height:8px;background:var(--xp-soft);border-radius:8px;overflow:hidden;width:90px}
.xpbar i{display:block;height:100%;background:var(--xp);border-radius:8px;transition:width .5s}
.xptext{font-size:.8rem;color:var(--muted);font-variant-numeric:tabular-nums;white-space:nowrap}

/* streak hero */
.hero{display:grid;grid-template-columns:auto 1fr;gap:18px;align-items:center}
.flame{width:84px;height:104px}
.flame.off .f1{fill:var(--off)} .flame.off .f2{fill:var(--line)}
.f1{fill:var(--flame)} .f2{fill:var(--flame2)}
.streak-num{font-family:var(--display);font-size:3.4rem;font-weight:800;line-height:1;font-variant-numeric:tabular-nums}
.streak-word{font-size:1.05rem;font-weight:600}
.hero-sub{font-size:.9rem;color:var(--muted);margin-top:4px}
.chips{display:flex;flex-wrap:wrap;gap:8px}
.chip{display:inline-flex;align-items:center;gap:6px;font-size:.82rem;font-weight:600;border-radius:999px;padding:4px 10px}
.chip.ice{background:var(--ice-soft);color:var(--ice)}
.chip.fire{background:var(--flame-soft);color:var(--flame)}
.chip svg{width:14px;height:14px}
.chip svg.snow{width:16px;height:16px}

/* reading */
.reading-head{display:flex;justify-content:space-between;align-items:baseline;gap:8px;flex-wrap:wrap}
.daynum{font-variant-numeric:tabular-nums;color:var(--muted);font-size:.9rem}
.refs{display:flex;flex-direction:column;gap:8px}
.ref{display:flex;align-items:center;gap:12px;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:var(--bg)}
.ref .tag{font-size:.7rem;font-weight:700;letter-spacing:.06em;color:var(--muted);width:28px;flex:none}
.ref .name{font-family:var(--display);font-size:1.2rem;font-weight:700;min-width:0}
.ref .sub{font-size:.82rem;color:var(--muted)}
.row{display:flex;gap:8px;flex-wrap:wrap}
.btn{padding:12px 16px;font-weight:600;background:var(--bg);color:var(--ink);border:1px solid var(--line);text-decoration:none;display:inline-flex;align-items:center;justify-content:center;gap:6px;border-radius:12px}
.btn.grow{flex:1 1 160px}
.btn-main{width:100%;padding:16px;font-size:1.05rem;font-weight:700;background:var(--flame);color:#fff;border-radius:14px;box-shadow:0 4px 0 color-mix(in srgb,var(--flame) 60%,#000)}
.btn-main:active{transform:translateY(3px);box-shadow:0 1px 0 color-mix(in srgb,var(--flame) 60%,#000)}
.btn-main.done{background:var(--ok);box-shadow:0 4px 0 color-mix(in srgb,var(--ok) 60%,#000)}
.hint{font-size:.82rem;color:var(--muted)}
.copyfield{width:100%;font:inherit;font-size:.9rem;padding:8px 10px;border:1px solid var(--line);border-radius:10px;background:var(--bg);color:var(--ink)}

/* reflection */
.question{font-family:var(--display);font-size:1.2rem;font-weight:700}
textarea{width:100%;min-height:90px;font:inherit;padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--bg);color:var(--ink);resize:vertical}

/* calendar */
.cal{display:grid;grid-template-columns:repeat(7,1fr);gap:6px}
.cal .wd{font-size:.7rem;text-align:center;color:var(--muted);font-weight:600}
.cell{aspect-ratio:1;max-width:100%;border-radius:10px;background:var(--bg);border:1px solid var(--line);display:grid;place-items:center;font-size:.78rem;font-variant-numeric:tabular-nums;color:var(--muted)}
.cell.done{background:var(--flame);border-color:var(--flame);color:#fff;font-weight:700}
.cell.frozen{background:var(--ice-soft);border-color:var(--ice);color:var(--ice);font-weight:700}
.cell.today{outline:2px solid var(--ink);outline-offset:1px}
.cell.future{opacity:.4}
.legend{display:flex;gap:14px;flex-wrap:wrap;font-size:.8rem;color:var(--muted)}
.legend span{display:inline-flex;align-items:center;gap:6px}
.legend i{width:12px;height:12px;border-radius:4px;display:inline-block}

/* progress */
.prog{display:flex;flex-direction:column;gap:10px}
.prog-row{display:grid;grid-template-columns:1fr auto;gap:4px 12px;font-size:.9rem}
.bar{grid-column:1/-1;height:10px;background:var(--bg);border:1px solid var(--line);border-radius:10px;overflow:hidden}
.bar i{display:block;height:100%;background:var(--ink)}
.num{font-variant-numeric:tabular-nums;color:var(--muted)}

/* badges */
.badges{display:grid;grid-template-columns:repeat(auto-fill,minmax(96px,1fr));gap:10px}
.badge{display:flex;flex-direction:column;align-items:center;text-align:center;gap:6px;padding:12px 6px;border-radius:14px;border:1px solid var(--line);background:var(--bg)}
.medal{width:52px;height:52px;border-radius:50%;display:grid;place-items:center;font-family:var(--display);font-weight:800;font-size:1.2rem;color:#fff;background:var(--flame)}
.medal.book{background:var(--xp)}
.badge.locked .medal{background:var(--off);color:var(--surface)}
.badge.locked{color:var(--muted)}
.badge b{font-size:.78rem;line-height:1.25}

.foot{display:flex;flex-direction:column;gap:8px;align-items:center;text-align:center;font-size:.8rem;color:var(--muted)}
.linkbtn{background:none;color:var(--muted);text-decoration:underline;padding:4px}
.danger{background:#d64545;color:#fff;padding:8px 14px}

/* celebration */
.celebrate{position:fixed;inset:0;display:grid;place-items:center;background:color-mix(in srgb,var(--bg) 88%,transparent);z-index:20;padding:16px}
.celebrate .box{display:flex;flex-direction:column;align-items:center;gap:10px;text-align:center;max-width:340px}
.celebrate .flame{width:140px;height:172px;animation:pop .7s cubic-bezier(.2,1.6,.4,1)}
.celebrate .big{font-family:var(--display);font-size:2.6rem;font-weight:800;line-height:1}
.toast{position:fixed;left:50%;bottom:calc(20px + env(safe-area-inset-bottom,0px));transform:translateX(-50%);background:var(--ink);color:var(--bg);padding:10px 16px;border-radius:12px;font-size:.9rem;z-index:30;max-width:calc(100% - 32px)}
@keyframes pop{from{transform:scale(.3);opacity:0}to{transform:scale(1);opacity:1}}
@keyframes flicker{0%,100%{transform:scaleY(1)}50%{transform:scaleY(1.04)}}
.flame:not(.off) .f2{transform-origin:50% 100%;animation:flicker 1.6s ease-in-out infinite}
@media (prefers-reduced-motion: reduce){*{animation:none!important;transition:none!important}}
@media (max-width:380px){.xpbar{width:60px}.streak-num{font-size:2.8rem}}

/* two testaments */
.tgrid{display:grid;grid-template-columns:1fr;gap:12px}
.tcard{display:flex;flex-direction:column;gap:10px;padding:14px;border:1px solid var(--line);border-radius:14px;background:var(--bg);min-width:0}
.thead{display:flex;align-items:center;gap:10px}
.thead .flame{width:34px;height:42px;flex:none}
.thead b{display:block;font-size:.95rem}
.thead span{font-size:.82rem;color:var(--muted);font-variant-numeric:tabular-nums}
.tlink{display:flex;flex-direction:column;gap:2px;text-decoration:none;color:var(--ink);padding:10px 12px;border-radius:12px;border:1px solid var(--line);background:var(--surface)}
.tlink:hover{border-color:var(--flame)}
.tlink .name{font-family:var(--display);font-size:1.25rem;font-weight:700}
.tlink .sub{font-size:.8rem;color:var(--muted)}
.tlink .go{font-size:.8rem;font-weight:600;color:var(--flame)}
.tbtn{width:100%;padding:12px;font-weight:700;background:var(--flame);color:#fff;border-radius:12px;box-shadow:0 3px 0 color-mix(in srgb,var(--flame) 60%,#000)}
.tbtn:active{transform:translateY(2px);box-shadow:0 1px 0 color-mix(in srgb,var(--flame) 60%,#000)}
.tbtn.done{background:var(--ok);box-shadow:0 3px 0 color-mix(in srgb,var(--ok) 60%,#000)}
.tbtn:disabled{cursor:default}
.cell.half{background:var(--flame-soft);border-color:var(--flame);color:var(--flame);font-weight:700}
.answered{background:var(--xp-soft);color:var(--xp);border-radius:12px;padding:10px 12px;font-size:.9rem}
.weeknav{display:flex;align-items:center;gap:6px}
.navbtn{padding:6px 12px;font-size:1.1rem;line-height:1}
.navbtn:disabled{opacity:.4;cursor:default}
#wkSel{font:inherit;font-weight:600;padding:7px 10px;border:1px solid var(--line);border-radius:10px;background:var(--bg);color:var(--ink)}
.sched{display:flex;flex-direction:column;gap:6px}
.srow{display:grid;grid-template-columns:96px 1fr 1fr;gap:8px;align-items:center;padding:8px;border-radius:12px;border:1px solid transparent}
.srow.snext{border-color:var(--flame);background:var(--flame-soft)}
.sday{font-size:.85rem;font-weight:600;color:var(--muted)}
.sitem{display:flex;align-items:center;gap:6px;min-width:0}
.sref{flex:1;min-width:0;display:flex;flex-direction:column;text-decoration:none;color:var(--ink);font-size:.9rem;font-weight:600;font-variant-numeric:tabular-nums;padding:4px 6px;border-radius:8px}
.sref:hover{background:var(--bg)}
.sref span:last-child{white-space:nowrap}
.stag{font-size:.65rem;letter-spacing:.06em;color:var(--muted);font-weight:700}
.sdone .sref{color:var(--muted)}
.scheck{flex:none;width:30px;height:30px;border-radius:50%;border:2px solid var(--line);background:var(--surface);color:transparent;display:grid;place-items:center;padding:0}
.scheck svg{width:16px;height:16px}
.sdone .scheck{background:var(--ok);border-color:var(--ok);color:#fff}
@media (max-width:440px){.srow{grid-template-columns:1fr 1fr}.sday{grid-column:1/-1}}
@keyframes ignite{0%{transform:scale(.4) rotate(-8deg);filter:drop-shadow(0 0 0 transparent)}45%{transform:scale(1.45) rotate(5deg);filter:drop-shadow(0 0 14px var(--flame))}70%{transform:scale(.92) rotate(-2deg)}100%{transform:scale(1);filter:drop-shadow(0 0 4px var(--flame))}}
.flame.ignite{animation:ignite .8s cubic-bezier(.2,1.4,.4,1);transform-origin:50% 90%}
.sparks{position:fixed;inset:0;width:100vw;height:100vh;pointer-events:none;z-index:50}
.nextbtn{display:flex;align-items:center;justify-content:center;padding:11px;border-radius:12px;font-weight:700;text-decoration:none;color:var(--flame);background:var(--surface);border:2px solid var(--flame)}
.nextbtn:hover{background:var(--flame-soft)}
.nextbox{display:flex;flex-direction:column;gap:8px;padding:10px;border-radius:12px;border:2px dashed var(--flame);background:var(--flame-soft)}
.nextlink{display:flex;flex-direction:column;gap:3px;text-decoration:none;color:var(--ink);padding:10px 12px;border-radius:12px;background:var(--surface);border:2px solid var(--link);box-shadow:0 2px 0 color-mix(in srgb,var(--link) 35%,transparent);transition:background .15s}
.nextlink:hover,.nextlink:focus-visible{background:var(--link-soft)}
.nextlink .name{font-family:var(--display);font-size:1.2rem;font-weight:700;color:var(--link);text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:3px}
.nextlink .sub{font-size:.8rem;color:var(--muted)}
.nextlink .go{align-self:flex-start;margin-top:4px;font-size:.82rem;font-weight:700;color:var(--surface);background:var(--link);padding:5px 12px;border-radius:999px}
.tlink .name{color:var(--link);text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:3px}
.tlink .go{align-self:flex-start;margin-top:4px;font-size:.82rem;font-weight:700;color:var(--link);border:1.5px solid var(--link);padding:4px 11px;border-radius:999px}
.tlink:hover{background:var(--link-soft)}
.nextmark{display:flex;align-items:center;justify-content:center;gap:6px}
.nextmark svg{width:16px;height:20px}
.nextmark .f1{fill:#fff}.nextmark .f2{fill:var(--flame2)}
.minis{display:none!important} /* 09.11: маленькие огоньки у «Новый/Ветхий Завет» убраны */
.thead .flame.mini{width:14px;height:18px}
.minimore{font-size:.75rem;font-weight:700;color:var(--flame)}
.pacebar{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:10px 14px}
.pacebar>summary{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;cursor:pointer;list-style:none}
.pacebar>summary::-webkit-details-marker{display:none}
.pacetitle{white-space:nowrap;font-size:.75rem;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);font-weight:600}
.pacetitle{display:inline-flex;align-items:center}
.pacetitle::after{content:"";width:8px;height:8px;margin-left:9px;border-right:2.5px solid var(--ink);border-bottom:2.5px solid var(--ink);transform:translateY(-3px) rotate(45deg);transition:transform .2s}
.pacebar[open] .pacetitle::after{transform:translateY(2px) rotate(-135deg)}
.pacepills{display:flex;gap:8px;flex-wrap:wrap}
.pacepill{display:inline-flex;align-items:center;gap:5px;padding:3px 9px;border-radius:999px;background:var(--bg);border:1px solid var(--line);font-size:.88rem;white-space:nowrap}
.pacepill .pk{color:var(--muted);font-weight:600}
.pacepill b{font-variant-numeric:tabular-nums;color:var(--ink)}
.pacepill.ahead b{color:var(--ok)}
.pacepill.behind b{color:#e5484d}
.pacebody{display:flex;flex-direction:column;gap:10px;margin-top:10px}
.hero.withpace{grid-template-columns:auto 1fr auto;gap:12px}
.hero.withpace .flame{width:80px;height:100px}
.flame.half .f1{fill:var(--off)}
.flame.half .f2{fill:var(--flame);filter:drop-shadow(0 0 6px color-mix(in srgb,var(--flame) 70%,transparent))}
.hero.withpace .streak-num{font-size:2.2rem}
.hero.withpace .label{white-space:nowrap;font-size:.68rem}
.hero.withpace .streak-word{font-size:.88rem;white-space:nowrap}
.streakline{display:flex;align-items:baseline;gap:6px;flex-wrap:wrap}
.hero.withpace ~ .hero-sub{font-size:.85rem;margin-top:-4px}
.pacebar.inhero{background:none;border:0;border-radius:0;padding:0;align-self:center;min-width:0}
.pacebar.inhero>summary{flex-direction:column;align-items:stretch;gap:6px;flex-wrap:nowrap}
.pacebar.inhero .pacetitle{font-size:.68rem;text-align:right}
.pacebar.inhero .pacepills{flex-direction:column;gap:6px;flex-wrap:nowrap}
.pacebar.inhero .pacepill{font-size:.82rem;padding:3px 8px}
.inherobody{border-top:1px solid var(--line);padding-top:10px;margin-top:0}
.startlbl{display:flex;align-items:center;gap:6px;font-size:.82rem;color:var(--muted)}
.startlbl input{font:inherit;font-size:.85rem;padding:5px 8px;border:1px solid var(--line);border-radius:8px;background:var(--bg);color:var(--ink)}
.pacetiles{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.pacetile{padding:12px;border-radius:12px;background:var(--bg);border:1px solid var(--line);min-width:0}
.pacelabel{display:flex;align-items:center;gap:6px;font-size:.82rem;color:var(--muted);font-weight:600}
.pacekey{width:10px;height:10px;border-radius:3px;flex:none}
.pacenum{font-family:var(--display);font-size:2rem;font-weight:800;line-height:1.1;font-variant-numeric:tabular-nums}
.pacesub{font-size:.8rem;color:var(--muted)}
.chartbox{position:relative;width:100%;min-width:0}
.pacesvg{display:block;max-width:100%;touch-action:pan-y}
#testaments,#testaments *{touch-action:manipulation;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
.pacesvg .grid{stroke:var(--line);stroke-width:1}
.pacesvg .zero{stroke:var(--muted);stroke-width:1;stroke-dasharray:4 3}
.pacesvg .tick{fill:var(--muted);font-size:11px;font-variant-numeric:tabular-nums}
.pacesvg .endlab{fill:var(--ink);font-size:12px;font-weight:700;font-variant-numeric:tabular-nums}
.pacesvg .cross{stroke:var(--muted);stroke-width:1}
.pacesvg rect:focus{outline:none}
.pacetip{position:absolute;top:4px;width:160px;padding:8px 10px;border-radius:10px;background:var(--surface);border:1px solid var(--line);box-shadow:0 4px 14px rgba(0,0,0,.12);font-size:.8rem;pointer-events:none}
.tipdate{color:var(--muted);margin-bottom:4px}
.tiprow{display:flex;align-items:center;gap:6px}
.tiprow b{font-variant-numeric:tabular-nums;color:var(--ink)}
.tipkey{width:12px;height:2px;border-radius:2px;flex:none}
.pacetable summary{cursor:pointer;font-size:.85rem;color:var(--muted)}
.pacetable table{width:100%;border-collapse:collapse;margin-top:8px;font-size:.85rem;font-variant-numeric:tabular-nums}
.pacetable th,.pacetable td{text-align:left;padding:4px 6px;border-bottom:1px solid var(--line)}
.quizgrid{display:grid;grid-template-columns:1fr;gap:12px}
.qcard{display:flex;flex-direction:column;gap:10px;padding:14px;border:1px solid var(--line);border-radius:14px;background:var(--bg);min-width:0}
.qref{font-size:.75rem;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);font-weight:600}
.qtext{font-family:var(--display);font-size:1.15rem;font-weight:700;line-height:1.3}
.qopts{display:flex;flex-direction:column;gap:8px}
.qopt{text-align:left;padding:11px 14px;font-weight:600;background:var(--surface);color:var(--ink);border:2px solid var(--line);border-radius:12px}
.qopt:not(:disabled):hover{border-color:var(--xp)}
.qopt:disabled{cursor:default;opacity:.7}
.qopt.right{border-color:var(--ok);background:color-mix(in srgb,var(--ok) 14%,var(--surface));opacity:1}
.qopt.wrong{border-color:#d64545;background:color-mix(in srgb,#d64545 12%,var(--surface));opacity:1}
.qres{font-weight:700;font-size:.9rem}
.qcard{position:relative}
.qopt{display:flex;align-items:center;justify-content:space-between;gap:8px}
.qmark{flex:none;width:22px;height:22px;display:grid;place-items:center}
.qmark svg{width:20px;height:20px}
.qopt.right .qmark{color:var(--ok)}
.qopt.wrong .qmark{color:#d64545}
.qopt.wrong{text-decoration:line-through;text-decoration-thickness:1px}
.qverdict{position:absolute;left:50%;top:44%;transform:translate(-50%,-50%);display:flex;align-items:center;gap:8px;padding:10px 18px;border-radius:999px;font-weight:800;font-size:1.15rem;color:#fff;box-shadow:0 8px 24px rgba(0,0,0,.18);pointer-events:none;animation:verdict 1.8s ease forwards;z-index:2;white-space:nowrap}
.qverdict.ok{background:var(--ok)}
.qverdict.no{background:#d64545}
.qvicon svg{width:22px;height:22px;display:block}
@keyframes verdict{0%{opacity:0;transform:translate(-50%,-50%) scale(.4)}15%{opacity:1;transform:translate(-50%,-50%) scale(1.12)}25%{transform:translate(-50%,-50%) scale(1)}80%{opacity:1}100%{opacity:0;transform:translate(-50%,-60%) scale(1)}}
.qcard.flash-ok{animation:flashok .9s ease}
@keyframes flashok{0%{box-shadow:0 0 0 0 color-mix(in srgb,var(--ok) 60%,transparent)}100%{box-shadow:0 0 0 18px transparent}}
.qcard.shake{animation:shake .45s ease}
@keyframes shake{0%,100%{transform:translateX(0)}20%{transform:translateX(-8px)}40%{transform:translateX(8px)}60%{transform:translateX(-5px)}80%{transform:translateX(4px)}}
.qres.ok{color:var(--ok)}
.qres.no{color:var(--muted)}
.medalsvg svg{display:block}
.badge.locked .medalsvg{filter:grayscale(1);opacity:.35}
.bdesc{font-size:.68rem;color:var(--muted);line-height:1.25}
.chest{position:fixed;inset:0;display:grid;place-items:center;background:color-mix(in srgb,var(--bg) 90%,transparent);z-index:22;padding:16px}
.chestbox{display:flex;flex-direction:column;align-items:center;gap:10px;text-align:center;width:100%;max-width:340px}
.chesttitle{font-family:var(--display);font-size:2rem;font-weight:800}
.chestart{position:relative;width:220px;height:230px;max-width:100%}
.chestsvg{position:absolute;left:10px;bottom:0;width:200px;height:163px;overflow:visible;animation:wobble 1.4s ease-in-out infinite;transform-origin:50% 100%}
.chest.open .chestsvg{animation:none}
@keyframes wobble{0%,60%,100%{transform:rotate(0)}68%{transform:rotate(-5deg)}76%{transform:rotate(5deg)}84%{transform:rotate(-3deg)}92%{transform:rotate(2deg)}}
.chestsvg .lid{transform-box:fill-box;transform-origin:50% 100%;transition:transform .55s cubic-bezier(.3,1.5,.5,1)}
.chest.open .chestsvg .lid{transform:translateY(-30px) scaleY(.5)}
.chestsvg .glow{opacity:0;transition:opacity .4s .2s}
.chest.open .chestsvg .glow{opacity:1}
.rays{position:absolute;left:50%;top:38%;width:300px;height:300px;margin:-150px 0 0 -150px;border-radius:50%;background:repeating-conic-gradient(from 0deg,rgba(255,197,61,.55) 0 10deg,transparent 10deg 24deg);mask:radial-gradient(circle,#000 20%,transparent 70%);-webkit-mask:radial-gradient(circle,#000 20%,transparent 70%);opacity:0;transform:scale(.4);transition:opacity .4s .3s,transform .6s .3s}
.chest.open .rays{opacity:1;transform:scale(1);animation:spin 12s linear infinite}
@keyframes spin{to{rotate:360deg}}
.chestmedal{position:absolute;left:50%;top:95px;width:120px;height:120px;margin-left:-60px;opacity:0;transform:translateY(40px) scale(.2);transition:opacity .3s .35s,transform .75s .35s cubic-bezier(.2,1.5,.4,1);filter:drop-shadow(0 6px 14px rgba(0,0,0,.25));z-index:1}
.chest.open .chestmedal{opacity:1;transform:translateY(-95px) scale(1)}
.chestreveal{opacity:0;transform:translateY(8px);transition:opacity .4s .7s,transform .4s .7s;min-height:3.4em}
.chest.open .chestreveal{opacity:1;transform:none}
.chestname{font-family:var(--display);font-size:1.5rem;font-weight:800}
.chestdesc{color:var(--muted);font-size:.95rem}
.chestsub{margin:0;color:var(--muted);font-size:.95rem}
.chestsub:empty{display:none}
/* огонёк сегодня ещё не горит — кнопка «Прочитал(а)» мягко мигает */
.tbtn.nudge:not(.armed){animation:nudge 1.6s ease-in-out infinite}
@keyframes nudge{0%,100%{box-shadow:0 3px 0 color-mix(in srgb,var(--flame) 60%,#000),0 0 0 0 color-mix(in srgb,var(--flame) 0%,transparent)}50%{box-shadow:0 3px 0 color-mix(in srgb,var(--flame) 60%,#000),0 0 0 7px color-mix(in srgb,var(--flame) 35%,transparent);filter:brightness(1.08)}}
@media (prefers-reduced-motion:reduce){.tbtn.nudge{animation:none}}
.tbtn.armed,.nextmark.armed{background:var(--ink);color:var(--bg);box-shadow:0 3px 0 color-mix(in srgb,var(--ink) 60%,#000);animation:armpulse 1s ease-in-out infinite}
.scheck.armed{border-color:var(--flame);background:var(--flame-soft);animation:armpulse 1s ease-in-out infinite}
@keyframes armpulse{0%,100%{outline:3px solid transparent;outline-offset:2px}50%{outline:3px solid var(--flame);outline-offset:2px}}
.undolink{align-self:center;font-size:.85rem}
.toast{display:flex;align-items:center;gap:12px}
.toastbtn{flex:none;background:var(--bg);color:var(--ink);font-weight:800;padding:6px 12px;border-radius:999px}
.toast{width:max-content;max-width:calc(100% - 32px)}
.mycode{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;padding:10px 12px;border-radius:12px;background:var(--flame-soft)}
.mycode b{font-size:1.2rem;letter-spacing:.12em;font-variant-numeric:tabular-nums}
.addfriend{display:flex;gap:8px}
.addfriend input{flex:1;min-width:0;font:inherit;font-size:1rem;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:var(--bg);color:var(--ink)}
.friends{display:flex;flex-direction:column;gap:8px}
.friend{display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:center;padding:10px 12px;border:1px solid var(--line);border-radius:14px;background:var(--bg)}
.friend.me{border-color:var(--flame);background:var(--flame-soft)}
.favatar{width:40px;height:40px;border-radius:50%;object-fit:cover;background:var(--line);display:grid;place-items:center;font-weight:800;color:var(--muted);overflow:hidden}
.fname{font-weight:700;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fline{font-size:.8rem;color:var(--muted);display:flex;gap:6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fline .ok{color:var(--ok);font-weight:700}
.fstreak{display:flex;flex-direction:column;align-items:center;font-weight:800;font-variant-numeric:tabular-nums;min-width:44px}
.fstreak svg{width:22px;height:28px}
.fahead{font-size:.72rem;color:var(--muted);font-weight:600}
.fremove{font-size:.75rem}
.tcols{display:grid;grid-template-columns:1fr 1fr;gap:10px;align-items:start}
.tcol{display:flex;flex-direction:column;gap:8px;min-width:0}
.tlink,.nextlink{gap:2px;padding:9px 10px}
.tlink .label,.nextlink .label{font-size:.68rem}
.tlink .name,.nextlink .name{font-size:1.08rem;line-height:1.2;overflow-wrap:anywhere}
.tlink .sub,.nextlink .sub{font-size:.74rem}
.tcol .tbtn{padding:10px 8px;font-size:.88rem;line-height:1.2}
.nextbox{padding:0;border:0;background:none;gap:8px}
/* одинаковая высота: обе колонки делят общие строки (ссылка | кнопка | подпись) */
.tcols{grid-template-rows:auto auto auto;align-items:stretch;row-gap:8px}
.tcol{display:grid;grid-row:1 / span 3;grid-template-rows:subgrid;gap:8px;align-content:start}
.tcol .nextbox{display:contents}
.tcol .tlink,.tcol .nextlink{height:100%;box-sizing:border-box}
.tcol .undolink,.tcol .frzhint{align-self:start;justify-self:center;font-size:.85rem;line-height:1.3;min-height:1.3em}
@supports not (grid-template-rows:subgrid){.tcol{display:flex;flex-direction:column}.tcol .tlink,.tcol .nextlink{min-height:92px}}
.nextlink.later{opacity:.65;border-style:dashed;box-shadow:none}
@media (max-width:360px){.tcols{grid-template-columns:1fr}}
.qcard.qin{animation:qin .35s ease}
@keyframes qin{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
.myids{flex-basis:100%;font-size:.78rem;color:var(--muted);overflow-wrap:anywhere}
.myids b{font-size:.8rem;letter-spacing:0}
.myids code{font-size:.72rem;user-select:all}
.loginTop{flex:none;padding:7px 14px;border-radius:999px;font-weight:700;font-size:.9rem;background:var(--xp);color:#fff}
.loginTop.user{background:var(--bg);color:var(--ink);border:1px solid var(--line);max-width:9em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.top{flex-wrap:wrap}
@media (max-width:440px){.top .xptext{display:none}.top .xpbar{width:56px}.top{gap:8px}.gemtop{padding:4px 8px}}
@media (max-width:400px){.top .xpbar{display:none}}
.pathbox{max-height:440px;overflow:auto;touch-action:pan-x pan-y;border-radius:14px;background:var(--bg);border:1px solid var(--line)}
.pathsvg{display:block;max-width:100%}
.pnode circle{fill:var(--surface);stroke:var(--line);stroke-width:3}
.pnode text{font-size:11px;font-weight:700;fill:var(--muted);font-variant-numeric:tabular-nums}
.pnode.one circle{fill:var(--flame-soft);stroke:var(--flame)}
.pnode.both circle{fill:var(--flame);stroke:var(--flame)}
.pnode.both text{fill:#fff}
.pweek{font-size:11px;font-weight:700;fill:var(--muted);letter-spacing:.04em}
.pinit{font-size:14px;font-weight:800;fill:#fff}
.pname{font-size:11px;font-weight:700;fill:var(--ink);paint-order:stroke;stroke:var(--bg);stroke-width:3px}
.pname.small{font-size:9.5px}
.pplanline{stroke:var(--link);stroke-width:1.5;stroke-dasharray:6 5;opacity:.8}
.pplanring{fill:none;stroke:var(--link);stroke-width:2.5}
.pplanflag text{font-size:11px;font-weight:800;fill:var(--link);paint-order:stroke;stroke:var(--bg);stroke-width:3px}
.pplanflag .pplansub{font-weight:600;font-size:10.5px}
.pperson.me circle{filter:drop-shadow(0 0 6px var(--flame))}
.pweekd{font-weight:600;opacity:.85}
.pbook rect{fill:var(--surface);stroke:var(--s-ot);stroke-width:1.6}
.pbook.nt rect{stroke:var(--s-nt)}
.pbook .pbookspine{fill:var(--s-ot);stroke:none}
.pbook.nt .pbookspine{fill:var(--s-nt)}
.pbookln{stroke:var(--s-ot);stroke-width:1.4;stroke-dasharray:3 4;opacity:.7}
.pbook.nt .pbookln{stroke:var(--s-nt)}
.pbooklab{font-size:9px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;fill:var(--s-ot)}
.pbook.nt .pbooklab{fill:var(--s-nt)}
.pbookname{font-family:var(--display);font-weight:800;fill:var(--ink)}
.pme{padding:5px 10px;font-size:.8rem;white-space:nowrap}
/* ---------- путеводитель для новичков ---------- */
.guidebanner{display:flex;align-items:center;gap:14px;width:100%;text-align:left;padding:14px 16px;border-radius:var(--r);border:1px solid var(--line);background:linear-gradient(135deg,var(--link-soft),var(--xp-soft));color:var(--ink);cursor:pointer;font:inherit}
.guidebanner:hover{border-color:var(--link)}
.guidebanner .gbshelf{display:flex;align-items:flex-end;gap:2px;height:40px;flex:none}
.guidebanner .gbshelf i{display:block;width:6px;border-radius:2px}
.guidebanner b{display:block;font-family:var(--display);font-size:1.12rem;line-height:1.2}
.guidebanner span.gbt{font-size:.86rem;color:var(--muted);line-height:1.3}
.guidebanner .gbgo{margin-left:auto;font-size:1.4rem;color:var(--link);flex:none}
.bguide{max-width:640px;gap:18px}
.bguide h3{font-family:var(--display);font-size:1.25rem;margin:0 0 6px}
.bguide p{margin:0;line-height:1.5}
.bguide .gsec{display:flex;flex-direction:column;gap:10px}
.bguide .glead{font-size:1.02rem}
.gnum{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.gnum div{background:var(--bg);border-radius:12px;padding:10px 6px;text-align:center;line-height:1.15}
.gnum b{display:block;font-family:var(--display);font-size:1.7rem;color:var(--link)}
.gnum span{font-size:.78rem;color:var(--muted)}
.shelf{display:flex;flex-direction:column;gap:4px}
.shelfhead{display:flex;justify-content:space-between;align-items:baseline;font-size:.82rem;font-weight:700}
.shelfrow{display:flex;align-items:flex-end;gap:2px;height:78px;padding:0 2px 4px;border-bottom:5px solid #b98a5a;border-radius:0 0 3px 3px}
.spine{flex:1 1 0;min-width:0;border-radius:2px 2px 0 0;position:relative;cursor:pointer;transition:transform .15s}
.spine:hover,.spine.on{transform:translateY(-5px)}
.spine.plan::after{content:"";position:absolute;left:50%;top:4px;width:4px;height:4px;margin-left:-2px;border-radius:50%;background:#fff}
.shelfinfo{min-height:1.4em;font-size:.88rem;color:var(--muted)}
.shelfinfo b{color:var(--ink)}
.glegend{display:flex;flex-wrap:wrap;gap:6px 12px;font-size:.78rem;color:var(--muted)}
.glegend span{display:inline-flex;align-items:center;gap:5px}
.glegend i{width:10px;height:10px;border-radius:3px;display:inline-block}
.gtwo{display:grid;grid-template-columns:1fr 1fr;gap:10px}
@media (max-width:420px){.gtwo{grid-template-columns:1fr}}
.gtest{border-radius:14px;padding:12px;border:1.5px solid var(--s-ot);background:var(--flame-soft)}
.gtest.nt{border-color:var(--s-nt);background:var(--xp-soft)}
.gtest h4{margin:0 0 4px;font-size:1rem;color:var(--s-ot)}
.gtest.nt h4{color:var(--s-nt)}
.gtest p{font-size:.88rem}
.gtest ul{margin:6px 0 0;padding-left:18px;font-size:.84rem;line-height:1.45}
.gref{display:flex;justify-content:center;align-items:flex-start;gap:6px;padding:14px 4px 4px;flex-wrap:wrap}
.gref>div{display:flex;flex-direction:column;align-items:center;gap:6px}
.gref .rbig{font-family:var(--display);font-size:2.1rem;font-weight:800;line-height:1;padding:4px 8px;border-radius:10px}
.gref .rlab{font-size:.74rem;font-weight:700;text-align:center;line-height:1.2;max-width:92px}
.gref .r1 .rbig{background:var(--xp-soft);color:var(--s-nt)} .gref .r1 .rlab{color:var(--s-nt)}
.gref .r2 .rbig{background:var(--flame-soft);color:var(--s-ot)} .gref .r2 .rlab{color:var(--s-ot)}
.gref .r3 .rbig{background:var(--link-soft);color:var(--link)} .gref .r3 .rlab{color:var(--link)}
.gref .rsep{font-family:var(--display);font-size:2.1rem;font-weight:800;color:var(--muted);line-height:1.6}
.gnote{font-size:.86rem;color:var(--muted);background:var(--bg);border-radius:12px;padding:10px 12px}
.groute{display:flex;flex-direction:column;gap:8px}
.groute .rl{font-size:.78rem;font-weight:800;letter-spacing:.05em;text-transform:uppercase}
.rbar{display:flex;height:34px;border-radius:10px;overflow:hidden;gap:2px}
.rbar div{display:flex;align-items:center;justify-content:center;font-size:.72rem;font-weight:700;color:#fff;white-space:nowrap;overflow:hidden;min-width:3px}
.rlist{font-size:.74rem;color:var(--muted);line-height:1.45}
.rlist b{color:var(--ink);font-weight:600}
.rmonths{display:flex;justify-content:space-between;font-size:.72rem;color:var(--muted)}
.gday{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.gday div{border-radius:12px;padding:10px;background:var(--bg);font-size:.86rem;line-height:1.35}
.gday b{display:block;font-size:1rem}
.gday span{display:block;font-size:.78rem}
.gkeys{display:flex;flex-direction:column;gap:10px;margin:0;padding:0;list-style:none}
.gkeys li{display:grid;grid-template-columns:58px 1fr;gap:12px;align-items:center}
.gkeys .gk{height:48px;border-radius:12px;background:var(--bg);display:grid;place-items:center;font-weight:800;font-variant-numeric:tabular-nums}
.gkeys .gk svg{width:30px;height:30px}
.gkeys p{font-size:.9rem;line-height:1.4}
.gkeys p b{color:var(--ink)}
.gtips{margin:0;padding-left:20px;line-height:1.5;font-size:.92rem}
/* компактная главная: оба отрывка помещаются на экран телефона */
.herort{display:flex;flex-direction:column;align-items:flex-end;gap:8px;min-width:0}
.herochips{justify-content:flex-end}
.herochips #freezeChip{font-size:.78rem;padding:4px 9px}
.thead .tht{display:flex;align-items:baseline;gap:5px;flex-wrap:wrap;min-width:0}
.thead .tht b{display:inline;font-size:.95rem}
.thead .flame{width:26px;height:32px}
@media (max-width:480px){.app>.card,.app>section.card{padding:14px}.tcard{padding:11px;gap:8px}.hero.withpace .flame{width:70px;height:88px}}
.gems .foldhead h2{flex:none}
.gemsum{flex:1;text-align:right;font-size:.82rem;color:var(--muted);font-weight:600;white-space:nowrap}
.gems .gemsbody{gap:8px}
.gems .gemsbody p{margin:0}
.gems .ladder{gap:6px}
.remind{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:var(--r);border:1px solid var(--line);background:var(--surface)}
.remind .rbell{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;background:var(--flame-soft);flex:none}
.remind .rbell svg{width:20px;height:20px}
.remind .rtxt{flex:1;min-width:0;font-size:.88rem;line-height:1.3}
.remind .rtxt b{display:block;font-size:.95rem}
.remind .rtxt span{color:var(--muted)}
.remind .rgo{flex:none;padding:8px 14px;border-radius:999px;background:var(--flame);color:#fff;font-weight:700;font-size:.85rem;white-space:nowrap}
.remind .rx{flex:none;width:28px;height:28px;border-radius:50%;background:var(--bg);color:var(--muted);font-size:1.1rem;line-height:1}
.umitem.on::after{content:" ✓";color:var(--ok)}
/* книжная полка */
.bsbtn{display:block;width:100%;padding:11px 14px;border-radius:12px;border:1.5px solid var(--line);background:var(--bg);color:var(--ink);font:inherit;font-weight:700;text-align:left;cursor:pointer}
.bsbtn>.ico{width:24px;height:24px;margin-right:8px;vertical-align:middle}
.bsbtn:hover{border-color:var(--link)}
.bshelf{max-width:600px;gap:12px}
.bsbig{display:flex;align-items:baseline;gap:8px}
.bsbig b{font-family:var(--display);font-size:2.4rem;color:var(--flame);line-height:1}
.bsbig span{color:var(--muted);font-weight:600}
.bsbar{height:8px;border-radius:99px;background:var(--bg);overflow:hidden}
.bsbar i{display:block;height:100%;background:linear-gradient(90deg,var(--flame2),var(--flame));border-radius:99px}
.spine.unread{opacity:.55}
.bslist{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
.bslist li{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:10px;background:var(--bg)}
.bslist i{width:6px;height:30px;border-radius:2px;flex:none}
.bslist div{display:flex;flex-direction:column}
.bslist b{font-size:.95rem}.bslist span{font-size:.8rem;color:var(--muted)}
.bsnext{margin:0;padding:10px 12px;border-radius:12px;background:var(--flame-soft);font-size:.9rem}
/* пройденные и свои расписания */
.fdlist{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.fdlist li{display:flex;align-items:center;gap:12px;padding:12px;border-radius:14px;background:linear-gradient(135deg,var(--flame-soft),var(--bg));border:1px solid var(--line)}
.fdflag{font-size:1.6rem;flex:none}
.fdlist div{display:flex;flex-direction:column;gap:2px}.fdlist b{font-size:1rem}.fdlist span{font-size:.82rem;color:var(--muted)}
.pedit{display:flex;align-items:center;gap:10px;padding:12px 14px;border-radius:14px;border:1.5px solid var(--line)}
.pedit.on{border-color:var(--ok)}
.pdel{flex:none;padding:7px 12px;border-radius:999px;border:1.5px solid #e5484d;background:transparent;color:#e5484d;font:inherit;font-weight:700;font-size:.82rem;cursor:pointer}
.pdel.armed{background:#e5484d;color:#fff}
.fprow{display:flex;flex-direction:column;gap:8px}
/* выбор расписания */
.ptest{position:relative;display:flex;gap:8px;transition:gap .25s ease}
.ptest .pchip{flex:1;padding:9px 10px;transition:border-radius .25s ease,background .2s,color .2s;text-align:center}
.ptest .pchip span{transition:opacity .2s}
.ptall{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-weight:800;color:#fff;pointer-events:none;opacity:0;transition:opacity .25s ease}
.ptest.both{gap:0}
.ptest.both .pt-ot{border-radius:999px 0 0 999px;border-right-color:transparent}
.ptest.both .pt-nt{border-radius:0 999px 999px 0;border-left-color:transparent}
.ptest.both .pchip span{opacity:0}
.ptest.both .ptall{opacity:1}
.pcnt{font-weight:600}
.pbooks{display:flex;flex-direction:column;gap:8px}
.pbgrp{display:grid;grid-template-columns:30px 1fr;gap:8px;align-items:stretch}
.pbsec{writing-mode:vertical-rl;transform:rotate(180deg);display:flex;align-items:center;justify-content:center;padding:8px 0;border-radius:10px;border:1.5px solid color-mix(in srgb,var(--c) 55%,transparent);background:transparent;color:var(--c);font:inherit;font-weight:800;font-size:.72rem;letter-spacing:.04em;text-transform:uppercase;cursor:pointer;white-space:nowrap;min-height:64px}
.pbsec.on{background:color-mix(in srgb,var(--c) 28%,transparent)}
.pbsec.some{background:color-mix(in srgb,var(--c) 12%,transparent)}
.pbchips{display:flex;flex-wrap:wrap;gap:5px;align-content:center}
.pchip.on{background:var(--flame);border-color:var(--flame);color:#fff}
.pbook-c{padding:5px 10px;border-radius:999px;border:1.5px solid var(--line);background:transparent;color:var(--muted);font:inherit;font-size:.8rem;font-weight:600;cursor:pointer}
.pbook-c.on{background:color-mix(in srgb,var(--c) 22%,transparent);border-color:color-mix(in srgb,var(--c) 55%,transparent);color:var(--ink)}

.pnow{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;padding:10px 12px;border-radius:12px;background:var(--bg)}
.pnow span{font-weight:700}
.psheet{max-width:560px;gap:12px}
.psheet .pback{width:36px;height:36px;border-radius:50%;background:var(--bg);color:var(--ink);font-size:1.5rem;line-height:1;flex:none}
.pcur{display:flex;flex-direction:column;gap:2px;padding:12px 14px;border-radius:14px;background:var(--flame-soft);border:1.5px solid var(--flame)}
.pcur b{font-size:1.05rem}.pcur span:last-child{font-size:.85rem;color:var(--muted)}
.pgroup{font-size:.72rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);margin-top:6px}
.pitem{display:flex;align-items:center;gap:10px;width:100%;text-align:left;padding:12px 14px;border-radius:14px;border:1.5px solid var(--line);background:var(--surface);color:var(--ink);font:inherit;cursor:pointer}
.pitem:hover{border-color:var(--link)}
.pitem.on{border-color:var(--ok);background:color-mix(in srgb,var(--ok) 10%,var(--surface))}
.ptxt{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}
.ptxt b{font-size:.98rem}.ptxt span{font-size:.82rem;color:var(--muted);line-height:1.3}
.ptxt .pdone{color:var(--link);font-weight:600}
.pmark{color:var(--ok);font-weight:800;font-size:1.2rem}
.pnew{padding:12px;border-radius:14px;border:1.5px dashed var(--link);background:var(--link-soft);color:var(--link);font:inherit;font-weight:700;cursor:pointer}
.pdesc{color:var(--muted);margin:0}
.pfield{display:flex;flex-direction:column;gap:4px;font-size:.85rem;font-weight:600;color:var(--muted)}
.pfield input{font:inherit;font-size:1rem;color:var(--ink);padding:9px 11px;border-radius:10px;border:1.5px solid var(--line);background:var(--bg)}
.psecs{display:flex;flex-direction:column;gap:8px}
.plab{font-size:.85rem;font-weight:700;color:var(--muted)}
.pchips{display:flex;gap:6px;flex-wrap:wrap}
.pchip{padding:6px 12px;border-radius:999px;border:1.5px solid var(--line);background:var(--bg);color:var(--ink);font:inherit;font-size:.85rem;font-weight:600;cursor:pointer}
.pchecks{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.pcheck,.pradio{display:flex;align-items:center;gap:8px;padding:8px 10px;border-radius:10px;background:var(--bg);font-size:.88rem;cursor:pointer}
.pcheck input,.pradio input{width:18px;height:18px;accent-color:var(--flame);flex:none}
.pcheck.ot{border-left:3px solid var(--s-ot)}.pcheck.nt{border-left:3px solid var(--s-nt)}
.pradios{display:flex;flex-direction:column;gap:6px}
.pdays{display:grid;grid-template-columns:repeat(7,1fr);gap:4px}
.pday{padding:9px 0;border-radius:10px;border:1.5px solid var(--line);background:var(--bg);color:var(--muted);font:inherit;font-weight:700;font-size:.85rem;cursor:pointer}
.pday.on{background:var(--flame);border-color:var(--flame);color:#fff}
.pprev{display:flex;flex-direction:column;gap:3px;padding:10px 12px;border-radius:12px;background:var(--link-soft);font-size:.86rem;line-height:1.35}
.pprev:empty{display:none}
.pprev span{color:var(--muted)}
.pbook rect:first-of-type{stroke:var(--c)}
.pbook .pbookspine{fill:var(--c)}
.pbook .pbooklab{fill:var(--c)}
.pbook .pbookln{stroke:var(--c)}
.pbook.done rect:first-of-type{fill:color-mix(in srgb,var(--c) 14%,var(--surface))}
.pplantag{font-size:10px;font-weight:800;fill:var(--link);paint-order:stroke;stroke:var(--bg);stroke-width:3px}
.ptestline{stroke:var(--s-nt);stroke-width:1.5;stroke-dasharray:6 5;opacity:.7}
.ptestlab{font-size:13px;font-weight:800;fill:var(--s-nt);letter-spacing:.06em;text-transform:uppercase;paint-order:stroke;stroke:var(--bg);stroke-width:4px}
.pstart line{stroke:var(--ok);stroke-width:2.5;stroke-linecap:round}
.pstart path{fill:var(--ok)}
.pstart text{font-size:12px;font-weight:800;fill:var(--ok);paint-order:stroke;stroke:var(--bg);stroke-width:3px}
.pstart .pstartsub{font-size:10.5px;font-weight:600;fill:var(--muted)}
.fold{display:block}
.foldhead{display:flex;align-items:center;gap:10px;cursor:pointer;list-style:none;user-select:none}
.foldhead::-webkit-details-marker{display:none}
.foldhead h2{flex:1}
.chev{width:28px;height:28px;border-radius:50%;background:var(--bg);border:1px solid var(--line);display:grid;place-items:center;flex:none;transition:transform .2s}
.chev::before{content:"";width:8px;height:8px;border-right:2px solid var(--ink);border-bottom:2px solid var(--ink);transform:translateY(-2px) rotate(45deg)}
.fold[open] .chev{transform:rotate(180deg)}
.foldbody{display:flex;flex-direction:column;gap:12px;margin-top:12px}
.fold2{display:grid;grid-template-columns:1fr 1fr;gap:12px;align-items:start}
.fold2:has(details[open]){grid-template-columns:1fr}
.fold2 .card{padding-top:14px;padding-bottom:14px}
.fold2:not(:has(details[open])) .foldhead h2{font-size:1rem;line-height:1.2}
.fold2:not(:has(details[open])) .foldhead{gap:6px}
.invite{background:var(--xp-soft);border:2px solid var(--xp)}
.invite .foldhead h2{color:var(--xp)}
.invite .chev{border-color:var(--xp);background:var(--surface)}
.invite .chev::before{border-color:var(--xp)}
.invite .plus{width:32px;height:32px;border-radius:50%;background:var(--xp);color:#fff;display:grid;place-items:center;font-size:1.4rem;font-weight:800;line-height:1;flex:none}
.invite .addfriend input{background:var(--surface)}
.pzoom{display:flex;align-items:center;gap:6px;justify-content:flex-end}
.pzoom .pathtitle{margin-right:auto}
.pzbtn{padding:4px 12px;font-size:1.2rem;line-height:1.1}
.pzlevel{padding:5px 10px;font-size:.8rem;font-variant-numeric:tabular-nums;min-width:4.2em}
.pathsvg{max-width:none}
.pmore{cursor:pointer}
.pmore circle{fill:var(--ink);stroke:var(--surface);stroke-width:3}
.pmore text{font-size:12px;font-weight:800;fill:var(--bg)}
.pless{font-size:11px;font-weight:700;fill:var(--link);cursor:pointer;text-decoration:underline}
.friend{cursor:pointer}
.friend:hover{border-color:var(--link)}
.fmodal{position:fixed;inset:0;z-index:35;background:color-mix(in srgb,var(--ink) 45%,transparent);display:grid;place-items:end center;padding:0}
@media (min-width:560px){.fmodal{place-items:center;padding:16px}}
.fsheet{width:100%;max-width:520px;max-height:92vh;overflow-y:auto;background:var(--surface);border-radius:20px 20px 0 0;padding:18px 18px calc(24px + env(safe-area-inset-bottom,0px));display:flex;flex-direction:column;gap:14px;animation:qin .25s ease}
@media (min-width:560px){.fsheet{border-radius:20px}}
.fhead{display:flex;align-items:center;gap:14px}
.fhead .favatar{width:64px;height:64px;font-size:1.6rem;flex:none}
.phrow{display:flex;align-items:center;gap:14px;margin:4px 0 12px}.phrow .favatar{width:72px;height:72px;font-size:1.8rem;flex:none}.phrow .favatar img,.fhead .favatar img{width:100%;height:100%;object-fit:cover}
.phcol{display:flex;flex-direction:column;align-items:flex-start;gap:6px}.phbtn{padding:9px 14px}
.fhead h2{font-size:1.5rem;overflow-wrap:anywhere}
.fclose{margin-left:auto;align-self:flex-start;width:36px;height:36px;border-radius:50%;background:var(--bg);color:var(--ink);font-size:1.3rem;flex:none}
.fstats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.fstat{min-width:0;min-height:96px;padding:10px 4px 9px;border-radius:12px;background:var(--bg);text-align:center;line-height:1.1;box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px}
.fstat b{display:block;font-family:var(--display);font-size:1.55rem;font-variant-numeric:tabular-nums;line-height:1.12}
.fstat-label{font-size:.75rem;color:var(--muted);text-align:center;line-height:1.15;min-height:1.15em}
.fstat-icon{width:30px;height:30px;display:flex;align-items:center;justify-content:center;flex:none}
.fstat-icon svg,.fstat-icon .gemicon{width:28px;height:28px;display:block;margin:0}
.fstat-icon .flame{width:25px;height:30px;flex:none}
.profile-shelf{display:flex;flex-direction:column;gap:9px}
.profile-shelf-line{display:flex;align-items:center;gap:7px;min-width:0}
.profile-shelf-line .ico{width:24px;height:24px;flex:none;margin:0}
.profile-shelf-line .ico svg{width:100%;height:100%}
.profile-shelf-name{flex:1;min-width:0}
.profile-shelf-count{font-size:.85rem;color:var(--muted);white-space:nowrap;font-variant-numeric:tabular-nums}
.profile-shelf-arrow{width:7px;height:7px;border-right:2px solid var(--muted);border-top:2px solid var(--muted);transform:rotate(45deg);flex:none;margin-right:3px}
.profile-shelf-track{display:block;height:4px;border-radius:4px;background:var(--line);overflow:hidden}
.profile-shelf-fill{display:block;height:100%;border-radius:4px;background:#e8b33a}
.freading-title strong{color:var(--ink)}
.freading{display:flex;flex-direction:column;gap:8px}
.frow{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 12px;border-radius:12px;border:1px solid var(--line)}
.frow a{color:var(--link);font-weight:700;text-decoration:underline;text-underline-offset:3px}
.frow small{color:var(--muted);display:block}
.frow .ok{color:var(--ok);font-weight:700;white-space:nowrap}
.frow .hint{white-space:nowrap;margin:0}
.fbadges{display:flex;flex-wrap:wrap;gap:6px}
.fbadges svg{width:40px;height:40px;display:block}
.fabout{white-space:pre-wrap;overflow-wrap:anywhere;margin:0;color:var(--ink);font-size:1rem;line-height:1.5;padding:12px 14px;border-radius:12px;background:var(--bg);min-height:72px}
.fabout.empty{color:var(--muted)}
.ffof{display:flex;flex-direction:column;gap:6px}
.ffrow{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:12px;background:var(--bg)}
.ffrow .favatar{width:34px;height:34px;flex:none}
.ffrow span{flex:1;min-width:0;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ffrow button{padding:7px 12px;font-size:.85rem}
.btn-xp{background:var(--xp);color:#fff;border-color:var(--xp)}
.cheerbtn{grid-column:1/-1;display:flex;align-items:center;justify-content:center;gap:6px;padding:8px 12px;border-radius:12px;font-weight:700;font-size:.9rem;background:var(--flame-soft);color:var(--ink);border:1.5px solid var(--flame)}
.cheerbtn svg{width:16px;height:20px}
.invitebtn{background:var(--xp-soft);border-color:var(--xp);color:var(--ink)}
.invitebtn svg{width:18px;height:18px;color:var(--xp)}
.cheerbtn:disabled{opacity:.65;cursor:default;background:transparent;border-style:dashed}
.cheerlist{display:flex;flex-direction:column;gap:8px}
.cheeropt{text-align:left;padding:12px 14px;border-radius:14px;border:1.5px solid var(--line);background:var(--bg);color:var(--ink);font-weight:700;font-size:1rem;line-height:1.3}
.cheeropt:hover,.cheeropt:focus-visible{border-color:var(--flame);background:var(--flame-soft)}
.cheerin{align-items:center;text-align:center}
.cheerin .flame{width:72px;height:90px;animation:cheerglow 1.6s ease-in-out infinite}
@keyframes cheerglow{0%,100%{transform:scale(1)}50%{transform:scale(1.08)}}
.cheerin .from{display:flex;align-items:center;gap:10px;justify-content:center;color:var(--muted);font-weight:600}
.cheerin .from .favatar{width:36px;height:36px}
.cheerin blockquote{margin:0;font-family:var(--display);font-size:1.45rem;line-height:1.25;color:var(--ink)}
.cheerin .acts{display:flex;flex-direction:column;gap:8px;width:100%}
.fmore{width:100%;font-weight:700;color:var(--link)}
.installcard{display:grid;grid-template-columns:auto 1fr auto;gap:10px 12px;align-items:center;padding:14px;border-radius:var(--r);background:linear-gradient(135deg,#ff7a1a,#ff4d6d);color:#fff;box-shadow:0 6px 18px color-mix(in srgb,#ff7a1a 40%,transparent);position:relative}
.instico{width:52px;height:52px;border-radius:13px;background:#fff;box-shadow:0 2px 6px rgba(0,0,0,.2)}
.insttext{display:flex;flex-direction:column;gap:2px;min-width:0;padding-right:18px}
.insttext b{font-size:1.02rem;line-height:1.25}
.insttext span{font-size:.82rem;opacity:.92}
.instgo{grid-column:1/-1;padding:12px;border-radius:12px;background:#fff;color:#e8550c;font-weight:800;font-size:1.02rem;box-shadow:0 3px 0 rgba(0,0,0,.15);animation:instpulse 2s ease-in-out infinite}
@keyframes instpulse{0%,100%{box-shadow:0 3px 0 rgba(0,0,0,.15),0 0 0 0 rgba(255,255,255,.6)}50%{box-shadow:0 3px 0 rgba(0,0,0,.15),0 0 0 6px rgba(255,255,255,0)}}
.instx{position:absolute;top:6px;right:8px;width:30px;height:30px;border-radius:50%;background:rgba(255,255,255,.22);color:#fff;font-size:1.2rem;line-height:1}
.iguide .itabs{display:flex;gap:6px}
.iguide .itab{flex:1;padding:10px;border-radius:12px;border:1.5px solid var(--line);background:var(--bg);color:var(--ink);font-weight:700}
.iguide .itab.on{border-color:var(--flame);background:var(--flame-soft)}
.isteps{display:flex;flex-direction:column;gap:14px;margin:0;padding:0;list-style:none;counter-reset:st}
.isteps li{display:flex;flex-direction:column;gap:8px;counter-increment:st}
.isteps li>p{margin:0;font-size:1.05rem;line-height:1.4;display:flex;gap:10px;align-items:flex-start}
.isteps li>p::before{content:counter(st);flex:none;width:28px;height:28px;border-radius:50%;background:var(--flame);color:#fff;font-weight:800;display:grid;place-items:center;font-size:.95rem}
.mock{border-radius:16px;border:2px solid var(--line);background:var(--surface);padding:10px;font-size:.9rem;color:var(--ink);position:relative;overflow:hidden}
.mock .bar{display:flex;justify-content:space-around;align-items:center;padding:8px 4px;border-radius:12px;background:var(--bg);color:var(--muted)}
.mock .bar{min-height:54px}
.mock .bar span{display:grid;place-items:center;width:42px;height:42px;flex:none;border-radius:50%;font-size:1.1rem}
.mock svg{width:22px;height:22px}
.hl{background:color-mix(in srgb,var(--flame) 22%,transparent)!important;color:var(--flame)!important;box-shadow:0 0 0 3px var(--flame);animation:hlp 1.4s ease-in-out infinite}
@keyframes hlp{0%,100%{box-shadow:0 0 0 3px var(--flame)}50%{box-shadow:0 0 0 7px color-mix(in srgb,var(--flame) 40%,transparent)}}
.mock .menu{display:flex;flex-direction:column;border-radius:12px;background:var(--bg)}
.mock .menu div{display:flex;justify-content:space-between;align-items:center;padding:10px 12px;border-bottom:1px solid var(--line);color:var(--muted)}
.mock .menu div:last-child{border-bottom:0}
.mock .menu div.hl{border-radius:10px;font-weight:800}
.mock .url{display:flex;align-items:center;gap:8px;padding:8px 10px;border-radius:12px;background:var(--bg);color:var(--muted)}
.mock .url b{flex:1;color:var(--ink);font-weight:600}
.mock .home{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;justify-items:center;padding:6px}
.mock .home i{width:44px;height:44px;border-radius:11px;background:var(--line)}
.mock .home img{width:44px;height:44px;border-radius:11px}
.mock .home em{font-style:normal;font-size:.7rem;text-align:center}
.mock .addhdr{display:flex;justify-content:space-between;align-items:center;font-weight:700;padding:4px 6px}
.mock .addhdr span:last-child{padding:4px 10px;border-radius:999px}
@media (prefers-reduced-motion:reduce){.instgo,.hl{animation:none}}
.fallbtn{font-size:.85rem;font-weight:700;color:var(--link)}
.ftabs{display:flex;gap:6px}
.ftab{flex:1;padding:9px 6px;border-radius:12px;border:1.5px solid var(--line);background:var(--bg);color:var(--ink);font-weight:700;font-size:.85rem}
.ftab.on{border-color:var(--xp);background:var(--xp-soft)}
.fall .fsheet{min-height:70vh}
.fallTop{position:sticky;top:-18px;z-index:2;margin:-18px -18px 0;padding:18px 18px 12px;background:var(--surface);display:flex;flex-direction:column;gap:14px;border-bottom:1px solid var(--line)}
.ftab{white-space:nowrap;min-width:0;overflow:hidden;text-overflow:ellipsis}
@media (max-width:400px){.ftab{font-size:.8rem;padding:9px 4px}}
.namegate .fsheet{gap:12px}
.nickin{font:inherit;font-size:1rem;font-weight:600;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:var(--bg);color:var(--ink);width:100%;box-sizing:border-box}
.nickin:focus{outline:2px solid var(--xp);outline-offset:1px}
.freqs,.fsubs{display:flex;flex-direction:column;gap:6px}
.freqs{padding:10px;border-radius:14px;background:var(--xp-soft);border:1.5px solid var(--xp)}
.freq{background:var(--surface);flex-wrap:wrap}
.freq span{min-width:110px}
.freq .fbtns{display:flex;gap:6px;margin-left:auto}
.fsubs .ffrow{cursor:pointer}
.frel{display:flex;flex-direction:column;gap:8px;padding:12px;border-radius:14px;background:var(--xp-soft);border:1.5px solid var(--xp)}
.frel p{margin:0}
.fsubs .ffrow small{flex:none;margin:0}
.folsbox{border-top:1px solid var(--line);padding-top:8px;margin-top:2px}
.folsbox .foldhead .label{flex:1}
.folsbox .chev{width:24px;height:24px}
.folsbox[open] .fsubs{margin-top:8px}
.howto{font-size:.9rem;color:var(--muted);gap:8px}
.howto p{margin:0}
.howto b{color:var(--ink)}
.howto .howhead{font-weight:800;color:var(--ink);margin-top:2px}
.howto .hownote{padding:8px 10px;border-radius:10px;background:var(--ice-soft);color:var(--ink)}
.howto ol{margin:0;padding-left:1.3em;display:flex;flex-direction:column;gap:4px}
#heroSub:empty{display:none}
.frzfly{position:fixed;z-index:60;width:44px;height:44px;pointer-events:none;color:var(--ice);filter:drop-shadow(0 0 8px color-mix(in srgb,var(--ice) 70%,transparent))}
.frzfly svg{width:44px;height:44px}
#freezeChip.frzpop{animation:frzpop .6s ease}
@keyframes frzpop{0%{transform:scale(1);box-shadow:0 0 0 0 color-mix(in srgb,var(--ice) 60%,transparent)}35%{transform:scale(1.18)}100%{transform:scale(1);box-shadow:0 0 0 12px transparent}}
@media (prefers-reduced-motion:reduce){#freezeChip.frzpop{animation:none}}
.frzhint{display:flex;align-items:center;justify-content:center;gap:5px;white-space:nowrap;font-size:.85rem;font-weight:600;color:var(--ice);text-align:center;line-height:1.25}
.frzhint svg{width:15px;height:15px;flex:none}
#freezeChip{border:0;cursor:pointer;font:inherit;font-size:.82rem;font-weight:600}
#copyInvite{transition:background .2s,border-color .2s,color .2s}
#copyInvite.copied{background:var(--ok);border-color:var(--ok);color:#fff;animation:savedpop .35s ease}
@media (max-width:380px){.loginTop{padding:6px 10px}}
@media (max-width:350px){.top .lvl{display:none}}
.aboutrow{display:flex;align-items:center;justify-content:space-between;gap:10px}
.aboutsave{transition:background .2s,border-color .2s}
.aboutsave.saved{background:var(--ok);border-color:var(--ok);color:#fff;animation:savedpop .35s ease}
@keyframes savedpop{0%{transform:scale(1)}40%{transform:scale(1.08)}100%{transform:scale(1)}}
textarea.aboutok{animation:aboutglow 1s ease}
@keyframes aboutglow{0%{box-shadow:0 0 0 0 color-mix(in srgb,var(--ok) 60%,transparent)}100%{box-shadow:0 0 0 10px transparent}}
@media (prefers-reduced-motion:reduce){.aboutsave.saved,textarea.aboutok{animation:none}}
.loginTop.user::after{content:"";display:inline-block;width:6px;height:6px;margin-left:7px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:translateY(-3px) rotate(45deg)}
.usermenu{position:absolute;z-index:40;min-width:210px;max-width:calc(100vw - 16px);background:var(--surface);border:1px solid var(--line);border-radius:14px;box-shadow:0 10px 30px color-mix(in srgb,var(--ink) 18%,transparent);padding:6px;display:flex;flex-direction:column;animation:qin .15s ease}
.umwho{padding:8px 10px 6px;font-size:.78rem;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-bottom:1px solid var(--line);margin-bottom:4px}
.umitem{text-align:left;padding:11px 12px;border-radius:10px;background:transparent;color:var(--ink);font-weight:700;font-size:.95rem}
.umitem:hover,.umitem:focus-visible{background:var(--bg)}
.umitem.danger{color:#d64545}
.myprof{width:100%;font-weight:700;gap:8px}
.myprof svg{width:18px;height:18px}
.fabouthint{font-size:.78rem;color:var(--link);font-weight:600}
.bellbtn{align-self:flex-start;font-size:.85rem}
@media (prefers-reduced-motion:reduce){.cheerin .flame{animation:none}}
.gemicon{display:inline-block;width:18px;height:18px;flex:none;vertical-align:-3px;background:no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M8 4h16l6 8-14 17L2 12z' fill='%2337b6e8'/%3E%3Cpath d='M2 12h28L16 29z' fill='%231d8cc4'/%3E%3Cpath d='M8 4l3 8h10l3-8z' fill='%2387dcff'/%3E%3Cpath d='M11 12l5 17 5-17z' fill='%2359c8f2'/%3E%3C/svg%3E")}
.gemicon.big{width:24px;height:24px;margin-right:8px;vertical-align:-4px}
.gemtop{display:inline-flex;align-items:center;gap:4px;padding:5px 9px;border-radius:999px;background:var(--surface);border:1px solid var(--line);color:var(--ink);text-decoration:none;font-weight:800;font-variant-numeric:tabular-nums}
.gems{border:2px solid #37b6e8}
.gemcount{font-family:var(--display);font-size:1.5rem;font-weight:800;color:#1d8cc4;font-variant-numeric:tabular-nums}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .gemcount{color:#59c8f2}}
:root[data-theme="dark"] .gemcount{color:#59c8f2}
.gemsbody{display:flex;flex-direction:column;gap:12px}
.ladder{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}
.lstep{display:flex;flex-direction:column;align-items:center;gap:2px;padding:8px 4px;border-radius:12px;border:1.5px solid var(--line);background:var(--bg);font-size:.72rem;color:var(--muted);text-align:center}
.lstep b{font-family:var(--display);font-size:1.15rem;color:var(--ink);display:flex;align-items:center;gap:3px}
.lstep.done{border-color:#37b6e8;background:color-mix(in srgb,#37b6e8 12%,var(--surface))}
.lstep.cur{border-color:#1d8cc4;box-shadow:0 0 0 2px color-mix(in srgb,#37b6e8 40%,transparent)}
.gbar{height:10px;border-radius:99px;background:var(--line);overflow:hidden}
.gbar i{display:block;height:100%;background:linear-gradient(90deg,#59c8f2,#1d8cc4);border-radius:99px}
.btn-gem{width:100%;padding:14px;font-size:1.02rem;font-weight:800;background:#1d8cc4;color:#fff;border-radius:14px;box-shadow:0 4px 0 #13648c}
.btn-gem:active{transform:translateY(3px);box-shadow:0 1px 0 #13648c}
.gtest .gprog{display:flex;gap:4px}
.gtest .gprog i{flex:1;height:6px;border-radius:99px;background:var(--line)}
.gtest .gprog i.ok{background:var(--ok)} .gtest .gprog i.no{background:#d64545} .gtest .gprog i.now{background:#37b6e8}
.gtest .qref{font-size:.78rem;color:var(--muted)}
.gtest .qtext{font-weight:700;font-size:1.08rem}
.gresult{align-items:center;text-align:center}
.gresult .gemicon{width:84px;height:84px;animation:cheerglow 1.6s ease-in-out infinite}
.gresult .score{font-family:var(--display);font-size:2.4rem;font-weight:800}
.gresult .gain{font-size:1.2rem;font-weight:800;color:#1d8cc4}
@media (prefers-reduced-motion:reduce){.gresult .gemicon{animation:none}}
/* sign-in screen */
.auth{position:fixed;inset:0;z-index:40;background:var(--bg);overflow-y:auto;display:grid;place-items:center;padding:16px;padding-top:calc(16px + env(safe-area-inset-top,0px))}
.auth-card{width:100%;max-width:400px;background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:24px 20px;display:flex;flex-direction:column;gap:14px;text-align:left}
.auth-card .flame{width:64px;height:80px}
.auth-card h1{font-size:2rem}
.auth-step{display:flex;flex-direction:column;gap:10px}
.auth-input{width:100%;font:inherit;font-size:1.2rem;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:var(--bg);color:var(--ink);font-variant-numeric:tabular-nums}
.auth-input:focus-visible{outline:3px solid var(--xp);outline-offset:1px}
.auth-error{margin:0;color:#d64545;font-size:.9rem}
.btn-main:disabled{opacity:.6;cursor:default}
.linkbtn:disabled{opacity:.5;cursor:default;text-decoration:none}
.demo-note{background:var(--xp-soft);color:var(--xp);border-radius:12px;padding:10px 14px;font-size:.85rem}
.gbtn{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;padding:14px;font-weight:700;font-size:1.02rem;border-radius:14px;background:var(--surface);color:var(--ink);border:2px solid var(--line)}
.gbtn:hover{border-color:var(--xp)}
.gbtn svg{width:22px;height:22px}
.gbtn:disabled{opacity:.6;cursor:default}

/* книги служения */
.wopt.msb{border-color:color-mix(in srgb,#7a5cc4 50%,var(--line))}
.mstabs{flex-direction:row;flex-wrap:wrap;gap:6px}
.mstab{font-size:.88rem;padding:7px 13px}
.msgrid{gap:6px}
.msgrid .pbook-c.off{opacity:.38;cursor:default;border-style:dashed}
.msgrid .pbook-c small{font-weight:500;color:var(--muted)}
.msdiv{flex-basis:100%;font-size:.72rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--muted);margin-top:4px}
.msinfo{display:flex;flex-direction:column;gap:2px;padding:9px 11px;border-radius:12px;background:var(--link-soft);font-size:.85rem}
.msinfo span{color:var(--muted)}
.msfrom{font:inherit;font-size:.95rem;color:var(--ink);padding:9px 11px;border-radius:10px;border:1.5px solid var(--line);background:var(--bg);max-width:100%}
.mspw{display:flex;gap:6px}
.mspw .pbook-c{flex:1;padding:8px 0;font-size:1rem;text-align:center}
.msrev{align-items:flex-start}
.msrev[hidden]{display:none}
.msweek{display:flex;flex-direction:column;gap:3px;margin-top:8px}
.mswh{font-size:.72rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--muted);margin-top:6px}
.msday{display:grid;grid-template-columns:52px 1fr;column-gap:8px;padding:6px 8px;border-radius:9px;background:var(--surface);border:1px solid var(--line);font-size:.84rem}
.msday b{font-weight:700}
.msday .mst{grid-column:2;font-size:.75rem;color:var(--muted);line-height:1.25}
.msday.rev{background:color-mix(in srgb,var(--flame) 10%,var(--surface));border-color:color-mix(in srgb,var(--flame) 35%,transparent)}
.msdw{grid-row:span 2;font-weight:700;color:var(--muted);font-size:.78rem;padding-top:1px}
.msday.sun .msdw{color:var(--flame)}
.mswarn{display:block;margin-top:8px;font-size:.8rem;color:#b5562c}
.tlink .mst,.nextlink .mst{font-size:.74rem;line-height:1.25;color:var(--muted);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.bssec{font-family:var(--display);font-size:1.25rem;font-weight:700;margin-top:18px;padding-top:14px;border-top:1px solid var(--line)}
.bssec.first{margin-top:4px;padding-top:0;border-top:0}
.msspine{background:linear-gradient(to top,var(--c) var(--f),var(--off) var(--f))!important}
.msbl{display:flex;flex-direction:column;gap:8px}
.msbk{display:flex;flex-direction:column;gap:7px;padding:10px 12px;border-radius:12px;border:1px solid var(--line);background:var(--surface)}
.msbtop{display:flex;gap:10px;align-items:flex-start;justify-content:space-between}
.msbt{display:flex;flex-direction:column;gap:2px;min-width:0}
.msbt span{font-size:.8rem;color:var(--muted)}
.msbp{flex:none;font-size:.72rem;font-weight:700;padding:3px 9px;border-radius:999px;background:var(--off);color:var(--muted)}
.msbp.on{background:var(--link-soft);color:var(--link)}
.msbp.ok{background:color-mix(in srgb,#2f9e6b 18%,transparent);color:#2f9e6b}
.msbbar{height:6px;border-radius:99px;background:var(--off);overflow:hidden}
.msbbar i{display:block;height:100%;border-radius:99px;background:var(--flame)}
.msbk.full .msbbar i{background:#2f9e6b}
.mswd .pbook-c{font-size:.85rem}
.mswdh{font-size:.8rem;color:var(--muted);margin-top:-2px}
.mspw .pbook-c.off{opacity:.35;cursor:default}
.mspaper{align-items:flex-start}
.msday.rest{background:transparent;border-style:dashed;opacity:.6}
.msday.rest .msdw{grid-row:auto}
.msday.rest b{font-weight:500;color:var(--muted)}
.msname{flex:1;min-width:0;align-self:center;font-family:var(--display);font-size:1.15rem;line-height:1.25}
/* экран книги служения: заголовки шагов — крупнее и с номером, чтобы их было видно */
.msform{counter-reset:msstep}
.msform .msh{counter-increment:msstep;display:flex;align-items:center;gap:9px;margin-top:14px;font-size:1.02rem;font-weight:800;color:var(--ink);letter-spacing:0;text-transform:none}
.msform .msh::before{content:counter(msstep);flex:none;width:24px;height:24px;border-radius:50%;display:grid;place-items:center;font-size:.8rem;font-weight:800;color:#fff;background:var(--flame)}
.msform .mswdh{margin-top:-4px;padding-left:33px}
.msform .msemb{margin-top:-4px}
.msptr{font-size:.88rem;font-weight:700;color:var(--link)}
.msemb.pick .msptr{animation:msnudge 1.6s ease-in-out infinite}
.msemb.pick .embpick,.msemb.pick [class*="emb"]:not(.embnow){}
.msemb.pick{border-color:var(--flame);border-style:solid;box-shadow:0 0 0 3px color-mix(in srgb,var(--flame) 22%,transparent)}
@keyframes msnudge{0%,100%{transform:translateY(0)}50%{transform:translateY(3px)}}
@media (prefers-reduced-motion:reduce){.msemb.pick .msptr{animation:none}}
/* библиотека: шкаф с полками */
.lib .libsum{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,82px),1fr));gap:6px}
.libtile{display:flex;flex-direction:column;gap:2px;padding:6px;border-radius:8px;background:var(--bg);min-width:0;text-align:center}
.libtile b{font-family:var(--display);font-size:1.22rem;line-height:1;color:var(--flame)}
.libtile b small{font-size:.73rem;color:var(--muted);font-family:inherit;margin-left:2px}
.libtile span,.libtile-status{font-size:.69rem;color:var(--muted);line-height:1.2;overflow-wrap:anywhere}
.libtile-status{font-size:.64rem}
.bcase{display:flex;flex-direction:column;gap:14px;padding:12px 10px 4px;border-radius:14px 14px 6px 6px;
  background:linear-gradient(#2e2118,#241a13);border:7px solid #8a5f3b;border-bottom-width:10px;box-shadow:inset 0 0 18px rgba(0,0,0,.55),0 3px 0 #6b4628}
.bboard{display:flex;flex-direction:column;align-items:center;gap:6px}
.bplate{display:flex;flex-direction:column;align-items:center;max-width:100%;padding:3px 12px 4px;border-radius:4px;background:linear-gradient(#f0d898,#c99c48);color:#3b2510;box-shadow:0 1px 0 rgba(0,0,0,.45),inset 0 1px 0 rgba(255,255,255,.5);text-align:center}
.bplate b{font-family:var(--display);font-size:.86rem;line-height:1.2}
.bplate span{font-size:.66rem;font-weight:700;opacity:.75;line-height:1.2}
.bcase .shelfrow{width:100%;box-sizing:border-box;border-bottom:7px solid #b98a5a;box-shadow:0 3px 0 #7a5530;border-radius:0}
.bcase .spine.unread{opacity:1;background:rgba(255,255,255,.13)}
.lsrow{height:104px}
.lspine{display:flex;align-items:flex-end;justify-content:center;overflow:hidden;border-radius:2px 2px 0 0;
  background:linear-gradient(to top,var(--c) var(--f),rgba(255,255,255,.13) var(--f))}
.lspine.unread{background:rgba(255,255,255,.13)}
.lspine i{font-style:normal;writing-mode:vertical-rl;transform:rotate(180deg);white-space:nowrap;font-size:.6rem;font-weight:700;padding:5px 0;color:#fff;text-shadow:0 1px 1px rgba(0,0,0,.6)}
.lspine.unread i{color:rgba(255,255,255,.5);text-shadow:none}
.lspine.full::before{content:"";position:absolute;left:2px;right:2px;top:7px;height:2px;background:rgba(255,255,255,.65)}
.orow{justify-content:flex-start}
.orow .lspine{flex:0 0 30px}
.orow .lspine i{font-size:.66rem}
.bslot{flex:1;align-self:center;padding:0 8px;font-size:.74rem;color:rgba(255,255,255,.5);text-align:center;line-height:1.3}
.libinfo{padding:2px 2px 0}
.spine:focus-visible{outline:2px solid #f0d898;outline-offset:1px}
.card.libcard{display:flex;flex-direction:row;align-items:center;gap:14px;width:100%;text-align:left;font:inherit;color:var(--ink);cursor:pointer;border:2px solid color-mix(in srgb,#b98a5a 55%,var(--line))}
.libcard:hover,.libcard:focus-visible{border-color:#b98a5a}
.libico{flex:none;display:flex;align-items:flex-end;gap:2px;width:52px;height:46px;padding:5px 6px 0;box-sizing:border-box;border-radius:8px;background:#2e2118;border-bottom:5px solid #b98a5a}
.libico i{flex:1;border-radius:2px 2px 0 0}
.libico i:nth-child(1){height:70%;background:#c2410c}.libico i:nth-child(2){height:88%;background:#d4a017}.libico i:nth-child(3){height:62%;background:#6b4fd8}.libico i:nth-child(4){height:95%;background:#b8722c}.libico i:nth-child(5){height:76%;background:#3b6fb0}
.libtx{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1}
.libtx b{font-family:var(--display);font-size:1.3rem}
.libtx span{font-size:.82rem;color:var(--muted)}
.libgo{font-size:1.8rem;line-height:1;color:var(--muted)}
/* надпись — на самой полке, под книгами */
.bboard{gap:0}
.bcase .shelfrow{border-bottom:0;box-shadow:none}
.bplank{width:100%;box-sizing:border-box;display:flex;align-items:baseline;justify-content:space-between;gap:8px;padding:4px 9px 5px;
  background:linear-gradient(#c9995f,#a87a47 60%,#946a3c);border-radius:2px;box-shadow:0 3px 0 #6b4628,inset 0 1px 0 rgba(255,255,255,.35);color:#3a230d}
.bplank b{font-family:var(--display);font-size:.84rem;line-height:1.15;text-shadow:0 1px 0 rgba(255,255,255,.3);min-width:0}
.bplank span{flex:none;font-size:.68rem;font-weight:700;opacity:.8;white-space:nowrap}
/* надписи на полках — гравировка золотом */
.bplank{background:linear-gradient(#8a5c34,#6f4826 55%,#5e3c1f);box-shadow:0 3px 0 #3f2712,inset 0 1px 0 rgba(255,255,255,.18),inset 0 -1px 0 rgba(0,0,0,.35)}
.bplank b,.bplank span{background:linear-gradient(180deg,#fff3c4 0%,#f4cf6a 35%,#c9952e 62%,#f2d27a 100%);-webkit-background-clip:text;background-clip:text;color:transparent;
  text-shadow:none;filter:drop-shadow(0 -1px 0 rgba(0,0,0,.55)) drop-shadow(0 1px 0 rgba(255,220,150,.25));opacity:1;letter-spacing:.02em}
.bplank b{font-size:.88rem}
/* надписи ярче: светлое золото с сиянием, золотые полоски-инкрустации на полке */
.bplank{padding:6px 10px 7px;background:linear-gradient(#6e4527,#57351c 55%,#4a2c16);
  box-shadow:0 3px 0 #2e1b0c,inset 0 1.5px 0 #e9c060,inset 0 -1.5px 0 #b8862e}
.bplank b,.bplank span{background:linear-gradient(180deg,#fffdf0 0%,#ffe891 38%,#ffc93c 62%,#fff3b8 100%);-webkit-background-clip:text;background-clip:text;color:transparent;
  filter:drop-shadow(0 0 5px rgba(255,196,64,.55)) drop-shadow(0 1px 0 rgba(0,0,0,.7))}
.bplank b{font-size:.72rem;font-weight:800;text-transform:uppercase;letter-spacing:.06em;white-space:nowrap}
.bplank span{font-size:.72rem;font-weight:800;letter-spacing:.04em}
/* шкаф светлее и теплее: медовый дуб */
.bcase{background:linear-gradient(#8a6143,#7a5338);border-color:#c99561;box-shadow:inset 0 0 14px rgba(60,30,10,.35),0 3px 0 #a87643}
.bcase .spine.unread,.lspine.unread{background:rgba(255,236,210,.24)}
.lspine{background:linear-gradient(to top,var(--c) var(--f),rgba(255,236,210,.24) var(--f))}
.lspine.unread i{color:rgba(255,248,235,.82);text-shadow:0 1px 1px rgba(60,30,10,.45)}
.bslot{color:rgba(255,244,228,.8)}
.bplank{background:linear-gradient(#a8743f,#946232 55%,#85572b);box-shadow:0 3px 0 #5e3a1a,inset 0 1.5px 0 #f3cf78,inset 0 -1.5px 0 #c99a42}
.bplank b,.bplank span{filter:drop-shadow(0 0 4px rgba(255,210,90,.45)) drop-shadow(0 1px 0 rgba(70,35,10,.85))}
/* надписи тоньше */
.bplank b{font-weight:500;letter-spacing:.08em}
.bplank span{font-weight:500}
.bplank b,.bplank span{filter:drop-shadow(0 0 3px rgba(255,210,90,.3)) drop-shadow(0 1px 0 rgba(70,35,10,.6))}
.lspine i{font-weight:500}
/* полки — тёмный орех */
.bplank{background:linear-gradient(#5a3519,#472912 55%,#3b220f);box-shadow:0 3px 0 #24140a,inset 0 1.5px 0 #e9c060,inset 0 -1.5px 0 #b8862e}
/* прочитанные книги светятся: блик, золотые полоски на корешке, мягкое сияние */
.bcase .spine:not(.unread):not(.lspine),.lspine.full{
  background-image:linear-gradient(90deg,rgba(255,255,255,.28),rgba(255,255,255,0) 35%,rgba(0,0,0,.18)),
    linear-gradient(transparent 6px,#f3d27a 6px,#f3d27a 7.5px,transparent 7.5px,transparent 10px,#f3d27a 10px,#f3d27a 11.5px,transparent 11.5px);
  box-shadow:0 0 9px rgba(255,214,120,.55),0 0 2px rgba(255,236,180,.8)}
.lspine.full::before{display:none}
.lspine.full{background-color:var(--c)}
.lspine.full i{color:#fff8e6}
.msoctl{display:flex;flex-direction:column;gap:8px}
.msoctl .msq{font-size:.95rem;padding:9px 12px}
.msolist{flex-direction:column;flex-wrap:nowrap;gap:6px;max-height:min(52vh,420px);overflow-y:auto;padding-right:2px}
.msrowb{display:flex;flex-direction:column;gap:2px;width:100%;text-align:left;padding:9px 11px;border-radius:11px;border:1.5px solid var(--line);background:var(--surface);color:var(--ink);font:inherit;cursor:pointer}
.msrowb b{font-size:.95rem;line-height:1.3;font-weight:600}.msrowb span{font-size:.74rem;color:var(--muted)}
.msrowb.on{border-color:#7a5cc4;background:color-mix(in srgb,#7a5cc4 14%,var(--surface))}
.msmore{align-self:center;padding:6px}
/* выбор книги: список с подсказкой «листайте», выбранная книга — карточкой */
.msolist{max-height:min(44vh,340px);-webkit-mask-image:linear-gradient(#000 82%,transparent);mask-image:linear-gradient(#000 82%,transparent);padding-bottom:28px}
.mshint{margin:0;font-size:.84rem;color:var(--muted)}
.msfoot{margin-top:-6px;text-align:center;font-size:.82rem;font-weight:700;color:#9b84e8}
.msinfo.pick{border:2px solid #7a5cc4;background:color-mix(in srgb,#7a5cc4 14%,var(--surface));padding:12px 13px;gap:4px}
.msinfo.pick b{font-size:1.05rem}
.msok{font-size:.76rem!important;font-weight:800;color:#9b84e8!important;text-transform:uppercase;letter-spacing:.06em}
.mschange{align-self:flex-start;margin-top:6px;padding:7px 14px;font-size:.86rem}
.msnext{margin-top:4px;font-size:.8rem!important;color:var(--muted)}
.wopt.bib{border-color:color-mix(in srgb,var(--flame) 55%,var(--line))}
.pchurch{align-self:flex-start;margin:-6px 0 4px 6px;font-size:.84rem}
/* новинка — жёлтое свечение */
.newglow{position:relative;border-color:#f5c518!important;box-shadow:0 0 0 2px #f5c518,0 0 18px rgba(245,197,24,.55);animation:newglow 1.8s ease-in-out infinite}
@keyframes newglow{0%,100%{box-shadow:0 0 0 2px #f5c518,0 0 10px rgba(245,197,24,.35)}50%{box-shadow:0 0 0 2px #f5c518,0 0 22px rgba(245,197,24,.75)}}
.newbadge{display:inline-block;margin:2px 0;padding:2px 9px;border-radius:999px;background:#f5c518!important;color:#3a2a00!important;opacity:1!important;font-size:.68rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase;align-self:flex-start;width:max-content}
.pnew.newglow{background:color-mix(in srgb,#f5c518 14%,var(--surface));color:var(--ink)}
.bn.newglow{border-radius:14px}
.bnnew{position:absolute;top:-6px;right:-2px;padding:1px 5px;border-radius:999px;background:#f5c518;color:#3a2a00;font-size:.55rem;font-weight:900;letter-spacing:.04em;box-shadow:0 0 0 2px var(--surface)}
.bnnewtip{position:absolute;bottom:calc(100% + 12px);right:-6px;white-space:nowrap;padding:8px 12px;border-radius:12px;background:#f5c518;color:#3a2a00;font-size:.8rem;font-weight:800;box-shadow:0 6px 18px rgba(0,0,0,.3);cursor:pointer;animation:ptrbob 1.6s ease-in-out infinite}
.bnnewtip::after{content:"";position:absolute;right:26px;bottom:-7px;border:7px solid transparent;border-top-color:#f5c518;border-bottom:0}
@media (prefers-reduced-motion:reduce){.newglow,.bnnewtip{animation:none}}
/* новинка — фиолетовый, цвет раздела книг служения */
.newglow{border-color:#8f72f2!important;box-shadow:0 0 0 2px #8f72f2,0 0 16px rgba(143,114,242,.5);animation:newglow2 2s ease-in-out infinite}
@keyframes newglow2{0%,100%{box-shadow:0 0 0 2px #8f72f2,0 0 8px rgba(143,114,242,.3)}50%{box-shadow:0 0 0 2px #a48cff,0 0 22px rgba(143,114,242,.7)}}
.newbadge{background:linear-gradient(135deg,#8f72f2,#b06ae8)!important;color:#fff!important}
.pnew.newglow{background:color-mix(in srgb,#8f72f2 14%,var(--surface));color:var(--ink)}
.bnnew{background:linear-gradient(135deg,#8f72f2,#b06ae8);color:#fff}
.bnnewtip{background:linear-gradient(135deg,#7f62ea,#a45fe0);color:#fff;box-shadow:0 6px 18px rgba(80,50,180,.45)}
.bnnewtip::after{border-top-color:#a45fe0}
@media (prefers-reduced-motion:reduce){.newglow{animation:none}}
.fsearch{margin:0 0 12px;display:flex;flex-direction:column;gap:8px}
.fsbar{position:relative}
.fsinput{width:100%;box-sizing:border-box;font:inherit;font-size:16px;padding:11px 40px 11px 14px;border-radius:14px;border:1.5px solid var(--line);background:var(--surface);color:var(--ink);-webkit-appearance:none;appearance:none}
.fsinput:focus{outline:none;border-color:var(--xp);box-shadow:0 0 0 3px var(--xp-soft)}
.fsinput::-webkit-search-cancel-button{display:none}
.fsclear{position:absolute;right:6px;top:50%;transform:translateY(-50%);width:30px;height:30px;border:0;border-radius:50%;background:var(--line);color:var(--ink);font-size:18px;line-height:1;cursor:pointer}
.fsres{display:flex;flex-direction:column;gap:6px;padding:10px;border-radius:14px;border:1.5px solid var(--line)}
.fsrow{align-items:center;flex-wrap:nowrap}
.fsrow .fsname{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600}
.fsrow .fsnote{color:var(--muted);font-size:12px;white-space:nowrap}
.fsrow .fsgo{color:var(--muted);font-size:20px;min-width:0}
.fshint{margin:2px 0 0}
.fsbtn{align-self:flex-start}
/* «Какой стих затронул?» */
.vsheet{gap:10px}
.vhead h2{font-size:1.35rem;margin:0}
.vheadrow{display:flex;align-items:center;gap:10px}
.vref{color:var(--muted);font-weight:700;margin-top:2px}
.vlab{font-size:.78rem;font-weight:700;color:var(--muted);margin-top:4px}
/* ---------- первый вход по шагам ---------- */
body.onbon #auth{display:none!important}
.onb{position:fixed;inset:0;z-index:9500;background:radial-gradient(120% 80% at 50% 0%,#3a1d0c 0%,#120c1e 55%,#0b0a16 100%);color:#fff3e6;display:flex;flex-direction:column;padding:max(14px,env(safe-area-inset-top)) 20px max(18px,env(safe-area-inset-bottom))}
.onb .obar{display:flex;align-items:center;gap:10px;min-height:40px}
.onb .oback{border:0;background:transparent;color:#ffd9b5;font:inherit;font-size:1.4rem;width:40px;height:40px;border-radius:50%;cursor:pointer}
.onb .oback[hidden]{visibility:hidden;display:block}
.onb .odots{flex:1;display:flex;justify-content:center;gap:7px}
.onb .odots i{width:8px;height:8px;border-radius:99px;background:rgba(255,220,190,.25);transition:all .3s}
.onb .odots i.on{width:22px;background:#ff8a1f}
.onb .oskip{min-width:40px}
.onb .ostage{flex:1;position:relative;overflow:hidden;max-width:560px;width:100%;margin:0 auto}
.onb .ostep{position:absolute;inset:0;display:flex;flex-direction:column;gap:14px;overflow-y:auto;padding:8px 2px 4px;opacity:0;transform:translateX(40px);transition:opacity .35s,transform .35s;pointer-events:none}
.onb .ostep.on{opacity:1;transform:none;pointer-events:auto}
.onb .ostep.left{transform:translateX(-40px)}
.onb h1{font-family:var(--display,Georgia,serif);font-size:1.9rem;line-height:1.15;margin:0;color:#fff3e6}
.onb h2{font-family:var(--display,Georgia,serif);font-size:1.55rem;line-height:1.2;margin:0;color:#fff3e6}
.onb p{margin:0;color:rgba(255,232,210,.78);line-height:1.5}
.onb .ohero{display:grid;place-items:center;margin:auto 0 6px}
.onb .ohero svg{width:120px;height:150px;filter:drop-shadow(0 0 30px rgba(255,140,40,.6));animation:onbfl 2.4s ease-in-out infinite}
@keyframes onbfl{0%,100%{transform:scale(1)}50%{transform:scale(1.05) translateY(-3px)}}
.onb .ocards{display:flex;flex-direction:column;gap:10px}
.onb .ocard{display:flex;gap:12px;align-items:flex-start;text-align:left;border:2px solid rgba(255,220,190,.18);background:rgba(255,255,255,.04);color:inherit;font:inherit;border-radius:18px;padding:14px;cursor:pointer;transition:border-color .2s,background .2s}
.onb .ocard.on{border-color:#ff8a1f;background:rgba(255,138,31,.14)}
.onb .ocard .ico{width:34px;height:34px;flex:none}.onb .ocard .ico svg{width:100%;height:100%}
.onb .ocard b{display:block;font-size:1.02rem;margin-bottom:2px}
.onb .ocard small{display:block;color:rgba(255,232,210,.7);line-height:1.4}
.onb .ocard .otag{display:inline-block;font-size:.66rem;font-weight:800;letter-spacing:.05em;text-transform:uppercase;background:#ff8a1f;color:#1a0d00;border-radius:99px;padding:2px 8px;margin-bottom:5px}
.onb .ofoot{display:flex;flex-direction:column;gap:10px;padding-top:12px}
.onb .ogo{border:0;border-radius:16px;background:linear-gradient(180deg,#ff9a3c,#ff7a1a);color:#1a0d00;font:inherit;font-weight:800;font-size:1.08rem;padding:16px;box-shadow:0 4px 0 #b24f0a;cursor:pointer}
.onb .ogo:disabled{opacity:.45}
.onb .olink{border:0;background:transparent;color:rgba(255,232,210,.75);font:inherit;font-size:.92rem;padding:6px;cursor:pointer;text-decoration:underline;text-underline-offset:3px}
.onb .ogoogle{display:flex;align-items:center;justify-content:center;gap:10px;border:0;border-radius:16px;background:#fff;color:#1f1f1f;font:inherit;font-weight:700;font-size:1rem;padding:14px;cursor:pointer}
.onb .ogoogle .g{width:20px;height:20px;border-radius:50%;background:conic-gradient(#ea4335 0 25%,#fbbc05 0 50%,#34a853 0 75%,#4285f4 0)}
.onb .onamein{width:100%;box-sizing:border-box;font:inherit;font-size:1.3rem;font-weight:700;padding:14px 16px;border-radius:16px;border:2px solid rgba(255,220,190,.25);background:rgba(255,255,255,.06);color:#fff}
.onb .onamein:focus{outline:none;border-color:#ff8a1f}
.onb .oav{width:76px;height:76px;border-radius:50%;background:linear-gradient(135deg,#ff9a3c,#c94f0a);display:grid;place-items:center;font-size:2rem;font-weight:800;color:#1a0d00;margin:6px 0}
.onb .otimes{display:flex;gap:8px;flex-wrap:wrap}
.onb .otime{border:2px solid rgba(255,220,190,.2);background:transparent;color:inherit;font:inherit;font-weight:800;font-size:1rem;padding:10px 16px;border-radius:14px;cursor:pointer}
.onb .otime.on{border-color:#ff8a1f;background:rgba(255,138,31,.16)}
.onb .obell{display:grid;place-items:center;margin:auto 0 0}.onb .obell .ico{width:84px;height:84px;animation:onbbell 2.6s ease-in-out infinite;transform-origin:50% 10%}.onb .obell svg{width:100%;height:100%}
@keyframes onbbell{0%,80%,100%{transform:rotate(0)}85%{transform:rotate(12deg)}90%{transform:rotate(-10deg)}95%{transform:rotate(6deg)}}
.onb .ofirst{border-radius:18px;border:2px solid #ff8a1f;background:rgba(255,138,31,.1);padding:16px;display:flex;flex-direction:column;gap:6px}
.onb .ofirst small{color:rgba(255,232,210,.65);font-weight:700;letter-spacing:.05em;text-transform:uppercase;font-size:.7rem}
.onb .ofirst b{font-size:1.25rem}
.onb .olater{display:flex;flex-direction:column;gap:6px;font-size:.9rem;color:rgba(255,232,210,.7)}
.onb .olater span{display:flex;gap:8px}
.coach{position:relative;z-index:2;box-shadow:0 0 0 3px #ff8a1f,0 0 0 9px rgba(255,138,31,.25)!important;border-radius:18px}
.coachtip{position:relative;margin:10px 0 0;background:#ff8a1f;color:#1a0d00;font-weight:700;border-radius:14px;padding:10px 38px 10px 14px;font-size:.92rem;line-height:1.35}
.coachtip button{position:absolute;right:6px;top:6px;border:0;background:transparent;font-size:1rem;cursor:pointer;color:#1a0d00}
.phbtn{display:inline-flex;align-items:center;gap:8px}.phbtn .ico{width:22px;height:22px;flex:none}.phbtn .ico svg{width:100%;height:100%}

.vchips{display:flex;flex-wrap:wrap;gap:8px;padding:2px}
.vchips .vchip.on{background:#ff8a2b!important;border-color:#ff8a2b!important;color:#1a0d00!important;transform:scale(1.08);box-shadow:0 0 0 3px rgba(255,138,43,.3)}
.vchap{flex-basis:100%;font-size:.72rem;font-weight:800;color:var(--muted);letter-spacing:.04em;text-transform:uppercase;margin-top:4px}
.vbtn{margin-left:auto;display:inline-flex;align-items:center;gap:6px;padding:4px 12px 4px 5px;border-radius:999px;border:1.5px solid #ff8a1f;background:rgba(255,138,31,.2);color:#ffe2c4;font:inherit;font-weight:600;font-size:.84rem;cursor:pointer;flex:none}
.vbtn{color:#9a4300}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .vbtn:not(.on){color:#ffe2c4}}
:root[data-theme="dark"] .vbtn:not(.on){color:#ffe2c4}
.vbq{display:inline-grid;place-items:center;width:20px;height:20px;border-radius:50%;background:#ffb020;color:#fff;font-weight:900;font-size:.8rem;line-height:1}
.vbtn.on{background:#ff8a1f;color:#1a0d00}.vbtn.on .vbq{background:#fff;color:#ff8a1f}
.vprev{border-left:3px solid #d9a520;background:var(--bg);border-radius:10px;padding:10px 12px;margin:8px 0;font-size:.95rem;line-height:1.45}
.vptop{display:flex;align-items:center;gap:6px;margin-bottom:6px}.vpout{border:1.5px solid var(--line);background:transparent;color:var(--ink);font:inherit;font-weight:700;font-size:.8rem;padding:5px 12px;border-radius:999px;cursor:pointer}
.vpfw{position:relative;overflow:hidden;border-radius:8px;height:240px;background:#1b1b1b}.vpfw.tall{height:min(68vh,560px)}
.vpframe{display:block;width:100%;border:0;position:absolute;left:0;top:-58px;height:calc(100% + 58px)}
.vptop{justify-content:flex-end}
.vpref{font-weight:800;font-size:.8rem;color:var(--muted)}.vptext sup{font-size:.65em;color:var(--muted);margin-right:2px}.vptext a{color:var(--link,#3b82f6)}
.vpopwrap{position:fixed;inset:0;z-index:9000;background:rgba(0,0,0,.45);display:flex;align-items:flex-end;justify-content:center;padding:16px}
.vpop{position:relative;width:min(520px,100%);background:var(--surface,#fff);color:var(--ink);border-radius:18px;padding:18px 16px 14px;box-shadow:0 20px 50px rgba(0,0,0,.35);margin-bottom:70px}
.vpop .vprev{margin:0;font-size:1.02rem;padding:8px}.vpx{position:absolute;top:6px;right:8px;border:0;background:transparent;color:var(--muted);font-size:1.1rem;cursor:pointer;padding:6px}
.vlink{border:0;background:transparent;padding:0;font:inherit;font-weight:800;color:inherit;text-decoration:underline dotted;text-underline-offset:3px;cursor:pointer}
.vchip{min-width:40px;height:36px;padding:0 8px;border-radius:10px;border:2px solid var(--line);background:var(--bg);color:var(--ink);font:inherit;font-weight:700;font-variant-numeric:tabular-nums;cursor:pointer}
.vreact{gap:8px}.vchip.vrc{height:40px;padding:0 12px;font-weight:600}.vnote .vnr{display:block;color:var(--muted);font-size:.8rem;margin-top:2px}
.vchip.on{border-color:var(--flame);background:color-mix(in srgb,var(--flame) 18%,var(--bg));color:var(--ink)}
.vin,.vwords{width:100%;box-sizing:border-box;font:inherit;font-size:16px;padding:10px 12px;border-radius:12px;border:1.5px solid var(--line);background:var(--bg);color:var(--ink)}
.vin:focus,.vwords:focus{outline:none;border-color:var(--xp);box-shadow:0 0 0 3px var(--xp-soft)}
.vwords{resize:vertical;min-height:84px;line-height:1.45;white-space:pre-wrap;transition:min-height .25s}.vwords:focus,.vwords.big{min-height:240px}
.vpnav{border:1.5px solid var(--line);background:transparent;color:var(--ink);font:inherit;font-weight:800;font-size:.85rem;min-width:46px;height:32px;border-radius:999px;cursor:pointer}.vpnav:disabled{opacity:.3}
.vptop .vpref{flex:1;text-align:center;font-size:.9rem;color:var(--ink)}
.vcnt{align-self:flex-end;margin:-4px 0 0}
.vsheet .btn-main:disabled{opacity:.5}
.vsheet .linkbtn{align-self:center}
.vwho{text-align:center;margin:-2px 0 0}
.vnotes{gap:8px}
.vnote{display:flex;flex-direction:column;gap:3px;padding:10px 12px;border-radius:12px;background:var(--bg);border-left:3px solid var(--flame)}
.vntop{display:flex;align-items:baseline;gap:8px}
.vntop small{color:var(--muted);margin-left:auto;white-space:nowrap}
.vnote p{margin:0;color:var(--ink);overflow-wrap:anywhere;white-space:pre-wrap}
.rgpw,.gverse .gvw{white-space:pre-wrap}
.pnote{cursor:pointer}
.pnote circle{fill:var(--flame);stroke:var(--surface);stroke-width:2.5}
.pnote text{font-size:12px;font-weight:900;fill:#fff;pointer-events:none}

/* «Библиотека»: разделы и одинаковые строки */
.libsec{font-size:.74rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);margin:6px 6px -8px}
.libcard .libtx{gap:5px}
.libbarn{font-size:.86rem!important;font-weight:700;color:var(--ink)!important}
.libbar{display:block;height:7px;border-radius:99px;background:var(--bg);overflow:hidden}
.libbar i{display:block;height:100%;width:0;border-radius:99px;background:linear-gradient(90deg,#d4a017,#b8722c)}
.lgroup{display:flex;flex-direction:column;background:var(--surface);border:1px solid var(--line);border-radius:var(--r);overflow:hidden}
.lgroup>*{border:0!important;border-radius:0!important;background:none!important;box-shadow:none!important;margin:0!important}
.lgroup>*+*{border-top:1px solid var(--line)!important}
.lgroup>.card{padding:13px 14px}
.lgroup .foldhead{gap:10px}
.lgroup .foldhead h2{flex:1;display:flex;align-items:center;gap:12px;font-size:1.1rem;min-width:0}
.lico{width:42px;height:42px;border-radius:12px;display:grid;place-items:center;flex:none;font-size:1.35rem;line-height:1}
.lico.lgem{background:color-mix(in srgb,#37b6e8 18%,transparent)}.lico.lgem .gemicon{width:26px;height:26px;margin:0;vertical-align:0}
.lico.lmedal{background:color-mix(in srgb,#f5c518 20%,transparent)}
.lico.lguide{background:var(--link-soft)}
.lico.lhow{background:var(--flame-soft)}
.ltt{display:flex;flex-direction:column;min-width:0;line-height:1.2}
.ltt b{font-family:var(--display);font-size:1.12rem}
.ltt small{font-family:var(--body);font-size:.78rem;font-weight:500;color:var(--muted);margin-top:2px}
.lgroup .gemsum{flex:none;font-size:.78rem}
.lgroup .gemcount{font-size:1.3rem}
.lgroup>.guidebanner{padding:13px 14px;gap:12px;align-items:center}
.lgroup>.guidebanner b{font-size:1.12rem}
.lgroup>.guidebanner span.gbt{font-size:.78rem;display:block;margin-top:2px}
.lgroup>.guidebanner .gbgo{font-size:1.5rem;color:var(--muted)}
.lgroup .foldbody{margin-top:14px}
/* прочитанное расписание: висит до конца дня */
.xcard.xfin{border-color:var(--ok)}
.xfinhint{margin:0;padding:9px 12px;border-radius:12px;background:color-mix(in srgb,var(--ok) 14%,var(--surface));font-size:.86rem;line-height:1.35}

/* путь: обозначение линии плана в углу */
.plegend{position:relative;height:0;z-index:3}
.plegbtn{position:absolute;left:10px;top:20px;display:inline-flex;align-items:center;gap:7px;padding:5px 10px;border-radius:999px;border:1px solid color-mix(in srgb,var(--link) 45%,var(--line));background:color-mix(in srgb,var(--surface) 88%,transparent);color:var(--link);font:inherit;font-size:.78rem;font-weight:800;cursor:pointer;box-shadow:0 2px 8px rgba(0,0,0,.18)}
.plegbtn i{display:block;width:18px;height:0;border-top:2px dashed var(--link)}
/* окна поверх глобуса не прячутся под нижней панелью */
body.globe-open .fmodal{bottom:var(--navh,70px)}
body.globe-open .fmodal .fsheet{max-height:calc(100dvh - var(--navh,70px) - 32px);min-height:0}
/* нижняя панель: иконки крупнее */
.bn .bni.ico{width:38px!important;height:38px!important}
.botnav .bn{padding:3px 2px!important}
.bn.bnglobe .bni.ico{width:46px!important;height:46px!important;margin:-6px 0}
.bn .bni:not(.ico){font-size:2.2rem!important}
.bnglobe .bni:not(.ico){font-size:2.9rem!important}
body{padding-bottom:calc(76px + env(safe-area-inset-bottom,0px))!important}
.toast{bottom:calc(72px + env(safe-area-inset-bottom,0px))!important}
/* производительность: светятся и колышутся только главный огонёк и огоньки заветов, у друзей — спокойные */
.flame:not(.off):not(.ignite){animation:none}
.flame:not(.off) .f2{animation:none}
#heroFlame:not(.off):not(.ignite){animation:flglow 2.4s ease-in-out infinite}
#heroFlame:not(.off) .f2,.thead .flame:not(.off) .f2{animation:fl2 .95s ease-in-out infinite}
@media (prefers-reduced-motion:reduce){#heroFlame,#heroFlame .f2,.thead .flame .f2{animation:none!important}}

/* настройки уведомлений */
.ntsheet{gap:14px}
.ntbell{width:48px;height:48px;border-radius:14px;display:grid;place-items:center;background:var(--flame-soft);flex:none}.ntbell .ico{width:32px;height:32px;filter:none}
.ntrow{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:14px;background:var(--bg);border:1px solid var(--line)}
.ntmain{border-color:color-mix(in srgb,var(--flame) 45%,var(--line))}
.nttx{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}.nttx b{font-size:1rem}.nttx small{font-size:.8rem;color:var(--muted);line-height:1.3}
.ntgroup{display:flex;flex-direction:column;gap:8px}
.ntgroup.off{opacity:.45;pointer-events:none}
.nttime{display:flex;align-items:baseline;gap:8px;flex:1}
.nttime b{font-family:var(--display);font-size:1.6rem;font-variant-numeric:tabular-nums;line-height:1}
.nttime small{color:var(--muted);font-size:.85rem}
.ntdel{background:none;color:var(--muted);font-size:.8rem;text-decoration:underline;padding:4px}
.ntadd{padding:11px;border-radius:14px;border:1.5px dashed var(--link);background:var(--link-soft);color:var(--link);font-weight:700}
.ntpick{display:flex;flex-direction:column;gap:8px;padding:12px;border-radius:14px;background:var(--bg);border:1px solid var(--line)}
.nthours{display:grid;grid-template-columns:repeat(6,1fr);gap:6px}
.nth{padding:9px 0;border-radius:10px;border:1.5px solid var(--line);background:var(--surface);color:var(--ink);font-weight:700;font-size:.85rem;font-variant-numeric:tabular-nums}
.nth.have{opacity:.35}
.ntpick .linkbtn{align-self:center}
.ntsw{position:relative;flex:none;width:52px;height:32px;cursor:pointer}
.ntsw input{position:absolute;opacity:0;inset:0;margin:0;cursor:pointer}
.ntsw span{position:absolute;inset:0;border-radius:999px;background:var(--off);transition:background .2s}
.ntsw span::after{content:"";position:absolute;left:3px;top:3px;width:26px;height:26px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.3);transition:transform .2s}
.ntsw input:checked+span{background:var(--ok)}
.ntsw input:checked+span::after{transform:translateX(20px)}
.ntsw input:focus-visible+span{outline:3px solid var(--xp);outline-offset:2px}
.ntperm{display:flex;flex-direction:column;gap:10px;padding:12px 14px;border-radius:14px;background:var(--flame-soft)}
.ntperm p{margin:0;font-size:.9rem;line-height:1.4}
.ntbtn{width:100%}
.ntfoot{text-align:center;margin:0}
/* пробное уведомление (демо) — как баннер на телефоне */
.ntbanner{position:fixed;left:10px;right:10px;top:calc(10px + env(safe-area-inset-top,0px));z-index:60;display:flex;gap:10px;align-items:flex-start;padding:12px 14px;border-radius:18px;background:color-mix(in srgb,#2a2f45 92%,transparent);color:#fff;box-shadow:0 10px 30px rgba(0,0,0,.4);animation:ntin .35s cubic-bezier(.2,1.2,.4,1)}
.ntbanner .ntapp{width:36px;height:36px;border-radius:9px;background:#ff7a1a;display:grid;place-items:center;font-size:1.2rem;flex:none}
.ntbanner b{display:block;font-size:.9rem}.ntbanner span{font-size:.86rem;opacity:.9;line-height:1.3}
.ntbanner small{margin-left:auto;font-size:.72rem;opacity:.6}
@keyframes ntin{from{transform:translateY(-120%)}to{transform:none}}
/* путь: «По плану» и дата в две строки */
.plegbtn span{display:flex;flex-direction:column;line-height:1.15;text-align:left}
.plegbtn span small{font-size:.72rem;font-weight:700;opacity:.85}

/* меню имени: иконки */
.umitem.umico{display:flex;align-items:center;gap:12px}
.umi{width:36px;height:36px;border-radius:10px;display:grid;place-items:center;background:var(--bg);flex:none}
.umi .ico{width:26px;height:26px;filter:none}
.umitem.umico.danger{color:#e5484d;background:transparent}

/* фото крупно */
.fhead .favatar,.gmodal .gav{cursor:zoom-in}
.phz{position:fixed;inset:0;z-index:80;display:grid;place-items:center;padding:24px;background:rgba(5,8,22,.94);animation:phzin .2s ease;cursor:zoom-out}
.phz.out{opacity:0;transition:opacity .18s}
.phzbox{display:flex;flex-direction:column;align-items:center;gap:14px;animation:phzpop .25s cubic-bezier(.2,1.3,.4,1)}
.phzbox img,.phzl{width:min(82vw,420px);height:min(82vw,420px);border-radius:28px;object-fit:cover;box-shadow:0 20px 60px rgba(0,0,0,.5);background:#2a2f45}
.phzl{display:grid;place-items:center;font-family:var(--display);font-size:min(40vw,200px);font-weight:800;color:#fff}
.phzn{color:#fff;font-family:var(--display);font-size:1.4rem;font-weight:700;text-align:center}
.phzx{position:absolute;top:calc(14px + env(safe-area-inset-top,0px));right:14px;width:40px;height:40px;border-radius:50%;background:rgba(255,255,255,.14);color:#fff;font-size:1.5rem;line-height:1}
@keyframes phzin{from{opacity:0}to{opacity:1}}
@keyframes phzpop{from{transform:scale(.6);opacity:0}to{transform:none;opacity:1}}
@media (prefers-reduced-motion:reduce){.phz,.phzbox{animation:none}}

.umitem .newbadge{margin-left:auto}
.nttip{max-width:calc(100vw - 32px)}

/* окна не уезжают вбок: длинные строки переносятся внутри, а не расширяют окно */
.fsheet{overflow-x:hidden;overscroll-behavior:contain}
.fall .fsheet{touch-action:pan-y}
.friend{grid-template-columns:auto minmax(0,1fr) auto}
.friend>*{min-width:0;max-width:100%}
.friend button{white-space:normal;max-width:100%;min-width:0}
.ftabs{min-width:0}

/* окно и страница никогда не уезжают вбок (на iPhone широкое содержимое давало качание влево-вправо) */
html,body{overflow-x:hidden;overscroll-behavior-x:none}
.fmodal{overflow:hidden;touch-action:pan-y;grid-template-columns:minmax(0,1fr)}
.fsheet{min-width:0;max-width:min(520px,100%);touch-action:pan-y}
.fall .fsheet{padding-left:18px;padding-right:18px}
.fall .fallTop{margin-left:-18px;margin-right:-18px}
.fall .friends,.fall .friend{min-width:0;max-width:100%}
.fstreak{min-width:0}
.fahead{white-space:normal;text-align:center;line-height:1.2}

.libarch{align-self:center;font-size:.85rem;color:var(--muted)}

/* «Прогресс плана» больше не отдельной карточкой во вкладке «Расписания» — он в «Библиотеке» */
#progCard{display:none!important}
.lprog{display:none!important} /* прогресс по расписанию убран совсем */
.lptitle{font-size:.74rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.larch{display:flex;flex-direction:row;align-items:center;gap:12px;width:100%;text-align:left;font:inherit;color:var(--ink);cursor:pointer;padding:13px 14px}
.larch .libgo{margin-left:auto;font-size:1.6rem;color:var(--muted)}
.archlab{margin-top:6px}
.vbtn.off,.vbtn.off:not(.on){background:transparent;border-color:var(--line);color:var(--muted);cursor:default;opacity:.75}.vbtn.off .vbq{background:var(--off);color:var(--muted)}.vbtn.off.mine .vbq{background:var(--ok);color:#fff}

/* пол */
.onb .oglab{font-size:.78rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:rgba(255,232,210,.6);margin-top:6px}
.ogender{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.onb .ogsex{border:2px solid rgba(255,220,190,.22);background:rgba(255,255,255,.05);color:#fff3e6;font:inherit;font-weight:800;font-size:1.05rem;padding:14px;border-radius:16px;cursor:pointer}
.onb .ogsex.on{border-color:#ff8a1f;background:rgba(255,138,31,.16)}
.gmodal2{display:grid;place-items:center;padding:16px}
.gsheet{max-width:360px;width:100%;gap:16px;text-align:center;border-radius:22px!important}
.gsheet h2{font-size:1.5rem}
.gsheet .ogsex{border:2px solid var(--line);background:var(--bg);color:var(--ink);font:inherit;font-weight:800;font-size:1.08rem;padding:16px 10px;border-radius:16px;cursor:pointer}
.gsheet .ogsex:active{border-color:var(--flame);background:var(--flame-soft)}
.ogsex.arm{border-color:#ff8a1f!important;background:rgba(255,138,31,.22)!important;animation:armpulse 1s ease-in-out infinite}
.gsheet .ogsex.arm{color:var(--ink)}
.ogsex small{display:block;font-size:.72rem;font-weight:700;opacity:.85;margin-top:2px}

/* Библиотека: только график-маршрут под неизменённой книжной полкой. */
.libroute-scene{flex:0 0 auto;min-width:0;min-height:190px;box-sizing:border-box;padding:10px 8px 9px;border:1px solid color-mix(in srgb,var(--link) 40%,var(--line));border-radius:15px;background:radial-gradient(ellipse at 70% 25%,rgba(99,83,168,.22),transparent 60%),linear-gradient(180deg,#202745,#161d36);overflow:hidden}
.libroute-scene svg{display:block;width:100%;height:auto;aspect-ratio:560/225;overflow:visible}
/* Управление маршрутом на телефоне: pinch, перемещение и точная дата. */
.libroute-scene svg{touch-action:none;user-select:none;-webkit-user-select:none}
.libroute-point{cursor:pointer;outline:none}
.libroute-point:focus-visible{filter:drop-shadow(0 0 7px #fff)}
.libroute-zoom{display:flex;align-items:center;justify-content:center;gap:9px;margin:6px 0 0;min-height:34px}
.libroute-zoom-btn{width:35px;height:32px;border:1px solid #666f9d;border-radius:10px;background:#293452;color:#e5eaff;font:inherit;font-size:1.25rem;font-weight:700;line-height:1;cursor:pointer;touch-action:manipulation}
.libroute-zoom-btn:disabled{opacity:.35;cursor:default}
.libroute-zoom-btn:focus-visible{outline:2px solid #9bbaff;outline-offset:2px}
.libroute-zoom-pct{min-width:49px;text-align:center;font-size:.78rem;font-weight:700;color:#d1d6f0;font-variant-numeric:tabular-nums}
.libroute-detail{display:flex;flex-direction:column;gap:4px;margin:7px 2px 1px;padding:10px 12px;border-radius:10px;border:1px solid #5384ad;background:#132943;color:#eef6ff}
.libroute-detail[hidden]{display:none}
.libroute-detail strong{font-size:.89rem;line-height:1.35}
.libroute-detail span{font-size:.78rem;line-height:1.35;color:#bde0ff}

.libroute-point{filter:drop-shadow(0 0 2px rgba(193,161,255,.5))}
.libroute-point.latest{filter:drop-shadow(0 0 6px rgba(74,239,220,.8));animation:librouteFlame 3.4s ease-in-out infinite;transform-box:fill-box;transform-origin:center}
@keyframes librouteFlame{0%,100%{filter:drop-shadow(0 0 3px rgba(74,239,220,.65))}50%{filter:drop-shadow(0 0 9px rgba(74,239,220,.95))}}
@media (prefers-reduced-motion:reduce){.libroute-point.latest{animation:none}}

@media (max-width:390px){.libroute-scene{padding:8px 4px 7px}}

/* Вкладка «Библиотека»: полка и личный глобус без отдельного модального окна */
.library-inline{display:block;width:100%;min-width:0}
.library-inline .lib-embedded{display:flex;width:100%;max-width:none;max-height:none;overflow:visible;min-width:0;box-sizing:border-box;padding:0;gap:15px;border:0;border-radius:0;background:transparent;animation:none;touch-action:auto;overscroll-behavior:auto}
.library-inline .lib-embedded .fhead{margin:0}
.library-inline .lib-embedded .fhead h2{font-size:1.4rem}
.library-inline .lib-embedded .bcase{width:100%;box-sizing:border-box}
.reading-globe-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:6px}
.reading-globe-heading h3{margin:0;font-family:var(--display);font-size:1.22rem;line-height:1.3}
.reading-globe-heading span{font-size:.76rem;white-space:nowrap;color:var(--muted)}
.reading-globe-host{width:100%;min-width:0;overflow:hidden}
.reading-globe-stage{position:relative;width:100%;overflow:hidden}
.reading-globe-stage canvas{display:block;width:100%;height:auto;touch-action:none;cursor:grab;user-select:none;-webkit-user-select:none}
.reading-globe-stage canvas:active{cursor:grabbing}
.reading-globe-controls{position:absolute;right:8px;top:10px;display:flex;flex-direction:column;gap:7px;pointer-events:auto}
.reading-globe-controls button{width:35px;height:35px;border:1px solid rgba(157,185,243,.6);border-radius:10px;background:rgba(13,24,53,.88);color:#f7f8ff;font:inherit;font-size:1.23rem;font-weight:800;cursor:pointer;touch-action:manipulation}
.reading-globe-controls button:focus-visible{outline:2px solid #96caff}
.reading-book-detail{display:flex;flex-direction:column;gap:4px;padding:12px 14px;border:1px solid #53669a;border-radius:12px;background:linear-gradient(110deg,#172c4d,#182044);color:#eff6ff}
.reading-book-detail[hidden]{display:none}
.reading-book-detail b{font-size:1rem}
.reading-book-detail span{font-size:.85rem;color:#c6d5f6}
.reading-globe-panel{position:relative;min-width:0}
.reading-globe-panel .reading-globe-stage{width:100%;height:auto;aspect-ratio:1/1;box-sizing:border-box;border:7px solid #8a5a32;border-top-color:#c49a60;border-left-color:#ab7e4b;border-right-color:#72502f;border-bottom-color:#604126;border-radius:2px;background:#0b2047;box-shadow:0 0 0 1px #49351f,0 4px 12px rgba(0,0,0,.32)}
.reading-globe-panel .reading-globe-stage::after{content:"";position:absolute;inset:0;pointer-events:none;z-index:1;box-shadow:inset 0 0 0 1px #d4ac70,inset 0 0 0 3px #654727,inset 0 0 8px 2px rgba(0,0,0,.28)}
.reading-globe-panel .reading-globe-controls{z-index:2}
.reading-globe-panel>.reading-book-detail{position:absolute;top:10px;left:10px;right:54px;max-height:40%;overflow:auto;z-index:1}
.reading-globe-hint{margin:-5px 0 3px;font-size:.77rem;line-height:1.4;color:var(--muted);text-align:center}
.awards-sheet .badges{display:grid;grid-template-columns:repeat(auto-fit,minmax(90px,1fr));gap:12px}
@media(max-width:390px){
 .reading-globe-heading{align-items:flex-start;flex-direction:column;gap:4px}
}

/* Библиотека другого читателя: две полки и квадратная карта на одном экране. */
.fsheet.lib-compact{
  --library-available:92vh;
  --library-available:92dvh;
  box-sizing:border-box;
  height:min(var(--library-available),740px);
  max-height:var(--library-available);
  padding:10px 12px calc(10px + env(safe-area-inset-bottom,0px));
  gap:7px;
}
body.globe-open .fmodal .fsheet.lib-compact{
  --library-available:calc(100dvh - var(--navh,70px) - 32px);
  max-height:var(--library-available);
}
.fsheet.lib-compact > :not(.reading-globe-panel){flex-shrink:0}
.lib-compact .fhead{gap:8px;align-items:center}
.lib-compact .fhead h2{margin:0;font-size:1.17rem;line-height:1.15}
.lib-compact .fclose{width:32px;height:32px;align-self:center}
.lib-compact .bcase{gap:5px;padding:5px 7px 4px;border-width:5px;border-bottom-width:6px;margin:0}
.lib-compact .bcase .shelfrow{height:65px;padding:0 1px 2px;gap:1.5px}
.lib-compact .bplank{padding:3px 6px 4px;gap:4px}
.lib-compact .bplank b,.lib-compact .bplank span{font-size:.65rem;letter-spacing:.025em}
.lib-compact .libinfo{margin:0;padding:0;min-height:0;font-size:.72rem;line-height:1.25}
.lib-compact .reading-globe-heading{margin:0;gap:2px;flex-direction:row;align-items:baseline;flex-wrap:wrap}
.lib-compact .reading-globe-heading h3{font-size:1.05rem;line-height:1.2}
.lib-compact .reading-globe-heading span{font-size:.72rem;line-height:1.2}
.lib-compact .reading-globe-hint{margin:0;font-size:.7rem;line-height:1.2}
.lib-compact .reading-globe-panel{flex:1 1 0;min-height:150px;display:flex;align-items:center;justify-content:center}
.lib-compact .reading-globe-host{display:flex;justify-content:center;align-items:center;height:100%;overflow:visible}
.fsheet.lib-compact .reading-globe-panel .reading-globe-stage{width:min(88%,320px,max(150px,calc(var(--library-available) - 317px)));flex:none;border-width:5px}
.lib-compact .reading-globe-stage canvas{position:absolute;top:0;left:0}
.lib-compact .reading-globe-controls{right:5px;top:5px;gap:5px}
.lib-compact .reading-globe-controls button{width:31px;height:31px;font-size:1.05rem;border-radius:8px}
@supports (width:1cqh){
  .lib-compact .reading-globe-panel{container-type:size}
  .fsheet.lib-compact .reading-globe-panel .reading-globe-stage{width:min(88%,320px,100cqh)}
}

/* Одинаковая ширина всех 66 корешков, независимо от числа книг на полке. */
.lib .bcase .bible-shelfrow{display:grid;grid-template-columns:repeat(39,minmax(0,1fr));grid-auto-flow:row;align-items:end}
.lib .bible-shelfrow .spine{width:100%;min-width:0;box-sizing:border-box}

/* Вместе в Слове — каталог открытых читателей */
#friendsAll{font-weight:700;color:var(--link)}
.reader-directory,.reader-list{display:flex;flex-direction:column;gap:8px;min-width:0}
.reader-metrics{display:grid;grid-template-columns:1fr 1fr;gap:8px;color:var(--muted);font-size:.83rem}
.reader-metrics>*{padding:10px;border-radius:12px;background:var(--bg);font-weight:600}
.reader-search{width:100%;min-width:0;box-sizing:border-box;border:1px solid var(--line);border-radius:12px;padding:12px;background:var(--bg);color:var(--ink);font:inherit}
.reader-row{display:flex;align-items:center;gap:8px;padding:8px 10px;border-radius:12px;background:var(--bg)}
.reader-profile{min-width:0;flex:1;display:flex;align-items:center;gap:9px;border:0;background:none;color:var(--ink);font:inherit;text-align:left;padding:0;cursor:pointer}
.reader-profile .favatar{width:40px;height:40px;flex:none}
.reader-name{font-weight:650;overflow-wrap:anywhere;min-width:0}
.reader-status{font-size:.73rem;color:var(--muted);text-align:right;max-width:100px}
.reader-status.friend{color:var(--ok)}
.reader-add{flex:none;font-size:.76rem;padding:7px 9px}
.fall .fallTop>.ftabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}

/* Заметный вход в новый каталог, без дополнительных вкладок. */
#friendsAll.reader-entry{width:100%;box-sizing:border-box;display:flex;align-items:center;gap:9px;margin:4px 0 12px;padding:12px 13px;border:1px solid var(--link);border-radius:14px;background:var(--bg);color:var(--ink);text-align:left;font:inherit;cursor:pointer}
#friendsAll[hidden],.reader-new[hidden]{display:none!important}
.reader-entry-text{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
.reader-entry-text b{font-family:var(--display);font-size:1.05rem;color:var(--link)}
.reader-entry-text small{font-size:.75rem;color:var(--muted);line-height:1.25}
.reader-new{flex:none;padding:3px 7px;border-radius:7px;background:#e9b949;color:#392600;font-size:.68rem;font-weight:800}
.reader-entry-arrow{flex:none;color:var(--link);font-size:1.55rem;line-height:1}

/* Stable friends loading: no pulsing or re-enter animation. */
.friends-loading{min-height:76px;display:grid;place-items:center;text-align:center;margin:0;color:var(--muted);animation:none!important}
#friendsList,.fall .friends,.fall .reader-list{min-width:0}
.fall .fsheet{animation:none; height: min(92dvh, 900px);}

/* Instant reader navigation: no second entrance animation after the network response. */
.profile-opening .fsheet,.profile-view .fsheet{animation:none}
.profile-opening .fsheet{min-height: min(260px, 60dvh)}
.profile-opening .fhead h2{min-width:0;overflow-wrap:anywhere;flex:1}

/* Preserve the reader directory behind an opened profile without a second backdrop. */
.fall.directory-covered{visibility:hidden!important;pointer-events:none!important}
