:root {
  --bg: #0c0910; --bg2: #151019; --card: #1c1522; --card2: #241b2b; --line: rgba(255,255,255,.09); --line2: rgba(255,255,255,.16);
  --text: #f6eff4; --mut: rgba(246,239,244,.62); --dim: rgba(246,239,244,.4);
  --accent: #b0285a; --accent-2: #e2457f; --gold: #f1c46b; --gold-2: #d9a24a; --violet: #7b5cff; --teal: #3fd0c9;
  --r: 16px; --r-lg: 22px;
  --serif: 'Playfair Display', Georgia, serif; --sans: 'Nunito', system-ui, sans-serif;
  --shadow: 0 18px 50px rgba(0,0,0,.45);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-weight: 600; }
body { min-height: 100vh; background: radial-gradient(1200px 600px at 50% -200px, #3a1631 0%, rgba(12,9,16,0) 70%), var(--bg); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input, textarea, select { font: inherit; color: var(--text); }
::selection { background: var(--accent); }
.serif { font-family: var(--serif); }
.mut { color: var(--mut); } .dim { color: var(--dim); }
.row { display: flex; align-items: center; gap: 10px; } .col { display: flex; flex-direction: column; gap: 10px; }
.grow { flex: 1; } .wrap { flex-wrap: wrap; }
.hide-sm { } @media (max-width: 720px) { .hide-sm { display: none !important; } }

/* ---------- каркас ---------- */
.app { position: relative; z-index: 1; min-height: 100vh; padding-bottom: 90px; }
.topbar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 14px; padding: 14px 20px; background: linear-gradient(180deg, rgba(12,9,16,.92), rgba(12,9,16,.6)); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.logo { display: flex; align-items: center; gap: 9px; }
.logo svg { filter: drop-shadow(0 0 10px rgba(226,69,127,.55)); transition: transform .4s cubic-bezier(.3,1.6,.5,1); }
.logo:hover svg { transform: scale(1.12) rotate(-8deg); }
.logo .wm { display: flex; flex-direction: column; line-height: 1; }
.logo .wm b { font-family: var(--serif); font-size: 22px; font-weight: 700; letter-spacing: .01em; background: linear-gradient(90deg, #fff, #ffc2d8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo .wm small { font-size: 10px; font-weight: 800; letter-spacing: .32em; text-transform: uppercase; color: var(--accent-2); margin-top: 3px; }
.nav { display: flex; gap: 4px; margin-left: 18px; }
.nav a { padding: 8px 14px; border-radius: 12px; color: var(--mut); font-weight: 700; font-size: 14.5px; }
.nav a.on, .nav a:hover { color: var(--text); background: rgba(255,255,255,.06); }
.gems { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 20px; background: rgba(255,255,255,.06); border: 1px solid var(--line); font-weight: 800; font-size: 14px; }
.gem { width: 14px; height: 14px; display: inline-block; background: linear-gradient(135deg, #b8f3ff, #4fb4ff 45%, #7b5cff); clip-path: polygon(50% 0, 100% 35%, 50% 100%, 0 35%); filter: drop-shadow(0 0 3px #7fd3ff); flex: none; }
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 60; display: none; justify-content: space-around; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); background: rgba(16,11,20,.94); backdrop-filter: blur(16px); border-top: 1px solid var(--line); }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 800; color: var(--dim); padding: 4px 14px; }
.tabbar a.on { color: var(--text); }
.tabbar a b { font-size: 20px; line-height: 1; }
.tabbar a > .ic { opacity: .7; } .tabbar a.on > .ic { opacity: 1; }
.tabbar a.plus b { width: 46px; height: 46px; margin-top: -22px; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent-2), var(--violet)); box-shadow: 0 8px 24px rgba(226,69,127,.5); color: #fff; font-size: 26px; }
@media (max-width: 720px) { .tabbar { display: flex; } .nav { display: none; } .topbar { padding: 12px 16px; } }
.page { max-width: 1180px; margin: 0 auto; padding: 22px 20px 40px; }
@media (max-width: 720px) { .page { padding: 16px 16px 30px; } }

/* ---------- кнопки, поля ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 22px; border-radius: 14px; font-weight: 800; font-size: 15px; transition: transform .15s, filter .15s, background .2s; white-space: nowrap; }
.btn:active { transform: scale(.97); }
.btn.primary { color: #fff; background: linear-gradient(180deg, var(--accent-2), var(--accent)); box-shadow: 0 10px 26px rgba(176,40,90,.45), inset 0 1px 0 rgba(255,255,255,.25); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.gold { color: #2a1a05; background: linear-gradient(180deg, #ffe09a, var(--gold-2)); box-shadow: 0 10px 26px rgba(241,196,107,.35); }
.btn.ghost { background: rgba(255,255,255,.06); border: 1px solid var(--line2); }
.btn.ghost:hover { background: rgba(255,255,255,.1); }
.btn.sm { height: 36px; padding: 0 14px; font-size: 13.5px; border-radius: 11px; }
.btn.xl { height: 58px; padding: 0 30px; font-size: 17px; border-radius: 18px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.iconbtn { width: 36px; height: 36px; border-radius: 11px; display: inline-grid; place-items: center; background: rgba(255,255,255,.06); border: 1px solid var(--line); font-size: 15px; }
.iconbtn:hover { background: rgba(255,255,255,.12); }
.field { display: flex; flex-direction: column; gap: 7px; }
.field > span { font-size: 13px; font-weight: 800; color: var(--mut); letter-spacing: .02em; }
.field > small { color: var(--dim); font-size: 12px; font-weight: 600; }
.input, .textarea, .select { width: 100%; padding: 13px 15px; border-radius: 13px; border: 1px solid var(--line2); background: rgba(255,255,255,.04); font-weight: 600; font-size: 15px; outline: none; transition: border .2s, background .2s; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--accent-2); background: rgba(255,255,255,.06); }
.textarea { min-height: 84px; resize: none; line-height: 1.45; field-sizing: content; max-height: 60vh; overflow-y: auto; }
.textarea.grow1 { min-height: 48px; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--mut) 50%), linear-gradient(135deg, var(--mut) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.select option { background: var(--bg2); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 20px; background: rgba(255,255,255,.06); border: 1px solid var(--line); font-size: 13.5px; font-weight: 700; cursor: pointer; transition: all .2s; }
.chip.on { background: rgba(226,69,127,.18); border-color: var(--accent-2); color: #fff; }
.tag { display: inline-flex; padding: 4px 10px; border-radius: 8px; font-size: 11.5px; font-weight: 800; letter-spacing: .04em; background: rgba(255,255,255,.08); color: var(--mut); }
.tag.hot { background: linear-gradient(90deg, var(--accent-2), var(--violet)); color: #fff; }
.tag.gold { background: rgba(241,196,107,.16); color: var(--gold); }
.h1 { font-family: var(--serif); font-size: 40px; line-height: 1.05; margin: 0; letter-spacing: -.01em; }
.h2 { font-family: var(--serif); font-size: 26px; margin: 0; }
.h3 { font-size: 13px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); margin: 0; }
@media (max-width: 720px) { .h1 { font-size: 32px; } .h2 { font-size: 22px; } }
.empty { padding: 30px; text-align: center; color: var(--mut); border: 1px dashed var(--line2); border-radius: var(--r); }

/* ---------- главная ---------- */
.banner { position: relative; height: min(62vh, 560px); min-height: 420px; border-radius: 28px; overflow: hidden; background: #000; box-shadow: var(--shadow); }
.banner .art { position: absolute; inset: 0; background-size: cover; background-position: center 20%; animation: kb 26s ease-in-out infinite alternate; }
@keyframes kb { from { transform: scale(1.02); } to { transform: scale(1.1) translate(-1%, -1%); } }
.banner::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,5,10,.92) 0%, rgba(8,5,10,.55) 45%, rgba(8,5,10,0) 75%), linear-gradient(0deg, rgba(8,5,10,.9) 0%, rgba(8,5,10,0) 45%); }
.banner .info { position: absolute; z-index: 2; left: 44px; bottom: 44px; max-width: 520px; display: flex; flex-direction: column; gap: 14px; }
.banner .title { font-family: var(--serif); font-size: 64px; line-height: .98; margin: 0; text-shadow: 0 0 30px rgba(226,69,127,.55), 0 4px 10px rgba(0,0,0,.6); }
.banner .log { font-size: 17px; line-height: 1.5; color: rgba(255,255,255,.86); }
.banner .float { position: absolute; z-index: 2; right: 6%; top: 50%; height: 84%; aspect-ratio: 2/3; border-radius: 22px; background-size: cover; background-position: center top; transform: translateY(-50%) perspective(1200px) rotateY(-9deg) rotateX(2deg); box-shadow: 0 30px 80px rgba(0,0,0,.65), 0 0 0 1px rgba(255,255,255,.12), 0 0 80px rgba(226,69,127,.25); animation: floaty 7s ease-in-out infinite; }
@keyframes floaty { 50% { transform: translateY(-52%) perspective(1200px) rotateY(-6deg) rotateX(1deg); } }
@media (min-width: 721px) { .banner .art { filter: blur(28px) saturate(1.3) brightness(.7); transform: scale(1.25); animation: none; } }
@media (max-width: 720px) { .banner .float { display: none; } }
.banner .dots { position: absolute; z-index: 3; right: 30px; bottom: 30px; display: flex; gap: 8px; }
.banner .dots i { width: 8px; height: 8px; border-radius: 4px; background: rgba(255,255,255,.35); transition: all .3s; cursor: pointer; }
.banner .dots i.on { width: 26px; background: #fff; }
@media (max-width: 720px) {
  .banner { height: 70vh; min-height: 460px; border-radius: 22px; }
  .banner::after { background: linear-gradient(0deg, rgba(8,5,10,.97) 0%, rgba(8,5,10,.6) 40%, rgba(8,5,10,0) 70%); }
  .banner .info { left: 20px; right: 20px; bottom: 26px; }
  .banner .title { font-size: 42px; }
  .banner .log { font-size: 15px; }
  .banner .float { position: absolute; z-index: 2; right: 6%; top: 50%; height: 84%; aspect-ratio: 2/3; border-radius: 22px; background-size: cover; background-position: center top; transform: translateY(-50%) perspective(1200px) rotateY(-9deg) rotateX(2deg); box-shadow: 0 30px 80px rgba(0,0,0,.65), 0 0 0 1px rgba(255,255,255,.12), 0 0 80px rgba(226,69,127,.25); animation: floaty 7s ease-in-out infinite; }
@keyframes floaty { 50% { transform: translateY(-52%) perspective(1200px) rotateY(-6deg) rotateX(1deg); } }
@media (min-width: 721px) { .banner .art { filter: blur(28px) saturate(1.3) brightness(.7); transform: scale(1.25); animation: none; } }
@media (max-width: 720px) { .banner .float { display: none; } }
.banner .dots { right: 20px; bottom: auto; top: 20px; }
}
.shelf { margin-top: 38px; }
.shelf-h { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.shelf-h .h2 { font-size: 24px; }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: 190px; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; margin: 0 -20px; padding-left: 20px; padding-right: 20px; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
@media (max-width: 720px) { .rail { grid-auto-columns: 148px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; gap: 12px; } }
.poster { position: relative; scroll-snap-align: start; aspect-ratio: 2/3; border-radius: 18px; overflow: hidden; background: linear-gradient(160deg, var(--accent), #1a0f1e); background-size: cover; background-position: center top; box-shadow: 0 12px 30px rgba(0,0,0,.4); transition: transform .25s, box-shadow .25s; display: block; }
.poster:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.12); }
.poster::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(0,0,0,.88)); }
.poster .pt { position: absolute; z-index: 1; left: 12px; right: 12px; bottom: 12px; }
.poster .pt b { display: block; font-family: var(--serif); font-size: 19px; line-height: 1.08; text-shadow: 0 2px 8px #000; }
.poster .pt small { display: block; margin-top: 5px; font-size: 11.5px; color: rgba(255,255,255,.7); font-weight: 700; }
.poster .badge { position: absolute; z-index: 1; top: 10px; left: 10px; }
.poster.make { display: grid; place-items: center; padding: 16px; background: radial-gradient(circle at 30% 20%, rgba(226,69,127,.45), transparent 55%), radial-gradient(circle at 80% 70%, rgba(123,92,255,.45), transparent 55%), #1a1220; border: 1px solid rgba(255,255,255,.12); }
.poster.make::after { display: none; }
.poster.make .plus { width: 54px; height: 54px; border-radius: 18px; display: grid; place-items: center; font-size: 30px; background: linear-gradient(135deg, var(--accent-2), var(--violet)); box-shadow: 0 10px 30px rgba(226,69,127,.5); animation: float 4s ease-in-out infinite; border-radius: 50%; color: #fff; width: 64px; height: 64px; }
@keyframes float { 50% { transform: translateY(-6px) rotate(-4deg); } }
.poster.make b { font-family: var(--serif); font-size: 21px; line-height: 1.1; }
.poster.make small { color: var(--mut); margin-top: 6px; font-size: 12.5px; line-height: 1.35; }
.poster .prog { position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, var(--accent-2), var(--gold)); animation: prog 1.6s ease-in-out infinite; }
@keyframes prog { 0% { transform: scaleX(.1); transform-origin: left; } 50% { transform: scaleX(1); transform-origin: left; } 51% { transform-origin: right; } 100% { transform: scaleX(.1); transform-origin: right; } }
.hero-card { position: relative; scroll-snap-align: start; aspect-ratio: 3/4; border-radius: 18px; overflow: hidden; background: radial-gradient(circle at 50% 30%, #3b2340, #140e18); border: 1px solid var(--line); display: block; }
.hero-card img { position: absolute; left: 50%; top: 4%; height: 150%; transform: translateX(-50%); }
.hero-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.85)); }
.hero-card b { position: absolute; z-index: 1; left: 12px; bottom: 12px; font-family: var(--serif); font-size: 19px; }
.cta-strip { margin-top: 38px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 720px) { .cta-strip { grid-template-columns: 1fr; } }
.cta { position: relative; overflow: hidden; padding: 22px; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; min-height: 150px; transition: transform .2s, border .2s; }
.cta:hover { transform: translateY(-3px); border-color: var(--line2); }
.cta .ico { font-size: 30px; }
.cta b { font-family: var(--serif); font-size: 22px; }
.cta span { color: var(--mut); font-size: 14px; line-height: 1.45; }
.cta.glow { background: radial-gradient(circle at 100% 0%, rgba(226,69,127,.35), transparent 60%), var(--card); }
.cta.glow2 { background: radial-gradient(circle at 100% 0%, rgba(123,92,255,.35), transparent 60%), var(--card); }
.cta.glow3 { background: radial-gradient(circle at 100% 0%, rgba(241,196,107,.28), transparent 60%), var(--card); }

/* ---------- страница истории ---------- */
.sp { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 36px; align-items: start; }
@media (max-width: 900px) { .sp { grid-template-columns: 1fr; gap: 22px; } }
.sp-cover { position: sticky; top: 86px; aspect-ratio: 2/3; border-radius: 26px; overflow: hidden; background: var(--card) center top / cover; box-shadow: var(--shadow), 0 0 0 1px rgba(255,255,255,.08); }
@media (max-width: 900px) { .sp-cover { position: relative; top: 0; max-width: 360px; width: 100%; margin: 0 auto; } }
.sp-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; background-size: cover; background-position: center; filter: blur(60px) saturate(1.3); opacity: .28; transform: scale(1.2); animation: spBgIn .6s ease both; }
@keyframes spBgIn { from { opacity: 0; } }
.cast { display: grid; grid-auto-flow: column; grid-auto-columns: 150px; gap: 12px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.cast::-webkit-scrollbar { display: none; }
.person { position: relative; aspect-ratio: 3/4; border-radius: 18px; overflow: hidden; background: radial-gradient(circle at 50% 30%, #3b2340, #140e18); border: 1px solid var(--line); cursor: pointer; transition: transform .2s, border .2s; }
.person:hover { transform: translateY(-3px); border-color: var(--line2); }
.person img { position: absolute; left: 50%; top: 3%; height: 160%; transform: translateX(-50%); filter: drop-shadow(0 0 6px var(--rim, transparent)); }
.person::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,.9)); }
.person .pi { position: absolute; z-index: 1; left: 11px; right: 11px; bottom: 10px; }
.person .pi b { display: block; font-family: var(--serif); font-size: 18px; }
.person .pi small { display: block; color: var(--mut); font-size: 11.5px; margin-top: 2px; }
.person .ph { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--serif); font-size: 48px; color: rgba(255,255,255,.15); }
.person .shimmer, .shimmer { background: linear-gradient(100deg, rgba(255,255,255,0) 30%, rgba(255,255,255,.08) 50%, rgba(255,255,255,0) 70%) 0 0 / 250% 100%; animation: sh 1.6s linear infinite; }
@keyframes sh { from { background-position: 150% 0; } to { background-position: -100% 0; } }
.person .role { position: absolute; z-index: 1; top: 9px; left: 9px; }
.ep-list { display: flex; flex-direction: column; gap: 10px; }
.ep { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.ep .num { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-family: var(--serif); font-size: 22px; background: rgba(255,255,255,.06); }
.ep.locked:not(.next) { opacity: .5; }
.ep.next .grow { opacity: .75; }
.heropick { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; }
.heropick button { flex: none; width: 74px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; color: var(--mut); }
.heropick .av { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; position: relative; background: var(--card2); border: 2px solid transparent; transition: border .2s; }
.heropick .av img { position: absolute; left: 50%; top: 4%; height: 330%; transform: translateX(-50%); }
.heropick button.on .av { border-color: var(--gold); box-shadow: 0 0 16px rgba(241,196,107,.45); }
.heropick button.on { color: var(--text); }
.heropick .av.add { display: grid; place-items: center; font-size: 26px; border: 2px dashed var(--line2); }

/* ---------- мастер создания ---------- */
.wiz { max-width: 980px; margin: 0 auto; }
.wiz-top { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.dots { display: flex; gap: 6px; }
.dots i { height: 6px; width: 22px; border-radius: 3px; background: rgba(255,255,255,.12); transition: all .35s; }
.dots i.on { width: 44px; background: linear-gradient(90deg, var(--accent-2), var(--gold)); }
.dots i.done { background: rgba(226,69,127,.6); }
.q { font-family: var(--serif); font-size: 38px; line-height: 1.1; margin: 0 0 8px; }
.q-sub { color: var(--mut); font-size: 16px; line-height: 1.5; margin: 0 0 22px; max-width: 640px; }
@media (max-width: 720px) { .q { font-size: 29px; } .q-sub { font-size: 14.5px; } }
.sparks { columns: 3 240px; column-gap: 14px; }
.spark { break-inside: avoid; margin-bottom: 14px; position: relative; padding: 18px 18px 16px; border-radius: 20px; cursor: pointer; overflow: hidden; border: 1.5px solid rgba(255,255,255,.08); transition: transform .2s, border .2s, box-shadow .2s; background: var(--g, #2a1b30); min-height: 120px; display: flex; flex-direction: column; gap: 12px; animation: pop .45s cubic-bezier(.2,.8,.2,1) both; }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.spark::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(10,6,12,.15) 0%, rgba(10,6,12,.82) 62%), var(--img) center / cover; transition: transform .6s; }
.spark { isolation: isolate; min-height: 190px; justify-content: flex-end; }
.spark:hover::before { transform: scale(1.06); }
.spark:hover { transform: translateY(-3px); }
.spark .st { font-family: var(--serif); font-size: 19px; line-height: 1.25; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.35); }
.spark .sg { font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.7); }
.spark .ck { position: absolute; top: 12px; right: 12px; width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgba(255,255,255,.5); display: grid; place-items: center; font-size: 14px; transition: all .2s; }
.spark.on { border-color: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.18), 0 16px 40px rgba(0,0,0,.45); transform: translateY(-3px) rotate(-.6deg); }
.spark.on .ck { background: #fff; color: #111; border-color: #fff; }
.tray { position: sticky; bottom: 76px; z-index: 80; margin-top: 18px; padding: 14px 16px; border-radius: 20px; background: rgba(28,21,34,.97); backdrop-filter: blur(16px); border: 1px solid var(--line2); box-shadow: var(--shadow); display: flex; align-items: center; gap: 14px; }
@media (min-width: 721px) { .tray { bottom: 18px; } }
.tray .t { flex: 1; font-size: 14px; color: var(--mut); line-height: 1.4; }
.tray .t b { color: var(--text); }
.tray.stack { gap: 16px; }
@media (max-width: 720px) { .tray.stack { flex-direction: column; align-items: stretch; gap: 12px; } }
.tray.stack .t b { display: block; }
.tray .t small { display: block; margin-top: 3px; font-size: 12.5px; }
.tray-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.tray-btns .btn { justify-content: center; }
@media (max-width: 720px) { .tray-btns .btn { flex: 1 1 160px; } }
.arch { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.arch-card { position: relative; padding: 18px; border-radius: 20px; background: var(--card); border: 1.5px solid var(--line); cursor: pointer; transition: all .2s; display: flex; flex-direction: column; gap: 6px; animation: pop .4s both; }
.arch-card:hover { border-color: var(--line2); transform: translateY(-2px); }
.arch-card.on { border-color: var(--accent-2); background: linear-gradient(160deg, rgba(226,69,127,.22), rgba(123,92,255,.12)), var(--card); }
.arch-card .ah, .mode-card .ah { display: flex; align-items: center; gap: 12px; }
.ib { flex: none; width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: linear-gradient(145deg, rgba(226,69,127,.16), rgba(123,92,255,.12)); border: 1px solid rgba(255,255,255,.08); box-shadow: inset 0 1px 0 rgba(255,255,255,.06); transition: transform .3s cubic-bezier(.3,1.6,.5,1), box-shadow .3s; }
.ib.big { width: 52px; height: 52px; border-radius: 16px; }
.arch-card:hover .ib, .mode-card:hover .ib { transform: rotate(-6deg) scale(1.06); }
.arch-card.on .ib, .mode-card.on .ib { box-shadow: 0 0 0 1px rgba(255,143,181,.35), 0 6px 18px rgba(226,69,127,.35); }
.ic { display: block; }
.arch-card b { font-family: var(--serif); font-size: 20px; }
.arch-card span { color: var(--mut); font-size: 13.5px; line-height: 1.4; }
.mode { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 720px) { .mode { grid-template-columns: 1fr; } }
.mode-card { padding: 26px; border-radius: 24px; background: var(--card); border: 1.5px solid var(--line); cursor: pointer; display: flex; flex-direction: column; gap: 10px; transition: all .25s; }
.mode-card:hover { transform: translateY(-3px); border-color: var(--line2); }
.mode-card.on { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(241,196,107,.15); }

.mode-card b { font-family: var(--serif); font-size: 25px; }
.mode-card span { color: var(--mut); line-height: 1.5; }
.mode-card ul { margin: 4px 0 0; padding-left: 18px; color: var(--mut); font-size: 14px; line-height: 1.7; }

/* ---------- студия (редактор) ---------- */
.studio { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 28px; align-items: start; }
@media (max-width: 900px) { .studio { grid-template-columns: 1fr; gap: 16px; } }
.steps { position: sticky; top: 86px; display: flex; flex-direction: column; gap: 4px; }
.steps a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; color: var(--mut); font-weight: 800; font-size: 14.5px; transition: background .2s; }
.steps a:hover { background: rgba(255,255,255,.04); }
.steps a.on { background: rgba(255,255,255,.07); color: var(--text); }
.steps a i { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; font-style: normal; font-size: 13px; background: rgba(255,255,255,.07); flex: none; }
.steps a.done i { background: rgba(226,69,127,.25); color: #ffd1e1; }
.steps a.on i { background: linear-gradient(135deg, var(--accent-2), var(--violet)); color: #fff; }
.steps a .step-dot { width: 8px; height: 8px; border-radius: 50%; background: #ff5f73; margin-left: auto; box-shadow: 0 0 0 3px rgba(255,95,115,.18); }
.steps .story-mini { margin-bottom: 12px; padding: 12px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.steps .story-mini b { font-family: var(--serif); font-size: 18px; display: block; }
.ep-switch { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 6px; }
.ep-switch > span { width: 100%; font-size: 12px; font-weight: 800; }
@media (max-width: 900px) {
  /* в строку: пункты не растягиваются по высоте самого высокого соседа */
  .steps { position: relative; top: 0; flex-direction: row; align-items: center; overflow-x: auto; scrollbar-width: none; gap: 6px; }
  .steps .story-mini { display: none; }
  .steps a { flex: none; padding: 8px 12px; font-size: 13px; }
  .ep-switch { flex: none; flex-wrap: nowrap; padding: 0 0 0 6px; }
  .ep-switch > span { display: none; }
}
.panel { padding: 22px; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); }
.panel + .panel { margin-top: 16px; }
.panel-h { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.panel-h .h2 { font-size: 22px; }
.editable { outline: none; border-radius: 10px; padding: 2px 6px; margin: -2px -6px; transition: background .2s; cursor: text; }
.editable:hover { background: rgba(255,255,255,.05); }
.editable:focus { background: rgba(255,255,255,.08); box-shadow: 0 0 0 2px rgba(226,69,127,.4); }
.locs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.loc { position: relative; aspect-ratio: 2/3; border-radius: 16px; overflow: hidden; background: var(--card2) center / cover; cursor: pointer; border: 1px solid var(--line); transition: transform .2s; }
.loc:hover { transform: translateY(-3px); }
.loc::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.85)); }
.loc b { position: absolute; z-index: 1; left: 10px; right: 10px; bottom: 10px; font-size: 14px; }
.add-tile { display: grid; place-items: center; border: 1.5px dashed var(--line2); border-radius: 16px; color: var(--mut); font-weight: 800; cursor: pointer; text-align: center; padding: 10px; transition: all .2s; }
.add-tile:hover { border-color: var(--accent-2); color: var(--text); background: rgba(226,69,127,.06); }
.add-tile b { display: block; font-size: 30px; margin-bottom: 6px; }

/* ---------- карта серии ---------- */
.map { position: relative; padding-left: 34px; }
.map::before { content: ''; position: absolute; left: 13px; top: 10px; bottom: 10px; width: 3px; border-radius: 2px; background: linear-gradient(180deg, var(--accent-2), var(--violet) 60%, var(--gold)); opacity: .55; }
.node { position: relative; margin-bottom: 18px; animation: pop .45s both; }
.node::before { content: attr(data-n); position: absolute; left: -34px; top: 18px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; background: var(--bg); border: 3px solid var(--accent-2); box-shadow: 0 0 14px rgba(226,69,127,.5); }
.scene { position: relative; display: grid; grid-template-columns: 120px 1fr; border-radius: 20px; overflow: hidden; background: var(--card); border: 1px solid var(--line); cursor: pointer; transition: border .2s, transform .2s; }
.scene:hover { border-color: var(--line2); }
@media (max-width: 600px) { .scene { grid-template-columns: 84px 1fr; } }
.scene .thumb { background: var(--card2) center / cover; min-height: 150px; position: relative; }
.scene .thumb::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 60%, var(--card)); }
.scene .body { padding: 14px 16px 14px 6px; display: flex; flex-direction: column; gap: 7px; }
.scene .body b { font-family: var(--serif); font-size: 19px; }
.scene .sum { color: rgba(246,239,244,.82); font-size: 14px; line-height: 1.5; }
.scene .hook { color: var(--gold); font-size: 13px; font-style: italic; line-height: 1.4; }
.avs { display: flex; }
.avs span { width: 26px; height: 26px; border-radius: 50%; overflow: hidden; position: relative; border: 2px solid var(--card); margin-right: -7px; background: var(--card2); }
.avs img { position: absolute; left: 50%; top: 2%; height: 360%; transform: translateX(-50%); }
.fork { margin: 10px 0 0 18px; padding-left: 18px; border-left: 2px dashed rgba(241,196,107,.45); display: flex; flex-direction: column; gap: 8px; }
.fork .fq { font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.opt-pill { position: relative; display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px; border-radius: 14px; background: rgba(255,255,255,.05); border: 1px solid var(--line); font-size: 14px; line-height: 1.4; }
.opt-pill::before { content: ''; position: absolute; left: -20px; top: 50%; width: 18px; border-top: 2px dashed rgba(241,196,107,.45); }
.opt-pill.prem { border-color: rgba(241,196,107,.6); background: linear-gradient(90deg, rgba(241,196,107,.14), rgba(123,92,255,.1)); }
.opt-pill small { display: block; color: var(--mut); font-size: 12.5px; margin-top: 2px; }
.cg-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 8px; font-size: 11.5px; font-weight: 800; background: linear-gradient(90deg, rgba(226,69,127,.3), rgba(123,92,255,.3)); color: #fff; }
.gap-add { display: flex; justify-content: center; margin: -8px 0 10px; opacity: 0; transition: opacity .2s; }
.map:hover .gap-add { opacity: 1; }
@media (hover: none) { .gap-add { opacity: 1; } }
.notes { display: flex; flex-direction: column; gap: 8px; }
.notes div { display: flex; gap: 10px; font-size: 14px; line-height: 1.45; color: rgba(246,239,244,.85); }
.notes div::before { content: '✦'; color: var(--gold); }
.cliff { padding: 16px 18px; border-radius: 18px; background: linear-gradient(135deg, rgba(226,69,127,.22), rgba(123,92,255,.18)); border: 1px solid rgba(226,69,127,.4); }
.stat { display: flex; gap: 22px; flex-wrap: wrap; }
.stat div b { display: block; font-family: var(--serif); font-size: 28px; }
.stat div span { color: var(--mut); font-size: 12.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }

/* ---------- текст серии ---------- */
.beats { display: flex; flex-direction: column; gap: 6px; }
.beat { display: grid; grid-template-columns: 112px 1fr auto; gap: 10px; align-items: start; padding: 8px 10px; border-radius: 12px; transition: background .2s; }
.beat:hover { background: rgba(255,255,255,.03); }
.beat .who { font-size: 12.5px; font-weight: 800; color: var(--mut); padding-top: 9px; }
.beat .who.say { color: var(--accent-2); } .beat .who.think { color: #b9a4ff; }
.beat textarea { width: 100%; border: 1px solid transparent; background: transparent; border-radius: 10px; padding: 8px 10px; font-size: 15px; line-height: 1.45; resize: none; overflow: hidden; outline: none; }
.beat textarea:hover { border-color: var(--line); }
.beat textarea:focus { border-color: var(--accent-2); background: rgba(255,255,255,.04); }
.beat.narr textarea { color: rgba(246,239,244,.82); }
.beat.think textarea { font-style: italic; color: #d9ccff; }
.beat-scene { margin: 18px 0 6px; padding: 10px 14px; border-radius: 12px; background: rgba(255,255,255,.05); font-weight: 800; font-size: 13px; display: flex; gap: 10px; align-items: center; color: var(--mut); }
.beat-choice { margin: 6px 0 6px 20px; padding: 10px 12px; border-left: 2px dashed rgba(241,196,107,.5); }
.beat-choice .ob { margin: 8px 0 4px; font-weight: 800; color: var(--gold); font-size: 14px; }
.beat .tools { display: flex; gap: 4px; opacity: 0; transition: opacity .2s; padding-top: 4px; }
.beat:hover .tools { opacity: 1; }
.beat select { background: transparent; border: 1px solid var(--line); border-radius: 8px; padding: 3px 6px; font-size: 12px; color: var(--mut); margin-top: 5px; }
@media (max-width: 600px) { .beat { grid-template-columns: 1fr; } .beat .who { padding-top: 0; } .beat .tools { opacity: 1; } }

/* ---------- ассеты ---------- */
.assets { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.asset { position: relative; aspect-ratio: 2/3; border-radius: 14px; overflow: hidden; background: var(--card2) center / cover; border: 1px solid var(--line); }
.asset.sprite { background-color: #1b1420; background-size: contain; background-repeat: no-repeat; background-position: center bottom; }
.asset small { position: absolute; left: 6px; right: 6px; bottom: 6px; font-size: 10.5px; font-weight: 800; padding: 3px 6px; border-radius: 6px; background: rgba(0,0,0,.6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.asset .redo { position: absolute; top: 6px; right: 6px; opacity: 0; transition: opacity .2s; }
.asset:hover .redo { opacity: 1; }
.asset.err { border-color: #ff6b6b; }

/* ---------- шторка / модалка ---------- */
.sheet-bg { position: fixed; inset: 0; z-index: 100; background: rgba(5,3,7,.6); backdrop-filter: blur(4px); animation: fade .25s; }
@keyframes fade { from { opacity: 0; } }
.sheet { position: fixed; z-index: 101; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(600px, calc(100vw - 48px)); max-height: min(88vh, 900px); background: var(--bg2); border: 1px solid var(--line2); border-radius: 24px; box-shadow: 0 30px 90px rgba(0,0,0,.6); display: flex; flex-direction: column; overflow: hidden; animation: sheet-in .28s cubic-bezier(.2,.8,.2,1); }
.sheet.sm { width: min(480px, calc(100vw - 48px)); }
@keyframes sheet-in { from { transform: translate(-50%, calc(-50% + 18px)) scale(.98); opacity: 0; } }
@media (max-width: 720px) { .sheet, .sheet.sm { top: auto; left: 0; bottom: 0; transform: none; width: 100vw; max-height: 92vh; border-radius: 24px 24px 0 0; border: 0; border-top: 1px solid var(--line2); animation-name: up; } @keyframes up { from { transform: translateY(60px); opacity: 0; } } }
.sheet-h { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.sheet-b { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.sheet-f { padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: flex; gap: 10px; }

/* ---------- загрузка ---------- */
.magic { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding: 60px 20px; }
.orb { width: 120px; height: 120px; border-radius: 50%; position: relative; background: conic-gradient(from 0deg, var(--accent-2), var(--violet), var(--gold), var(--accent-2)); animation: spin 3s linear infinite; filter: blur(.5px); box-shadow: 0 0 60px rgba(226,69,127,.5), 0 0 120px rgba(123,92,255,.3); }
.orb::after { content: ''; position: absolute; inset: 8px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #3a1d3f, #0c0910 70%); }
@keyframes spin { to { transform: rotate(360deg); } }
/* картинка перерисовывается: прежняя видна под затемнением с бегущим бликом */
.busy-ov { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; pointer-events: none; background: rgba(12,9,16,.5); border-radius: inherit; overflow: hidden; animation: busyIn .25s ease both; }
.busy-ov::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.16) 50%, transparent 70%) 0 0 / 250% 100%; animation: sh 1.4s linear infinite; }
.busy-ov span { position: relative; z-index: 1; display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; background: rgba(0,0,0,.55); font-size: 12.5px; font-weight: 800; white-space: nowrap; }
.busy-ov .spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255,255,255,.25); border-top-color: var(--accent-2); animation: spin .8s linear infinite; }
@keyframes busyIn { from { opacity: 0; } }
.loc, .loc-tile, .person { position: relative; }
.magic .stage-t { font-family: var(--serif); font-size: 28px; }
.magic .stage-d { color: var(--mut); max-width: 420px; line-height: 1.5; min-height: 46px; transition: opacity .4s; }
.toast { position: fixed; z-index: 200; left: 50%; bottom: 96px; transform: translateX(-50%); padding: 12px 18px; border-radius: 14px; background: #2a1d31; border: 1px solid var(--line2); box-shadow: var(--shadow); font-size: 14px; animation: pop .3s both; }
.photo-drop { position: relative; display: flex; align-items: center; gap: 16px; padding: 14px; border-radius: 18px; border: 1.5px dashed var(--line2); cursor: pointer; transition: all .2s; }
.photo-drop:hover { border-color: var(--accent-2); background: rgba(226,69,127,.05); }
.photo-drop .pv { width: 76px; height: 76px; border-radius: 18px; background: var(--card2) center / cover; display: grid; place-items: center; font-size: 28px; color: var(--mut); flex: none; }
.big-sprite { position: relative; height: 520px; border-radius: 26px; overflow: hidden; background: radial-gradient(circle at 50% 35%, #4a2448 0%, #140e18 70%); border: 1px solid var(--line); }
.big-sprite img { position: absolute; left: 50%; bottom: -12%; height: 118%; transform: translateX(-50%); filter: drop-shadow(0 0 2px var(--rim, #d07)) drop-shadow(0 0 16px rgba(226,69,127,.4)); transition: opacity .35s; }
.emo-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.emo-strip button { aspect-ratio: 3/4; border-radius: 14px; overflow: hidden; position: relative; background: radial-gradient(circle at 50% 30%, #3b2340, #1a1220); border: 2px solid transparent; transition: transform .2s, border-color .2s; }
.emo-strip button:hover:not([disabled]) { transform: translateY(-3px); }
.emo-strip button.on { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(241,196,107,.18); }
.emo-strip img { position: absolute; left: 50%; top: 6%; height: 260%; transform: translateX(-50%); }
.emo-strip button small { position: absolute; left: 0; right: 0; bottom: 0; font-size: 10px; padding: 2px; background: rgba(0,0,0,.6); text-align: center; }

.studio > *, .sp > * { min-width: 0; }
@media (max-width: 900px) { .studio, .sp { grid-template-columns: minmax(0, 1fr) !important; } }
.scene .sum { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 720px) { .cta-strip { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 76%; overflow-x: auto; scroll-snap-type: x mandatory; margin: 22px -16px 0; padding: 0 16px 4px; scrollbar-width: none; } .cta-strip::-webkit-scrollbar { display: none; } .cta { min-height: 128px; scroll-snap-align: start; padding: 18px; } .cta b { font-size: 19px; } .cta .ico { font-size: 24px; } }

/* ---------- v3: навигация, каталог, герой, прогресс, анимации ---------- */
.route { animation: pageIn .38s cubic-bezier(.2,.8,.2,1); }
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } }
.pop { animation: pop .45s cubic-bezier(.2,.8,.2,1) both; }
.fadein { animation: fade .35s ease both; }
@keyframes fade { from { opacity: 0; } }
.back { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px 0 10px; margin-bottom: 14px; border-radius: 12px; color: var(--mut); font-weight: 800; font-size: 14px; background: rgba(255,255,255,.04); border: 1px solid var(--line); transition: color .2s, background .2s, transform .2s; }
.back span { font-size: 17px; transition: transform .2s; }
.back:hover { color: var(--text); background: rgba(255,255,255,.08); }
.back:hover span { transform: translateX(-3px); }
.shelf-h .more { margin-left: auto; color: var(--mut); font-weight: 800; font-size: 14px; transition: color .2s; }
.shelf-h .more:hover { color: var(--text); }
.rail > * { animation: pop .5s cubic-bezier(.2,.8,.2,1) both; }
.rail > *:nth-child(2) { animation-delay: .05s; } .rail > *:nth-child(3) { animation-delay: .1s; } .rail > *:nth-child(4) { animation-delay: .15s; } .rail > *:nth-child(n+5) { animation-delay: .2s; }

/* каталог */
.cat-head { margin-bottom: 22px; }
.cat-tools { display: flex; gap: 10px; margin-top: 16px; }
.search { flex: 1; display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line2); transition: border-color .2s, box-shadow .2s; }
.search:focus-within { border-color: rgba(226,69,127,.6); box-shadow: 0 0 0 4px rgba(226,69,127,.12); }
.search span { color: var(--dim); font-size: 20px; }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; font-size: 15.5px; }
.search button { color: var(--dim); }
.btn.filt { height: 48px; border-radius: 16px; }
.btn.filt i { font-style: normal; min-width: 20px; height: 20px; border-radius: 10px; display: grid; place-items: center; font-size: 12px; background: var(--accent-2); color: #fff; }
.btn.filt.on { border-color: rgba(226,69,127,.5); }
.chip.sm { padding: 6px 12px; font-size: 13px; }
.linkbtn { color: var(--accent-2); font-weight: 800; font-size: 13.5px; }
.grid-posters { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
@media (max-width: 720px) { .grid-posters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .cat-tools .btn.filt { padding: 0 14px; } }
.seg { display: inline-flex; padding: 4px; gap: 4px; border-radius: 14px; background: rgba(255,255,255,.05); border: 1px solid var(--line); }
.seg button { padding: 9px 16px; border-radius: 10px; font-weight: 800; font-size: 14px; color: var(--mut); transition: background .2s, color .2s; }
.seg button.on { color: #fff; background: linear-gradient(180deg, var(--accent-2), var(--accent)); box-shadow: 0 6px 16px rgba(176,40,90,.4); }
.seg.wide { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; }
.seg.wide button { display: flex; flex-direction: column; gap: 2px; padding: 12px; }
.seg.wide button small { font-size: 12px; opacity: .75; }

/* герой */
.hero-new { max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.hn-head { display: flex; gap: 18px; align-items: center; }
.hn-art { flex: none; width: 92px; height: 112px; border-radius: 24px; display: grid; place-items: center; font-size: 44px; background: radial-gradient(circle at 30% 20%, rgba(226,69,127,.5), transparent 60%), radial-gradient(circle at 80% 80%, rgba(123,92,255,.5), transparent 60%), #1a1220; border: 1px solid var(--line2); box-shadow: 0 14px 40px rgba(226,69,127,.25); }
.hn-art span { animation: float 4s ease-in-out infinite; }
@media (max-width: 560px) { .hn-head { flex-direction: column; align-items: flex-start; } .hn-art { width: 72px; height: 84px; font-size: 34px; } }
.field em { font-style: normal; font-weight: 600; }
.hero-view { display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 32px; align-items: start; }
.hero-view > * { min-width: 0; }
@media (max-width: 900px) { .hero-view { grid-template-columns: minmax(0, 1fr); } }
.big-sprite img { bottom: auto; top: 3%; height: 125%; }
.bs-wait { position: absolute; inset: 0; display: grid; place-items: center; }
.bs-tag { position: absolute; top: 14px; right: 14px; }

/* загрузка */
.magic { padding: 46px 20px; }
.fan { position: relative; width: 150px; height: 120px; margin-bottom: 6px; }
.fan i { position: absolute; left: 50%; top: 8px; width: 74px; height: 104px; margin-left: -37px; border-radius: 12px; background: linear-gradient(160deg, #3a1f3f, #1b1221); border: 1px solid rgba(255,255,255,.14); box-shadow: 0 10px 30px rgba(0,0,0,.45); transform-origin: 50% 110%; }
.fan i::after { content: ''; position: absolute; inset: 10px 10px auto; height: 46%; border-radius: 7px; background: linear-gradient(110deg, rgba(226,69,127,.5), rgba(123,92,255,.5), rgba(241,196,107,.45)); background-size: 200% 100%; animation: sh 2.4s linear infinite; }
.fan i:nth-child(1) { animation: fanL 2.8s ease-in-out infinite; }
.fan i:nth-child(2) { animation: fanC 2.8s ease-in-out infinite; z-index: 1; }
.fan i:nth-child(3) { animation: fanR 2.8s ease-in-out infinite; }
@keyframes fanL { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(-20deg) translateY(-2px); } }
@keyframes fanR { 0%, 100% { transform: rotate(8deg); } 50% { transform: rotate(20deg) translateY(-2px); } }
@keyframes fanC { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.spk { position: absolute; color: var(--gold); font-size: 16px; animation: twinkle 2.2s ease-in-out infinite; text-shadow: 0 0 10px var(--gold); }
.spk.s1 { left: 4px; top: 10px; } .spk.s2 { right: 6px; top: 0; animation-delay: .7s; font-size: 20px; } .spk.s3 { right: 18px; bottom: 6px; animation-delay: 1.4s; font-size: 12px; }
@keyframes twinkle { 0%, 100% { opacity: .2; transform: scale(.7); } 50% { opacity: 1; transform: scale(1.1); } }
.magic .stage-d { animation: fade .5s; }
.bar { position: relative; width: min(360px, 100%); height: 6px; border-radius: 6px; background: rgba(255,255,255,.08); overflow: hidden; }
.bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; background: linear-gradient(90deg, var(--accent-2), var(--violet), var(--gold)); background-size: 200% 100%; animation: sh 2.5s linear infinite; transition: width .8s cubic-bezier(.2,.8,.2,1); }
.bar i::after { content: ''; position: absolute; right: 0; top: -3px; bottom: -3px; width: 12px; border-radius: 50%; background: #fff; filter: blur(5px); opacity: .7; }
.bar.indet i { width: 35%; animation: indet 1.5s ease-in-out infinite, sh 2.5s linear infinite; }
@keyframes indet { from { left: -35%; } to { left: 100%; } }
.bar.big { flex: 1; width: auto; height: 10px; }
.magic .bar { margin-top: 6px; }
.prog-page { max-width: 760px; margin: 0 auto; }
.prog-card { position: relative; overflow: hidden; background: radial-gradient(600px 200px at 100% 0%, rgba(226,69,127,.22), transparent), radial-gradient(500px 200px at 0% 100%, rgba(123,92,255,.18), transparent), var(--card); }
.pct { font-size: 22px; font-variant-numeric: tabular-nums; min-width: 56px; text-align: right; }
.phases { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 22px; }
@media (max-width: 640px) { .phases { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ph { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 14px; background: rgba(255,255,255,.03); border: 1px solid var(--line); color: var(--dim); transition: all .4s; }
.ph i { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 900; background: rgba(255,255,255,.08); }
.ph b { display: block; font-size: 14px; } .ph small { display: block; font-size: 12px; margin-top: 2px; line-height: 1.3; }
.ph.done { color: var(--mut); } .ph.done i { background: linear-gradient(135deg, var(--accent-2), var(--violet)); color: #fff; }
.ph.now { color: var(--text); border-color: rgba(226,69,127,.5); background: rgba(226,69,127,.08); }
.ph.now i { background: var(--accent-2); color: #fff; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(226,69,127,.6); } 50% { box-shadow: 0 0 0 7px rgba(226,69,127,0); } }
.pics { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.pic { position: relative; aspect-ratio: 2/3; border-radius: 12px; overflow: hidden; background: #1b1420 center / cover; border: 1px solid var(--line); }
.pic.spr img { position: absolute; left: 50%; bottom: 0; height: 100%; transform: translateX(-50%); }
.autobar { display: flex; align-items: center; gap: 14px; padding: 14px 18px; margin-bottom: 16px; border-radius: 18px; background: linear-gradient(90deg, rgba(226,69,127,.18), rgba(123,92,255,.14)); border: 1px solid rgba(226,69,127,.35); transition: transform .2s; }
.autobar:hover { transform: translateY(-2px); }
.autobar b { display: block; } .autobar small { display: block; color: var(--mut); font-size: 13px; margin-top: 2px; }
.autobar > span:last-child { font-weight: 800; color: var(--accent-2); white-space: nowrap; }
.autobar .pulse { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--accent-2); animation: pulse 1.6s ease-in-out infinite; }
.asset { cursor: pointer; transition: transform .2s, box-shadow .2s; }
.asset:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0,0,0,.4); }
.asset .cnt { position: absolute; top: 6px; left: 6px; font-size: 11px; font-weight: 900; padding: 2px 8px; border-radius: 8px; background: rgba(0,0,0,.6); }
.ep.next { border-color: rgba(241,196,107,.35); background: rgba(241,196,107,.05); }
.btn:hover:not([disabled]) { transform: translateY(-1px); }
.btn:active:not([disabled]) { transform: scale(.97); }

/* ---------- аккаунт ---------- */
.umenu { position: relative; }
.umenu-ph { width: 38px; height: 38px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 16px; color: #fff; background: linear-gradient(135deg, var(--accent-2), var(--violet)); box-shadow: 0 0 0 2px rgba(255,255,255,.12), 0 6px 18px rgba(226,69,127,.35); transition: transform .2s; }
.avatar:hover { transform: scale(1.06); }
.umenu-pop { position: absolute; right: 0; top: calc(100% + 10px); z-index: 80; min-width: 220px; padding: 8px; border-radius: 18px; background: var(--bg2); border: 1px solid var(--line2); box-shadow: var(--shadow); display: flex; flex-direction: column; animation: pop .25s cubic-bezier(.2,.8,.2,1); }
.umenu-pop .um-h { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.umenu-pop .um-h b { display: block; } .umenu-pop .um-h small { color: var(--dim); font-size: 12.5px; }
.umenu-pop a, .umenu-pop button { text-align: left; padding: 10px 12px; border-radius: 10px; font-weight: 700; font-size: 14.5px; color: var(--mut); }
.umenu-pop a:hover, .umenu-pop button:hover { background: rgba(255,255,255,.06); color: var(--text); }
.topbar .umenu, .topbar > .btn.sm { margin-left: 10px; }
.seg.wide2 { display: grid; grid-template-columns: 1fr 1fr; }
.auth-err { padding: 10px 14px; border-radius: 12px; background: rgba(255,90,110,.12); border: 1px solid rgba(255,90,110,.35); color: #ffb3bf; font-size: 14px; animation: pop .3s; }
.linkbtn { cursor: pointer; }
.auth-ok { display: flex; gap: 11px; align-items: flex-start; padding: 2px 2px; color: var(--mut); font-size: 14px; line-height: 1.45; cursor: pointer; user-select: none; border-radius: 8px; }
.auth-ok:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 4px; }
.auth-ok a { color: var(--text); text-decoration: underline; text-underline-offset: .18em; text-decoration-color: var(--line2); }
.auth-ok a:hover { text-decoration-color: currentColor; }
.auth-ok.on .cbx { background: var(--accent-2); border-color: var(--accent-2); }
.auth-ok.on .cbx::after { transform: rotate(45deg) scale(1); }
.auth-legal { align-self: center; margin-top: -6px; color: var(--dim); font-size: 12px; text-decoration: none; }
.auth-legal:hover { color: var(--mut); text-decoration: underline; }
.legal-note { margin: 0; color: var(--dim); font-size: 12px; line-height: 1.5; }
.legal-note a, .of-legal a, .tu-note a { color: inherit; text-decoration: underline; text-underline-offset: .18em; }
.legal-note a:hover, .of-legal a:hover, .tu-note a:hover { color: var(--text); }
.pf-legal { align-self: center; margin-top: 6px; color: var(--dim); font-size: 12.5px; text-decoration: none; }
.pf-legal:hover { color: var(--mut); text-decoration: underline; }
.guest-cta { margin-top: 34px; display: flex; gap: 20px; align-items: center; flex-wrap: wrap; padding: 24px; border-radius: var(--r-lg); background: radial-gradient(500px 200px at 0% 0%, rgba(226,69,127,.25), transparent), radial-gradient(400px 200px at 100% 100%, rgba(123,92,255,.2), transparent), var(--card); border: 1px solid var(--line2); }
.guest-cta p { margin: 8px 0 0; line-height: 1.5; }
.gc-art { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; font-size: 30px; color: #fff; background: linear-gradient(135deg, var(--accent-2), var(--violet)); box-shadow: 0 10px 30px rgba(226,69,127,.45); }
.gc-art span { animation: twinkle 2.4s ease-in-out infinite; }
/* гость: кошелька нет — «Войти» прижимается вправо сам */
.topbar > .btn.sm, .topbar > .umenu-ph { margin-left: auto; }
.gate { max-width: 520px; margin: 40px auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 36px 24px; border-radius: var(--r-lg); background: radial-gradient(400px 200px at 50% 0%, rgba(226,69,127,.22), transparent), var(--card); border: 1px solid var(--line2); }
.gate p { margin: 0 0 6px; line-height: 1.5; }
.heropick small.own { display: block; margin-top: -3px; font-size: 10px; font-weight: 800; color: var(--gold); letter-spacing: .02em; }
.um-id { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 10px; padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.05); border: 1px solid var(--line); color: var(--mut); font-size: 12.5px; text-align: left; transition: background .2s, color .2s; }
.um-id:hover { background: rgba(255,255,255,.09); color: var(--text); }
.um-id span { font-weight: 800; }
.um-id code { flex: 1; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.umenu-pop { min-width: 250px; }

/* ---------- профиль ---------- */
.profile { max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }
.pf-head { display: flex; gap: 18px; align-items: center; }
.pf-av { flex: none; width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; font: 800 30px var(--sans); color: #fff; background: linear-gradient(135deg, var(--accent-2), var(--violet)); }
.pf-name { width: 100%; font: 700 30px/1.15 var(--serif); color: var(--text); background: transparent; border: 0; border-bottom: 1px dashed transparent; padding: 2px 0; outline: none; }
.pf-name:hover, .pf-name:focus { border-bottom-color: var(--line2); }
.pf-id { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); text-align: left; color: var(--mut); }
.pf-id:hover { border-color: var(--line2); color: var(--text); }
.pf-id div { flex: 1; min-width: 0; } .pf-id b { display: block; color: var(--text); font-size: 15px; } .pf-id span { font-size: 13px; }
.pf-id code { font-size: 14px; color: var(--text); white-space: nowrap; }
@media (max-width: 520px) { .pf-id { flex-wrap: wrap; } .pf-id code { order: 3; width: 100%; } }
.pf-sec { display: flex; flex-direction: column; gap: 12px; }
.themes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.theme-card { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 16px; background: var(--card); border: 1.5px solid var(--line); text-align: left; transition: border-color .2s; }
.theme-card.on { border-color: var(--accent-2); }
.theme-card b { font-size: 16px; } .theme-card .tc-d { font-size: 12.5px; color: var(--mut); line-height: 1.35; }
.tc-prev { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 6px; height: 64px; padding: 8px; border-radius: 10px; margin-bottom: 4px; }
.tc-prev i { border-radius: 6px; }
.t-classic .tc-prev { background: #140e18; } .t-classic .tc-prev i:nth-child(1) { background: linear-gradient(135deg, #e2457f, #7b5cff); } .t-classic .tc-prev i:nth-child(2) { background: #241b2b; } .t-classic .tc-prev i:nth-child(3) { background: #f1c46b; }
.t-arcana .tc-prev { background: #0B2221; box-shadow: inset 0 0 0 1px #C8963E; } .t-arcana .tc-prev i:nth-child(1) { background: #EEE6D6; } .t-arcana .tc-prev i:nth-child(2) { background: #12302F; box-shadow: inset 0 0 0 1px #C8963E; } .t-arcana .tc-prev i:nth-child(3) { background: #C8963E; }
.pf-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); flex-wrap: wrap; }
.pf-row > .grow { flex: 1 1 0; min-width: 0; }
.pf-row b { display: block; font-size: 15px; } .pf-row span { font-size: 13px; color: var(--mut); }
.switch-t { position: relative; width: 50px; height: 30px; border-radius: 15px; background: rgba(255,255,255,.15); transition: background .2s; flex: none; }
.switch-t i { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch-t.on { background: var(--accent-2); } .switch-t.on i { transform: translateX(20px); }
.avatar { text-decoration: none; }
html[data-theme="arcana"] .pf-av { background: #C8963E; color: #0B2221; }
html[data-theme="arcana"] .switch-t.on i { background: #0B2221; }

/* ---------- прогресс на странице истории ---------- */
.prog-panel .rels { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.relc { display: flex; gap: 12px; align-items: center; }
.rav { position: relative; flex: none; width: 48px; height: 48px; border-radius: 50%; overflow: hidden; background: var(--card2); }
.rav img { position: absolute; left: 50%; top: 4%; height: 330%; transform: translateX(-50%); }
.relc .lvl { font-size: 12.5px; font-weight: 800; color: var(--accent-2); }
.relc.cold .lvl { color: var(--dim); }
.rbar { height: 6px; border-radius: 4px; background: rgba(255,255,255,.1); overflow: hidden; margin: 6px 0 4px; }
.rbar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--accent-2), var(--gold)); transition: width .8s cubic-bezier(.2,.8,.2,1); }
.relc.cold .rbar i { background: var(--dim); }
.ep-ok { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.08); color: var(--accent-2); font-weight: 900; }
html[data-theme="arcana"] .rbar i { background: #C8963E; }

/* ---------- редактор отношений ---------- */
.opt-meta { display: flex; flex-direction: column; gap: 6px; margin: 6px 0 8px 22px; }
.reledit { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12.5px; }
.re-l { color: var(--dim); font-weight: 800; }
.re-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 6px 3px 10px; border-radius: 10px; background: rgba(226,69,127,.12); border: 1px solid rgba(226,69,127,.3); }
.re-chip.neg { background: rgba(127,139,163,.15); border-color: rgba(127,139,163,.35); }
.re-chip em { font-style: normal; color: var(--dim); } .re-chip small { color: var(--dim); margin-left: 2px; }
.re-chip button { width: 20px; height: 20px; border-radius: 6px; color: var(--mut); font-weight: 900; } .re-chip button:hover { background: rgba(255,255,255,.1); color: var(--text); }
.re-chip i { font-style: normal; font-weight: 900; min-width: 20px; text-align: center; }
.re-chip .x { font-size: 11px; }
.re-add { background: transparent; border: 1px dashed var(--line2); border-radius: 10px; color: var(--mut); padding: 3px 8px; font-size: 12.5px; }
.re-flag { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--dim); font-weight: 800; }
.re-flag input { background: transparent; border: 1px solid var(--line); border-radius: 8px; padding: 3px 8px; color: var(--text); font-size: 12.5px; min-width: 140px; }
.beat-if { border-color: rgba(226,69,127,.4); } .if-h { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 6px; }
.relnote { color: var(--accent-2) !important; }
.relfork { border-color: rgba(226,69,127,.35); }
.asset.busy::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.18) 50%, transparent 70%); background-size: 200% 100%; animation: sh 1.4s linear infinite; }

/* ---------- локации: выбор и создание ---------- */
.loc-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.loc-tile { position: relative; aspect-ratio: 2/3; border-radius: 14px; overflow: hidden; background: var(--card2) center / cover; border: 2px solid transparent; text-align: left; transition: transform .2s, border-color .2s; }
.loc-tile::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.85)); }
.loc-tile b { position: absolute; z-index: 1; left: 8px; right: 8px; bottom: 8px; font-size: 12.5px; line-height: 1.2; }
.loc-tile:hover { transform: translateY(-2px); }
.loc-tile.on { border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(226,69,127,.2); }
.loc-tile.add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 1.5px dashed var(--line2); background: transparent; color: var(--mut); font-size: 13px; font-weight: 800; }
.loc-tile.add::after { display: none; } .loc-tile.add span { font-size: 26px; color: var(--accent-2); }
.seg.wide3 { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; } .seg.wide3 button, .seg.wide2 button { padding: 9px 6px; font-size: 13.5px; }
.loc-current { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 12px 6px 6px; border-radius: 12px; background: var(--card2); border: 1px solid var(--line); text-align: left; }
.loc-current i { flex: none; width: 34px; height: 46px; border-radius: 8px; background: var(--bg, rgba(255,255,255,.08)) center / cover; }
.loc-current b { flex: 1; font-size: 14px; } .loc-current span { font-size: 12px; color: var(--accent-2); font-weight: 800; }
.loc-beat { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; cursor: pointer; }
.loc-beat i { flex: none; width: 26px; height: 36px; border-radius: 6px; background: var(--bg, rgba(255,255,255,.08)) center / cover; }
.loc-beat em { margin-left: auto; font-style: normal; font-size: 12px; color: var(--accent-2); opacity: 0; transition: opacity .2s; } .loc-beat:hover em { opacity: 1; }

/* редактор текста: тип реплики и добавление любого типа */
.beat .who { display: flex; flex-direction: column; gap: 5px; align-items: flex-start; }
.beat-type { background: transparent; border: 1px solid var(--line); border-radius: 8px; padding: 3px 6px; font-size: 12px; font-weight: 800; color: inherit; }
.add-sel { appearance: none; -webkit-appearance: none; width: 32px; text-align: center; text-align-last: center; font-size: 18px; font-weight: 800; cursor: pointer; background: transparent; color: var(--mut); }
.add-sel option { font-size: 14px; font-weight: 600; color: #111; }
.empty-branch { display: flex; align-items: center; gap: 10px; padding: 8px 10px; }

/* ---------- свой выпадающий список ---------- */
.pick { position: relative; display: inline-flex; }
.pick-btn { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 10px; background: rgba(255,255,255,.05); border: 1px solid var(--line); color: inherit; font-size: 12.5px; font-weight: 800; transition: border-color .2s, background .2s; max-width: 100%; }
.pick-btn:hover, .pick.open .pick-btn { border-color: var(--line2); background: rgba(255,255,255,.08); }
.pick-v { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick-ch { flex: none; opacity: .6; transition: transform .2s; } .pick.open .pick-ch { transform: rotate(180deg); }
.pick-pop { position: absolute; z-index: 70; top: calc(100% + 6px); left: 0; min-width: 200px; max-width: 320px; max-height: 320px; overflow-y: auto; padding: 6px; border-radius: 14px; background: var(--bg2); border: 1px solid var(--line2); box-shadow: 0 18px 40px rgba(0,0,0,.5); animation: pop .18s cubic-bezier(.2,.8,.2,1); }
.pick-pop.right { left: auto; right: 0; }
.pick-opt { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 10px; text-align: left; color: var(--mut); font-size: 13.5px; }
.pick-opt:hover { background: rgba(255,255,255,.06); color: var(--text); }
.pick-opt.on { color: var(--text); background: rgba(226,69,127,.14); }
.pick-opt b { display: block; font-weight: 700; } .pick-opt small { display: block; font-size: 12px; color: var(--dim); margin-top: 1px; line-height: 1.3; }
.pick-ic { flex: none; width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; background: rgba(255,255,255,.06); font-size: 12px; }
.pick.sm .pick-btn { padding: 3px 8px; font-size: 12px; }
html[data-theme="arcana"] .pick-opt.on { background: rgba(200,150,62,.16); }
/* реплика: аватар, подпись (кто · эмоция) и текст; ⚙ и ✕ — только у выделенной */
.beat, .beat.on:hover { grid-template-columns: 34px minmax(0, 1fr) auto; }
.beat.on { background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px var(--line2); }
.bav { width: 34px; height: 34px; margin-top: 2px; border-radius: 50%; background: var(--card2) 50% 6% / 230% no-repeat; border: 1.5px solid var(--line2); }
.bav.ic { display: grid; place-items: center; font-size: 14px; background: rgba(255,255,255,.05); border-color: transparent; color: var(--dim); }
.bav.ic.think { background: rgba(185,164,255,.12); }
.bbody { min-width: 0; }
.bmeta { display: inline-flex; gap: 4px; padding: 2px 0; background: none; border: 0; font-size: 12.5px; color: var(--dim); cursor: pointer; text-align: left; }
.bmeta b { font-weight: 800; color: var(--accent-2); }
.beat.think .bmeta b { color: #b9a4ff; } .beat.narr .bmeta b { color: var(--mut); }
.bmeta:hover b { text-decoration: underline; text-underline-offset: 3px; }
.beat .bbody textarea { margin-left: -10px; width: calc(100% + 10px); padding: 3px 10px; }
.beat { padding: 7px 10px; }
.ins { min-height: 16px; margin: 0; }
.beats.empty-branch { flex-direction: row; align-items: center; gap: 10px; padding: 6px 10px; font-size: 13px; }
.empty-branch .ins { min-height: 0; }
.beat .tools, .beat-choice .tools { display: flex; align-items: flex-start; gap: 4px; padding-top: 2px; animation: fade .15s; }
.beat .tools .iconbtn, .beat-choice .iconbtn { width: 32px; height: 32px; padding: 0; justify-content: center; border-radius: 10px; font-size: 15px; }
.beat-choice .iconbtn:disabled { opacity: .35; cursor: not-allowed; }
@media (max-width: 600px) { .beat, .beat.on:hover { grid-template-columns: 30px minmax(0, 1fr) auto; gap: 8px; } .bav { width: 30px; height: 30px; } .beat .tools .iconbtn { width: 30px; height: 30px; } }
/* выбор и развилка: заголовок, инструменты при выделении */
.beat-choice { border-radius: 0 14px 14px 0; transition: background .2s; }
.beat-choice.on { background: rgba(241,196,107,.04); }
.beat-if.on { background: rgba(226,69,127,.04); }
.ch-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 34px; }
.ch-h .fq { font-size: 11px; margin: 0; flex: 1; }
.ch-tools { display: flex; gap: 6px; align-items: center; margin-left: auto; animation: fade .15s; }
.btn.del { color: #ff9a9a; }
.opt { margin-top: 8px; }
.opt-row { display: flex; align-items: center; gap: 8px; padding: 4px 6px 4px 4px; border-radius: 12px; transition: background .2s; }
.opt.on > .opt-row { background: rgba(241,196,107,.08); box-shadow: inset 0 0 0 1px rgba(241,196,107,.3); }
.opt-mk { flex: none; width: 18px; text-align: center; color: var(--gold); font-weight: 900; }
.opt-in { flex: 1; min-width: 0; padding: 7px 10px; border-radius: 10px; border: 1px solid transparent; background: transparent; font-weight: 800; font-size: 14.5px; color: var(--gold); outline: none; }
.opt-in:hover { border-color: var(--line); } .opt-in:focus { border-color: rgba(241,196,107,.5); background: rgba(255,255,255,.03); }
.opt-chips { display: flex; flex-wrap: wrap; gap: 5px; margin: 2px 0 4px 30px; padding: 0; background: none; border: 0; cursor: pointer; text-align: left; }
.oc { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 7px; font-size: 11.5px; font-weight: 800; background: rgba(255,255,255,.06); color: var(--mut); }
.oc.neg { color: #ff9a9a; } .oc.lock { color: #b9a4ff; } .oc.prem { color: var(--gold); background: rgba(241,196,107,.12); } .oc.prem .gem { transform: scale(.8); }
.oc.mem { color: #7fd8c8; background: rgba(90,209,192,.12); }
.oc.warn { color: #ffc46b; background: rgba(255,170,60,.12); }
.ch-warn { margin: 2px 0 8px; padding: 8px 11px; border-radius: 9px; background: rgba(255,170,60,.1); color: #ffcf85; font-size: 12.5px; line-height: 1.45; }
.mem-uses.warn { background: rgba(255,170,60,.1); color: #ffcf85; }
.optrow.off { opacity: .45; } .optrow.off .optrow-h { cursor: not-allowed; }
.if-cond { padding: 4px 0; background: none; border: 0; font-size: 13px; font-weight: 800; color: var(--accent-2); cursor: pointer; text-align: left; flex: 1; }
.if-cond:hover { text-decoration: underline; text-underline-offset: 3px; }
.if-else { margin: 6px 0 2px; font-size: 12px; font-weight: 800; color: var(--dim); }
/* окна настроек */
.seg.ed-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; width: 100%; }
.seg.ed-seg button { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 10px 8px; }
.seg.ed-seg button small { font-size: 11.5px; font-weight: 600; opacity: .7; }
.opt-title { font-weight: 800; color: var(--gold); }
.emo-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.emo-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line2); background: rgba(255,255,255,.04); font-size: 13px; font-weight: 800; color: var(--mut); transition: all .15s; }
.emo-chip:has(.ea) { padding-left: 4px; }
.emo-chip.on { border-color: var(--accent-2); background: rgba(226,69,127,.15); color: var(--text); }
.emo-chip .ea { width: 26px; height: 26px; border-radius: 50%; background: var(--card2) 50% 6% / 230% no-repeat; }
.optrow { border-radius: 14px; border: 1px solid var(--line); transition: border-color .2s, background .2s; }
.optrow.on { border-color: var(--line2); background: rgba(255,255,255,.025); }
.optrow-h { display: flex; gap: 12px; align-items: flex-start; width: 100%; padding: 13px 14px; background: none; border: 0; text-align: left; cursor: pointer; color: inherit; }
.optrow-h b { display: block; font-size: 14.5px; } .optrow-h small { display: block; margin-top: 3px; font-size: 12.5px; color: var(--mut); line-height: 1.4; }
.optrow.switch .optrow-h { flex-direction: row-reverse; }
.optrow-b { padding: 0 14px 14px 46px; animation: pop .2s cubic-bezier(.2,.8,.2,1); }
.optrow.switch .optrow-b { padding-left: 14px; }
.cbx { flex: none; position: relative; width: 20px; height: 20px; margin-top: 1px; border-radius: 6px; border: 1.5px solid var(--line2); transition: background .15s, border-color .15s; }
.cbx::after { content: ''; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) scale(0); transition: transform .18s cubic-bezier(.3,1.5,.5,1); }
.optrow.on .cbx { background: var(--accent-2); border-color: var(--accent-2); }
.optrow.on .cbx::after { transform: rotate(45deg) scale(1); }
.sw { flex: none; position: relative; width: 42px; height: 24px; border-radius: 12px; background: rgba(255,255,255,.14); transition: background .25s; }
.sw::after { content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35); transition: transform .28s cubic-bezier(.3,1.4,.5,1); }
.optrow.on .sw { background: #3fbfa8; }
.optrow.on .sw::after { transform: translateX(18px); }
.mem-uses { padding: 10px 12px; border-radius: 10px; background: rgba(90,209,192,.08); color: #9fe4d6; font-size: 13px; line-height: 1.45; }
/* «+» между репликами, как «+ сцена» в плане */
.beats { gap: 0; }
.beat { position: relative; padding: 10px 12px; }
.ins { position: relative; display: flex; justify-content: center; align-items: center; min-height: 20px; margin: 2px 0; }
.ins::before { content: ''; position: absolute; left: 14px; right: 14px; top: 50%; border-top: 1px dashed rgba(226,69,127,.45); opacity: 0; transition: opacity .2s; }
.ins .pick { position: relative; z-index: 2; }
.ins:has(.pick.open), .beat-choice:has(.pick.open), .tsec:has(.pick.open) { position: relative; z-index: 60; }
.ins .pick.open { z-index: 61; }
.ins .pick-btn { padding: 0; border: 0; background: none; opacity: 0; transition: opacity .2s; }
.ins:hover::before, .ins:hover .pick-btn, .ins .pick.open .pick-btn, .ins.shown .pick-btn { opacity: 1; }
.ins:hover::before { opacity: .8; }
.ins-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 24px; padding: 0 9px; border-radius: 12px; background: var(--bg2); border: 1px solid rgba(226,69,127,.45); color: var(--accent-2); font-size: 15px; font-weight: 800; line-height: 1; }
.ins.shown { justify-content: flex-start; } .ins.shown::before { display: none; }
.ins .pick-pop { left: 50%; transform: translateX(-50%); }
@media (hover: none) { .ins .pick-btn { opacity: .5; } .ins { min-height: 26px; } }
/* текст по сценам плана */
.step-intro { margin: 0 0 14px; padding: 12px 16px; border-radius: 14px; background: rgba(255,255,255,.035); border: 1px solid var(--line); color: var(--mut); font-size: 13.5px; line-height: 1.5; }
.text-panel { padding-top: 10px; }
.text-panel.locked { pointer-events: none; opacity: .6; }
.spin-i { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.2); border-top-color: var(--accent-2); animation: spin .8s linear infinite; }
.tsec { position: relative; scroll-margin-top: 84px; padding: 4px 0 14px; border-radius: 16px; transition: box-shadow .4s, background .4s; }
.tsec + .tsec { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 16px; border-radius: 0; }
.tsec.flash { background: rgba(226,69,127,.07); box-shadow: 0 0 0 2px rgba(226,69,127,.35); border-radius: 16px; }
.tsec .busy-ov { border-radius: 16px; align-items: start; }
.tsec .busy-ov span { position: sticky; top: 140px; margin-top: 100px; }
.tsec-h { display: flex; gap: 14px; align-items: flex-start; padding: 8px 4px 6px; }
.tsec-loc { flex: none; position: relative; width: 52px; height: 72px; border-radius: 10px; background: var(--card2) center / cover; border: 1px solid var(--line2); overflow: hidden; cursor: pointer; }
.tsec-loc span { position: absolute; inset: auto 0 0; padding: 3px 0; font-size: 10px; font-weight: 800; text-align: center; background: rgba(0,0,0,.6); color: #fff; opacity: 0; transition: opacity .2s; }
.tsec-loc:hover span { opacity: 1; }
.tsec-n { font-size: 11.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--dim); }
.tsec-t { display: block; margin-top: 3px; font-size: 17px; line-height: 1.3; }
.tsec-more { margin-top: 4px; padding: 0; background: none; border: 0; font-size: 12.5px; font-weight: 800; color: var(--accent-2); cursor: pointer; }
.tsec-sum { margin-top: 8px; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.04); font-size: 13.5px; line-height: 1.5; color: var(--mut); }
.tsec-sum .hook { margin-top: 6px; color: var(--gold); }
.tsec-redo { flex: none; }
@media (max-width: 600px) { .tsec-h { flex-wrap: wrap; } .tsec-redo { width: 100%; justify-content: center; } }
/* план: заметки редактора свёрнуты, переход к тексту сцены */
.ai-notes { margin-top: 14px; border-radius: 14px; background: rgba(255,255,255,.03); border: 1px solid var(--line); }
.ai-notes summary { display: flex; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer; list-style: none; font-size: 13.5px; font-weight: 700; color: var(--mut); }
.ai-notes summary::-webkit-details-marker { display: none; }
.ai-notes summary i { flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 11px; background: rgba(120,220,160,.14); color: #8fe0b0; }
.ai-notes summary em { font-style: normal; color: var(--dim); font-weight: 600; }
.ai-notes summary svg { transition: transform .2s; }
.ai-notes[open] summary svg { transform: rotate(180deg); }
.ai-notes .notes { padding: 4px 16px 14px; }
.to-text { display: block; margin: 8px 0 0 auto; padding: 6px 12px; border-radius: 10px; background: none; border: 1px solid var(--line); font-size: 12.5px; font-weight: 800; color: var(--accent-2); cursor: pointer; }
.to-text:hover { border-color: var(--line2); background: rgba(255,255,255,.04); }
.to-text.none { border-style: dashed; color: var(--dim); font-weight: 600; cursor: default; margin-left: 0; }
/* перегенерация: панель в плане и окно «Что изменится» */
.regen-panel { display: flex; flex-direction: column; gap: 18px; }
.regen-row { display: flex; flex-direction: column; gap: 10px; }
.regen-row b { font-size: 15px; } .regen-row small { display: block; margin-top: 3px; font-size: 13px; color: var(--mut); line-height: 1.45; }
.regen-row.danger { padding-top: 18px; border-top: 1px solid var(--line); }
.regen-row .input { min-width: 220px; }
.regen-lead { font-size: 15px; line-height: 1.55; }
.regen-note { padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.04); font-size: 14px; line-height: 1.45; }
.regen-note span { display: block; margin-bottom: 4px; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.regen-warn { padding: 12px 14px 12px 40px; position: relative; border-radius: 12px; background: rgba(241,196,107,.08); border: 1px solid rgba(241,196,107,.3); font-size: 13.5px; line-height: 1.5; }
.regen-warn::before { content: '⚠'; position: absolute; left: 14px; top: 11px; color: var(--gold); }
.regen-fx { display: flex; flex-direction: column; gap: 8px; }
.regen-fx .h3 { font-size: 11px; margin-bottom: 2px; }
.regen-cb { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line2); cursor: pointer; }
.regen-cb input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--accent-2); flex: none; }
.regen-cb b { display: block; font-size: 14px; } .regen-cb small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--mut); line-height: 1.4; }
.regen-cost { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 12px; border: 1px dashed var(--line2); }
.regen-cost b { display: block; font-size: 13.5px; } .regen-cost small { display: block; font-size: 12px; color: var(--dim); margin-top: 2px; line-height: 1.4; }
.flag-tog { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px; border-radius: 10px; border: 1px dashed var(--line2); font-size: 12.5px; font-weight: 800; color: var(--dim); }
.flag-tog.on { border-style: solid; border-color: rgba(226,69,127,.4); background: rgba(226,69,127,.1); color: var(--text); }
.flag-tog i { width: 14px; height: 14px; border-radius: 4px; border: 1.5px solid currentColor; display: grid; place-items: center; font-style: normal; font-size: 10px; }

/* картинка истории + действия: перегенерировать / загрузить своё */
.media { display: grid; grid-template-columns: minmax(120px, 44%) 1fr; gap: 14px; }
.media-pic { position: relative; aspect-ratio: 2 / 3; border-radius: 18px; overflow: hidden; background: var(--card2); border: 1px solid var(--line); }
.media-pic > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.media-pic.sprite { background: radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--rim, #d07) 28%, #2a1630) 0%, #140e18 72%); }
.media-pic.sprite > img { object-fit: contain; object-position: 50% 100%; filter: drop-shadow(0 0 2px var(--rim, #d07)) drop-shadow(0 0 14px rgba(226,69,127,.35)); }
.media-tag { position: absolute; left: 8px; top: 8px; padding: 4px 10px; border-radius: 99px; background: rgba(10,6,12,.78); font-size: 11.5px; font-weight: 600; }
.media-side { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.media-side .field { margin: 0; gap: 6px; }
.media-side .textarea { min-height: 64px; font-size: 13.5px; }
.media-side .btn { width: 100%; justify-content: center; }
.media-side > small { line-height: 1.45; }
.media-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.media-chips .chip { font-size: 12px; padding: 4px 9px; }
.media-foot { margin-top: -6px; font-size: 12px; color: var(--dim); line-height: 1.5; }
.gem-free { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; color: var(--mut); }
.gem-free .gem { width: 11px; height: 11px; }
.up-modes { display: flex; flex-direction: column; gap: 6px; }
.up-mode { text-align: left; padding: 9px 11px; border-radius: 12px; border: 1px solid var(--line2); background: rgba(255,255,255,.03); color: inherit; cursor: pointer; transition: border-color .15s, background .15s; }
.up-mode b { display: block; font-size: 13.5px; }
.up-mode small { display: block; margin-top: 2px; font-size: 12px; color: var(--mut); line-height: 1.35; }
.up-mode.on { border-color: var(--accent-2); background: rgba(226,69,127,.1); }
.emo-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.emo-th { flex: 0 0 74px; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 0; background: none; border: 0; color: var(--mut); cursor: pointer; }
.emo-th > span { position: relative; width: 74px; height: 92px; border-radius: 12px; overflow: hidden; border: 1.5px solid var(--line); background: radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--rim, #d07) 22%, #2a1630), #140e18 75%); transition: border-color .15s; }
.emo-th > span img { position: absolute; left: 50%; top: 3%; height: 165%; transform: translateX(-50%); }
.emo-th > span .spin-i { position: absolute; right: 5px; top: 5px; width: 14px; height: 14px; }
.emo-th small { font-size: 11.5px; }
.emo-th.on { color: var(--text); }
.emo-th.on > span { border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(226,69,127,.18); }
.emo-th.err > span { border-color: rgba(255,120,120,.6); }
/* все 8 эмоций ровной сеткой; ещё не нарисованная — тёмный силуэт портрета */
.emo-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.emo-grid .emo-th { flex: none; min-width: 0; }
.emo-grid .emo-th > span { width: 100%; height: auto; aspect-ratio: 4 / 5; }
.emo-th .sil { position: absolute; inset: 0; filter: brightness(0) opacity(.28); }
.emo-th.empty > span { border-style: dashed; background: rgba(255,255,255,.025); }
.emo-th.empty.on > span { border-style: solid; }
.media-pic .ghost { position: absolute; inset: 0; filter: brightness(0) opacity(.25); }
.media-pic .ghost img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; }
/* персонаж без эмоций: красная рамка и пометка в шапке */
.asset.lack { border-color: rgba(255,95,115,.75); box-shadow: 0 0 0 3px rgba(255,95,115,.14); }
.asset.lack .cnt { background: rgba(200,40,60,.85); }
.lack-note { font-size: 13px; color: #ff8a9a; display: inline-flex; align-items: center; gap: 7px; }
.lack-note::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #ff5f73; }
@media (max-width: 480px) { .media { grid-template-columns: 42% 1fr; gap: 10px; } .media-side .textarea { min-height: 70px; } }

/* правка жанра и тегов истории */
.tags-ed { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.tag-b { border: 0; font: inherit; font-size: 11.5px; font-weight: 800; letter-spacing: .04em; cursor: pointer; align-items: center; gap: 2px; transition: background .15s, color .15s; }
.tag-b:hover { background: rgba(255,255,255,.14); color: var(--text); }
.tag.gold.tag-b:hover { background: rgba(241,196,107,.26); color: var(--gold); }
.tag-b > button { padding: 0; border: 0; background: none; color: inherit; font: inherit; letter-spacing: inherit; cursor: pointer; }
.tag-b > .x { margin-left: 5px; padding: 0 2px; font-size: 10px; opacity: .45; transition: opacity .15s, color .15s; }
.tag-b > .x:hover { opacity: 1; color: #ff9a9a; }
.tag-add { border: 1px dashed var(--line2); background: none; font: inherit; font-size: 11.5px; font-weight: 700; color: var(--mut); cursor: pointer; transition: border-color .15s, color .15s; }
.tag-add:hover { border-color: var(--accent-2); color: var(--text); }
.tag-in { padding: 4px 10px; border-radius: 8px; border: 1px solid var(--accent-2); background: rgba(226,69,127,.08); color: var(--text); font: inherit; font-size: 12px; font-weight: 700; outline: none; min-width: 90px; }
.tag-ideas { gap: 6px; align-items: center; font-size: 12px; animation: fade .15s; }

/* создание: свои фавориты и второстепенные персонажи */
.cast-sec { margin-top: 22px; display: flex; flex-direction: column; gap: 8px; }
.cast-sec-h { display: flex; align-items: center; gap: 12px; margin-bottom: 2px; }
.cast-sec-h small { display: block; margin-top: 4px; font-size: 12.5px; line-height: 1.4; }
.cast-empty { padding: 14px 16px; border-radius: 14px; border: 1.5px dashed var(--line2); color: var(--mut); font-size: 13.5px; }
.cast-card { border-radius: 16px; border: 1px solid var(--line); background: var(--card); transition: border-color .2s; animation: fade .2s; }
.cast-card.open { border-color: var(--line2); }
.cast-h { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 14px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.cast-h b { display: block; font-size: 14.5px; }
.cast-h small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cast-h .grow { min-width: 0; }
.cast-av { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--card2) center / cover; color: var(--accent-2); }
.cast-chev { flex: none; font-size: 12.5px; color: var(--mut); }
.cast-h:hover .cast-chev { color: var(--text); }
.cast-b { display: flex; flex-direction: column; gap: 12px; padding: 4px 14px 14px; animation: fade .2s; }
.photo-drop.sm { padding: 10px; gap: 12px; }
.photo-drop.sm .pv { width: 56px; height: 56px; border-radius: 14px; font-size: 22px; }

/* счётчик символов под полем */
.field > small.lim, .lim { display: flex; justify-content: flex-end; align-items: baseline; gap: 10px; margin-top: -2px; color: var(--dim); font-size: 12px; font-weight: 600; }
.lim b { font-weight: 700; font-variant-numeric: tabular-nums; opacity: .75; }
.lim.near { color: var(--gold); }
.lim.over { color: #ff6b6b; }
.lim.over b { opacity: 1; }
.field:has(.lim.over) .textarea { border-color: rgba(255,107,107,.7); }
.cast-h small.over { color: #ff6b6b; }

/* удаление своей истории или героя прямо с карточки */
.card-del { position: absolute; z-index: 2; top: 8px; right: 8px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(10,6,14,.62); backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.18); color: #fff; opacity: 0; transition: opacity .2s, background .2s, transform .2s; cursor: pointer; }
.poster:hover .card-del, .hero-card:hover .card-del, .card-del:focus-visible { opacity: 1; }
.card-del:hover { background: #c0392b; border-color: transparent; transform: scale(1.06); }
@media (hover: none) { .card-del { opacity: 1; } }
.btn.danger { color: #ff8a80; }
.btn.danger:hover { background: rgba(192,57,43,.18); border-color: rgba(255,107,107,.45); }
.steps a.del { color: #ff8a80; }
.steps a.del:hover { background: rgba(192,57,43,.14); }

/* своё окно подтверждения (системные confirm/alert не используем) */
.ask-bg { position: fixed; inset: 0; z-index: 300; background: rgba(5,3,7,.62); backdrop-filter: blur(5px); animation: fade .2s; }
.ask { position: fixed; z-index: 301; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(420px, calc(100vw - 32px)); padding: 24px 24px 20px; border-radius: 22px; background: var(--bg2); border: 1px solid var(--line2); box-shadow: 0 30px 80px rgba(0,0,0,.6); display: flex; flex-direction: column; gap: 10px; animation: ask-in .22s both; }
@keyframes ask-in { from { opacity: 0; transform: translate(-50%, -46%) scale(.97); } }
.ask p { margin: 0; font-size: 14.5px; line-height: 1.5; }
.ask-f { display: flex; gap: 10px; justify-content: flex-end; margin-top: 12px; }
.btn.danger-solid { background: #c0392b; color: #fff; border: 1px solid transparent; }
.btn.danger-solid:hover { background: #d9463a; }

/* свои кнопки в карточке истории: одной строкой, поровну */
.sp-own { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.sp-own:empty { display: none; }
a.iconbtn.sp-share { color: inherit; }
.sp-own .btn { justify-content: center; white-space: nowrap; min-width: 0; }
.sp-own .rv { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sp-own .rv > .btn { flex: 1; }
.sp-own .rv-st { height: 46px; padding: 0 14px; }
.sp-own .rv .iconbtn { width: 46px; height: 46px; border-radius: 14px; }
@media (max-width: 420px) { .sp-own .btn { font-size: 13.5px; padding-left: 10px; padding-right: 10px; } }
/* удаление готовой истории — тихая строка в самом низу, не кнопка */
.sp-del { align-self: center; margin-top: 18px; padding: 6px 10px; background: none; border: 0; color: var(--dim); font: inherit; font-size: 13.5px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.sp-del:hover { color: #ff8a80; }

/* цена на кнопке генерации */
.price { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; padding: 2px 8px 2px 6px; border-radius: 999px; background: rgba(0,0,0,.22); font-size: .86em; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; vertical-align: middle; }
.price .gem { width: 11px; height: 11px; }
.media-casc { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.media-casc > span { flex-basis: 100%; font-size: 12px; font-weight: 700; color: var(--dim); }
.mchk { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px 6px 8px; border-radius: 10px; border: 1px solid var(--line2); background: rgba(255,255,255,.03); color: var(--mut); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; transition: border-color .15s, background .15s, color .15s; }
.mchk i { width: 15px; height: 15px; border-radius: 5px; border: 1.5px solid var(--line2); display: grid; place-items: center; transition: background .15s, border-color .15s; }
.mchk.on { color: var(--text, #f6eff4); border-color: rgba(226,69,127,.5); background: rgba(226,69,127,.1); }
.mchk.on i { background: var(--accent-2); border-color: var(--accent-2); }
.mchk.on i::after { content: ''; width: 4px; height: 7px; margin-top: -2px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.media-go { display: flex; gap: 8px; }
.media-go .btn { flex: 1; min-width: 0; }
.media-go .iconbtn { flex: none; width: 46px; height: 46px; justify-content: center; }
.seg .price, .oc .price { margin: 0; padding: 0; background: none; font-size: inherit; color: inherit; }
.btn.ghost .price, .btn.gold .price { background: rgba(255,255,255,.08); }
.regen-cost .price { margin-left: 2px; background: rgba(255,255,255,.06); }

/* баланс в шапке + кнопка пополнения */
.wallet { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; }
.wallet .gems { cursor: pointer; color: inherit; font: inherit; font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; }
.wallet .gems:hover { background: rgba(255,255,255,.1); }
.gem-plus { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; border: 0; cursor: pointer; color: #fff; font-size: 20px; font-weight: 800; line-height: 1; background: linear-gradient(135deg, var(--accent-2), var(--violet)); box-shadow: 0 6px 18px rgba(226,69,127,.4); transition: transform .15s; }
.gem-plus:hover { transform: scale(1.08); }
@media (max-width: 720px) { .wallet .gems { padding: 6px 11px; font-size: 13.5px; } .gem-plus { width: 30px; height: 30px; } }
/* окно пополнения */
.tu-bal { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 16px 18px; border-radius: 16px; background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.tu-bal .gem { width: 20px; height: 20px; }
.tu-bal b { font-size: 28px; font-variant-numeric: tabular-nums; }
.tu-bal span { color: var(--dim); font-size: 13px; font-weight: 600; }
.tu-packs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tu-pack { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 10px 14px; border-radius: 16px; border: 1px solid var(--line2); background: rgba(255,255,255,.04); color: inherit; font: inherit; }
.tu-pack.hit { border-color: rgba(241,196,107,.55); background: rgba(241,196,107,.07); }
.tu-pack:disabled { cursor: default; }
.tu-g { display: inline-flex; align-items: center; gap: 7px; font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tu-rub { color: var(--mut); font-weight: 700; font-size: 14px; }
.tu-badge { position: absolute; top: -9px; right: 10px; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 800; background: var(--gold); color: #2a1a05; }
.tu-soon { padding: 12px 14px; border-radius: 12px; border: 1px dashed var(--line2); color: var(--mut); font-size: 13.5px; line-height: 1.5; }
.tu-pack:not(:disabled) { cursor: pointer; transition: transform .18s, border-color .18s, background .18s; }
.tu-pack:not(:disabled):hover { transform: translateY(-2px); border-color: rgba(241,196,107,.6); background: rgba(241,196,107,.06); }
.tu-ep { color: var(--dim); font-size: 12px; font-weight: 700; }
.tu-rub { margin-top: 4px; padding: 5px 14px; border-radius: 999px; background: rgba(255,255,255,.07); color: var(--text); }
.tu-pack.hit .tu-rub { background: linear-gradient(180deg, #ffe09a, var(--gold-2)); color: #2a1a05; }
.tu-sub { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: linear-gradient(120deg, rgba(241,196,107,.12), rgba(226,69,127,.08)); border: 1px solid rgba(241,196,107,.28); }
.tu-sub b { display: block; font-size: 14.5px; } .tu-sub span:not(.op-ic) { color: var(--mut); font-size: 13px; }
.tu-note { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 7px; justify-content: center; text-align: center; color: var(--dim); font-size: 12.5px; }
.wallet.vip .gems { border-color: rgba(241,196,107,.5); box-shadow: 0 0 0 3px rgba(241,196,107,.08); }

/* оффер подписки */
.pay-bg { position: fixed; inset: 0; z-index: 200; background: rgba(5,3,7,.72); backdrop-filter: blur(6px); animation: fade .25s; }
.offer { position: fixed; z-index: 201; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(460px, calc(100vw - 32px)); max-height: min(94vh, 980px); overflow-y: auto; overscroll-behavior: contain;
  --of-bg: radial-gradient(ellipse at 95% -12%, rgba(241,196,107,.17), transparent 43%), radial-gradient(ellipse at -12% 8%, rgba(200,60,120,.2), transparent 48%), linear-gradient(155deg, #24162b, #151019 76%);
  --of-line: #4e3b4c; --of-text: #f6eff4; --of-x: #9a8b96; --of-eyebrow: #b8a9b4; --of-intro: #a8979f;
  --of-tim-line: rgba(241,196,107,.45); --of-tim-bg: linear-gradient(100deg, rgba(160,110,40,.22), rgba(70,35,60,.42)); --of-tim-top: rgba(255,215,140,.35); --of-tim-l: #ecd3a2; --of-tim-d: #ffe0a6; --of-tim-cs: #bfa271;
  --of-al-line: rgba(150,130,255,.36); --of-al-bg: linear-gradient(115deg, rgba(70,60,160,.42), rgba(60,30,80,.5)); --of-qty: #f6eff4; --of-unit: #b5a9c6; --of-sum: #c4b8cf; --of-sum-b: #fff;
  --of-sep: rgba(255,255,255,.075); --of-ico-line: rgba(241,196,107,.28); --of-ico-bg: rgba(255,255,255,.03); --of-ico: #f1c46b; --of-ft: #fff0f4; --of-fd: #a8979f;
  --of-pline: rgba(255,255,255,.094); --of-new: #fff3f7; --of-old: #8e7f89; --of-disc: #f3d19d; --of-disc-line: rgba(241,196,107,.5); --of-disc-bg: rgba(160,110,40,.2); --of-period: #a092a0;
  --of-btn-bg: linear-gradient(180deg, #ffe09a, #d9a24a); --of-btn-hover: linear-gradient(180deg, #ffe9b5, #e2ad57); --of-btn: #2a1a05;
  --of-later: #a092a0; --of-legal: #8a7b86; --of-foot: #7a6c77;
  border-radius: 25px; border: 1px solid var(--of-line); background: var(--of-bg); color: var(--of-text); box-shadow: 0 20px 50px rgba(0,0,0,.27), 0 40px 120px rgba(0,0,0,.5);
  animation: pop .32s cubic-bezier(.2,.8,.2,1); scrollbar-width: none; }
.offer::-webkit-scrollbar { display: none; }
.offer.compact { width: min(420px, calc(100vw - 32px)); }
@media (max-width: 720px) {
  .offer, .offer.compact { top: auto; bottom: 0; left: 0; transform: none; width: 100vw; max-height: 94vh; border-radius: 25px 25px 0 0; border-width: 1px 0 0; animation: up .32s cubic-bezier(.2,.8,.2,1); padding-bottom: env(safe-area-inset-bottom); }
}
.offer-x { position: absolute; z-index: 2; top: 13px; right: 13px; width: 32px; height: 32px; display: grid; place-items: center; background: none; border: 0; color: var(--of-x); border-radius: 50%; transition: color .18s; }
.offer-x:hover { color: var(--of-text); }
.of { padding: 24px 23px 19px; font-family: var(--sans); }
.of-eyebrow { font-size: 10px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--of-eyebrow); margin-right: 35px; }
.of-t { margin: 16px 0 8px; max-width: 390px; font: 800 clamp(27px, 7.1vw, 35px)/1.13 var(--sans); letter-spacing: -1.45px; color: var(--of-text); }
.of-t span { background: linear-gradient(95deg, #f19abe, #c8a5f1, #edb7a3); -webkit-background-clip: text; background-clip: text; color: transparent; }
.of-intro { font-size: 12px; line-height: 1.5; color: var(--of-intro); margin: 0 0 17px; }
.of-timer { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 13px; border: 1px solid var(--of-tim-line); border-radius: 13px; background: var(--of-tim-bg); overflow: hidden; }
.of-timer::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--of-tim-top), transparent); }
.of-timer-l { font-size: 11px; font-weight: 700; line-height: 1.35; color: var(--of-tim-l); max-width: 120px; }
.of-timer-d { white-space: nowrap; font-weight: 800; font-size: clamp(23px, 6.2vw, 29px); letter-spacing: -.7px; line-height: 1; font-variant-numeric: tabular-nums; color: var(--of-tim-d); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.of-timer-d small { font-size: 14px; color: var(--of-tim-cs); display: inline-block; min-width: 24px; letter-spacing: -1px; }
.of-allow { margin-top: 12px; border: 1px solid var(--of-al-line); border-radius: 17px; background: var(--of-al-bg); padding: 16px 17px; }
.of-gems { display: flex; align-items: center; gap: 15px; }
.of-gem { display: block; width: 17px; height: 17px; transform: rotate(45deg); border-radius: 2px; background: linear-gradient(135deg, #b0e8ff, #56b8fb 65%, #3482e9); flex-shrink: 0; margin: 0 5px 0 3px; box-shadow: 0 0 15px rgba(104,184,255,.16); }
.of-qty { font-size: clamp(38px, 10vw, 48px); font-weight: 900; letter-spacing: -1.8px; line-height: 1; color: var(--of-qty); font-variant-numeric: tabular-nums; }
.of-unit { font-size: 12px; font-weight: 600; color: var(--of-unit); margin-top: 6px; }
.of-sum { font-size: 12px; color: var(--of-sum); margin: 11px 0 0 1px; line-height: 1.5; }
.of-sum b { color: var(--of-sum-b); font-weight: 800; }
.of-feats { display: flex; flex-direction: column; margin-top: 14px; }
.of-feat { display: grid; grid-template-columns: 35px minmax(0, 1fr); gap: 11px; align-items: center; padding: 11px 0; min-height: 70px; border-bottom: 1px solid var(--of-sep); }
.of-feat:last-child { border-bottom: 0; }
.of-ico { width: 35px; height: 35px; border: 1px solid var(--of-ico-line); border-radius: 10px; display: grid; place-items: center; background: var(--of-ico-bg); color: var(--of-ico); }
.of-ft { font-size: 14px; line-height: 1.35; font-weight: 800; color: var(--of-ft); letter-spacing: -.2px; }
.of-fd { font-size: 11px; line-height: 1.4; color: var(--of-fd); margin-top: 3px; }
.of-pricing { padding-top: 14px; border-top: 1px solid var(--of-pline); margin-top: 4px; }
.of-prow { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.of-new { font-size: clamp(45px, 12vw, 54px); letter-spacing: -2px; line-height: 1.1; font-weight: 900; color: var(--of-new); font-variant-numeric: tabular-nums; }
.of-oldg { display: flex; flex-direction: column; gap: 5px; }
.of-old { font-size: 14px; color: var(--of-old); }
.of-disc { font-size: 11px; font-weight: 800; color: var(--of-disc); border: 1px solid var(--of-disc-line); padding: 4px 8px; border-radius: 7px; background: var(--of-disc-bg); white-space: nowrap; width: max-content; }
.of-period { font-size: 11px; color: var(--of-period); margin: 1px 0 0; }
.of-action { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; margin-top: 13px; border: 1px solid transparent; border-radius: 13px; padding: 15px 10px; background: var(--of-btn-bg); color: var(--of-btn); font: 800 15px/1.2 var(--sans); box-shadow: 0 3px 10px rgba(0,0,0,.13); transition: background .18s, transform .18s; }
.of-action:hover:not(:disabled) { background: var(--of-btn-hover); transform: translateY(-1px); }
.of-action:disabled { opacity: .7; cursor: default; }
.of-later { display: block; margin: 13px auto 0; padding: 0 8px; background: none; border: 0; font-size: 12px; font-weight: 700; color: var(--of-later); }
.of-later:hover { color: var(--of-text); }
.of-legal { font-size: 10px; line-height: 1.55; color: var(--of-legal); text-align: center; margin: 13px 0 0; }
.of-foot { font-size: 9px; line-height: 1.4; color: var(--of-foot); text-align: center; margin: 8px 0 0; }
@media (max-width: 390px) { .of { padding: 21px 17px 17px; } .offer { border-radius: 21px 21px 0 0; } .of-t { font-size: 29px; } .of-timer { padding: 11px; } .of-ft { font-size: 13px; } .of-fd { font-size: 10.5px; } .of-allow { padding: 15px; } }
@keyframes gemfloat { 50% { transform: translateY(-3px) rotate(-4deg); } }
@keyframes shine { 40%, 100% { transform: translateX(120%); } }
.offer-later { align-self: center; padding: 4px 10px; color: var(--dim); font-size: 13.5px; font-weight: 700; }
.offer-later:hover { color: var(--mut); }
.op-ic { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, rgba(226,69,127,.18), rgba(123,92,255,.14)); border: 1px solid var(--line); }

/* ожидание и итог оплаты */
.pay-state { padding: 40px 26px 28px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.pay-state.in { padding: 16px 6px 6px; }
.pay-state h2 { margin: 4px 0 0; font: 800 24px/1.15 var(--serif); }
.pay-state.in h2 { font-size: 20px; }
.pay-state p { margin: 0; color: var(--mut); font-size: 14px; line-height: 1.55; max-width: 340px; }
.pay-state .btn.xl { width: 100%; justify-content: center; margin-top: 6px; }
.ps-orb { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, rgba(79,180,255,.35), rgba(123,92,255,.25) 60%, transparent 72%); border: 1px solid rgba(140,170,255,.3); }
.ps-orb .gem { width: 34px; height: 34px; animation: gemfloat 2.4s ease-in-out infinite; }
.ps-orb.ok { color: #1c0f02; background: linear-gradient(180deg, #ffe09a, var(--gold-2)); border: 0; box-shadow: 0 0 40px rgba(241,196,107,.45); animation: pop .4s cubic-bezier(.2,.8,.2,1.4); }
.ps-orb.bad { color: var(--accent-2); background: rgba(226,69,127,.12); border-color: rgba(226,69,127,.35); }
.ps-orb.sm { width: 60px; height: 60px; }
.ps-gems { display: inline-flex; align-items: center; gap: 10px; font-size: 34px; font-weight: 900; font-variant-numeric: tabular-nums; }
.ps-gems .gem { width: 24px; height: 24px; }
.ps-wait { display: inline-flex; align-items: center; gap: 9px; padding: 8px 14px; border-radius: 999px; background: rgba(255,255,255,.05); border: 1px solid var(--line); color: var(--mut); font-size: 13.5px; font-weight: 700; }
.ps-wait .spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255,255,255,.2); border-top-color: var(--gold); animation: spin .8s linear infinite; }

/* профиль: подписка */
.pf-offer { width: 100%; display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; text-align: left; background: linear-gradient(120deg, rgba(241,196,107,.12), rgba(226,69,127,.1) 60%, rgba(123,92,255,.1)); border: 1px solid rgba(241,196,107,.3); transition: transform .18s, border-color .18s; }
.pf-offer:hover { transform: translateY(-1px); border-color: rgba(241,196,107,.55); }
.pf-offer > div { flex: 1; min-width: 0; } .pf-offer b { display: block; font-size: 15px; } .pf-offer span:not(.op-ic) { color: var(--mut); font-size: 13px; }
.pf-offer > i { font-style: normal; font-size: 22px; color: var(--gold); }
.pf-sub { flex-wrap: wrap; gap: 12px; }

/* админка: подписка */
.adm-uacts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.adm-sub-acts { display: flex; gap: 8px; flex-wrap: wrap; padding: 10px 14px 0; }
.adm-sub-acts:empty { display: none; }
.adm-sub-now { padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid var(--line); color: var(--mut); font-size: 14px; }
.adm-sub-now b { color: var(--text); }
.ep .num { flex: none; }
/* на телефоне кнопка с ценой уходит под название, а не сжимает его */
@media (max-width: 520px) { .ep.next { flex-wrap: wrap; } .ep.next .grow { flex: 1 1 calc(100% - 60px); } .ep.next > .btn { width: 100%; justify-content: center; } }

/* ---------- публикация через модерацию ---------- */
.rv { display: contents; }
.rv-st { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 12px; font-size: 13px; font-weight: 800; color: var(--mut); background: rgba(255,255,255,.05); border: 1px solid var(--line); white-space: nowrap; }
.rv-st::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.rv-st.wait { color: var(--gold); background: rgba(241,196,107,.08); border-color: rgba(241,196,107,.25); }
.rv-st.wait::before { animation: pulse 1.6s ease-in-out infinite; }
.rv-st.ok { color: #7fe0a8; background: rgba(90,210,140,.08); border-color: rgba(90,210,140,.25); }
.rv-st.no { color: #ff8a9a; background: rgba(255,95,115,.08); border-color: rgba(255,95,115,.28); }
.rv-hint { flex-basis: 100%; order: 10; font-size: 12.5px; color: var(--dim); }
.rv-why { flex-basis: 100%; order: 10; font-size: 13.5px; line-height: 1.5; color: #ffb3bd; padding: 10px 14px; border-radius: 12px; background: rgba(255,95,115,.07); border: 1px solid rgba(255,95,115,.2); }
.rv-why b { color: #ff8a9a; }

/* ---------- админка ---------- */
.pf-link { color: inherit; text-decoration: none; transition: background .2s, border-color .2s; }
.pf-link:hover { background: rgba(255,255,255,.06); border-color: var(--line2); }
.pf-link > i { font-style: normal; font-size: 22px; color: var(--mut); }
.adm { max-width: 980px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.adm-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.adm-head .h1 { margin: 0; }
.adm-cnt { margin-left: 7px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; display: inline-grid; place-items: center; font-size: 11.5px; background: #ff5f73; color: #fff; }
.adm-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.adm-search { flex: 1 1 260px; max-width: 420px; }
.adm-ph { height: 180px; border-radius: var(--r); }
.adm-list { display: flex; flex-direction: column; gap: 10px; }
.adm-row { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); text-align: left; color: inherit; font: inherit; width: 100%; }
.adm-row.click { cursor: pointer; transition: background .2s, border-color .2s; }
.adm-row.click:hover { background: rgba(255,255,255,.05); border-color: var(--line2); }
.adm-cv { flex: none; width: 54px; aspect-ratio: 2 / 3; border-radius: 10px; background: linear-gradient(160deg, #3a1d33, #140c18) center / cover; border: 1px solid var(--line); }
.adm-cv.lg { width: 120px; border-radius: 14px; }
.adm-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.adm-tl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.adm-t { font-size: 16px; overflow: hidden; text-overflow: ellipsis; }
.adm-meta { font-size: 13px; color: var(--mut); }
.adm-note { font-size: 13.5px; line-height: 1.45; padding: 7px 11px; border-left: 2px solid var(--gold); background: rgba(241,196,107,.06); border-radius: 0 10px 10px 0; }
.adm-res { font-size: 13px; }
.adm-res.ok { color: #7fe0a8; } .adm-res.no { color: #ff8a9a; }
.adm-act { display: flex; align-items: center; gap: 8px; flex: none; }
.adm-act a.iconbtn { color: inherit; }
.adm-more { color: var(--mut); }
.adm-top { display: flex; gap: 18px; align-items: flex-start; }
.adm-log { font-size: 14px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.adm-dl { display: grid; grid-template-columns: max-content 1fr; gap: 10px 18px; margin: 0; padding: 16px; border-radius: 16px; background: rgba(255,255,255,.03); border: 1px solid var(--line); font-size: 14px; }
.adm-dl dt { color: var(--mut); } .adm-dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.adm-copy { font: 600 12.5px ui-monospace, Menlo, monospace; color: var(--mut); background: rgba(255,255,255,.05); border: 1px solid var(--line); border-radius: 7px; padding: 2px 7px; cursor: pointer; }
.adm-copy:hover { color: var(--text); border-color: var(--line2); }
.adm-link { color: var(--accent-2); font-weight: 700; text-decoration: none; }
.adm-acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.adm-del { color: #ff8a7a; } .adm-del:hover { color: #fff; background: rgba(226,85,64,.25); border-color: rgba(226,85,64,.5); }
.adm-user { display: flex; flex-direction: column; gap: 18px; }
.adm-uh { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.adm-uh .pf-av { width: 56px; height: 56px; font-size: 22px; }
.adm-uh .adm-copy { margin-top: 6px; }
.adm-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.adm-stats > div { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 14px; background: rgba(255,255,255,.03); border: 1px solid var(--line); }
.adm-stats span { font-size: 12px; color: var(--mut); }
.adm-stats b { font-size: 22px; display: inline-flex; align-items: center; gap: 7px; }
.adm-stats small { font-size: 12px; color: var(--mut); }
.adm-fold { border-top: 1px solid var(--line); padding-top: 14px; }
.adm-fold summary { cursor: pointer; font-weight: 800; font-size: 14px; list-style: none; display: flex; align-items: center; gap: 8px; }
.adm-fold summary::-webkit-details-marker { display: none; }
.adm-fold summary::before { content: '›'; font-size: 18px; color: var(--mut); transition: transform .2s; }
.adm-fold[open] summary::before { transform: rotate(90deg); }
.adm-pad { padding: 12px 0 0; }
.adm-ops { display: flex; flex-direction: column; margin-top: 10px; max-height: 420px; overflow: auto; }
.adm-op { display: grid; grid-template-columns: 150px 1fr auto 80px; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--line); font-size: 13.5px; color: inherit; text-decoration: none; }
a.adm-op { grid-template-columns: 1fr auto; }
.adm-op:last-child { border-bottom: 0; }
.adm-op-r { min-width: 0; display: flex; flex-direction: column; gap: 2px; } .adm-op-r small { color: var(--mut); font-size: 12px; }
.adm-op-b { text-align: right; }
.plus { color: #7fe0a8; } .minus { color: #ff8a9a; }
@media (max-width: 720px) {
  .adm-row { flex-wrap: wrap; }
  .adm-row:not(.click) .adm-act { width: 100%; justify-content: flex-end; }
  .adm-stats { grid-template-columns: 1fr 1fr; }
  .adm-op { grid-template-columns: 1fr auto; } .adm-op > .dim:first-child, .adm-op-b { display: none; }
  .adm-top { flex-direction: column; } .adm-cv.lg { width: 96px; }
  form.adm-bar { flex-wrap: nowrap; } form.adm-bar .adm-search { flex: 1 1 0; min-width: 0; }
  .adm-uh > .btn { width: 100%; }
}

/* поделиться */
.iconbtn.sp-share { width: 58px; height: 58px; border-radius: 18px; flex: none; background: rgba(255,255,255,.07); border-color: var(--line2); transition: background .2s, border-color .2s, transform .15s; }
.iconbtn.sp-share:hover { background: rgba(226,69,127,.14); border-color: rgba(226,69,127,.45); }
.iconbtn.sp-share:active { transform: scale(.96); }
.tag.link { background: rgba(123,92,255,.18); color: #c9b8ff; }
.sh-card { display: flex; gap: 14px; align-items: center; padding: 12px; border-radius: 18px; background: rgba(255,255,255,.035); border: 1px solid var(--line); }
.sh-cv { flex: none; width: 64px; aspect-ratio: 2 / 3; border-radius: 12px; background: var(--card2) center / cover; box-shadow: 0 8px 20px rgba(0,0,0,.35), 0 0 0 1px rgba(255,255,255,.08); }
.sh-ci { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.sh-ci b { font-family: 'Playfair Display', serif; font-size: 18px; line-height: 1.2; }
.sh-ci span { font-size: 12px; font-weight: 800; letter-spacing: .03em; color: var(--gold); }
.sh-ci small { font-size: 13px; line-height: 1.45; color: var(--mut); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sh-row { display: flex; align-items: center; gap: 16px; padding: 14px 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.sh-row > div { flex: 1; min-width: 0; }
.sh-row b { display: block; font-size: 15px; } .sh-row span { display: block; margin-top: 3px; font-size: 13px; line-height: 1.45; color: var(--mut); }
.sh-box { display: flex; flex-direction: column; gap: 12px; animation: fade .2s; }
.sh-url { display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 7px 0 14px; border-radius: 16px; background: rgba(0,0,0,.28); border: 1px solid var(--line2); }
.sh-url .ic { flex: none; }
.sh-url span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; font-weight: 700; }
.sh-url .btn { flex: none; min-width: 124px; }
.sh-url .btn.done { background: rgba(63,208,201,.14); color: var(--teal); border: 1px solid rgba(63,208,201,.35); }
.sh-to { display: flex; flex-wrap: wrap; gap: 8px; }
.sh-to a, .sh-to button { display: inline-flex; align-items: center; height: 38px; padding: 0 16px; border-radius: 12px; background: rgba(255,255,255,.06); border: 1px solid var(--line2); color: var(--text); font: inherit; font-size: 13.5px; font-weight: 800; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s; }
.sh-to a:hover, .sh-to button:hover { background: rgba(255,255,255,.11); border-color: rgba(255,255,255,.24); }
.sh-note { font-size: 12.5px; line-height: 1.45; color: var(--dim); }
.sparks-h { display: flex; align-items: center; gap: 8px; margin: 26px 0 12px; }
.sparks-h > span { flex: 1; font-size: 13px; font-weight: 800; color: var(--mut); letter-spacing: .02em; }
.hero-save { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: rgba(123,92,255,.08); border: 1px solid rgba(123,92,255,.22); font-size: 13px; line-height: 1.45; color: var(--mut); }
.hero-save .ic { flex: none; }

/* ---------- текст истории для модератора ---------- */
.adm-text { max-width: 860px; margin: 0 auto; }
.adm-th { display: flex; align-items: center; gap: 14px; }
.adm-th > .iconbtn { flex: none; font-size: 18px; }
.adm-eps { align-self: flex-start; max-width: 100%; overflow-x: auto; }
.adm-sh { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; margin-bottom: 8px; }
.adm-sh .h2 { margin: 0; }
.adm-sh .dim { font-size: 13px; }
.sr .beat:hover { background: none; }
.sr .bmeta { cursor: default; }
.sr .bmeta:hover b { text-decoration: none; }
.sr .btxt { font-size: 15px; line-height: 1.5; padding: 3px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.sr .beat.narr .btxt { color: rgba(246,239,244,.82); }
.sr .beat.think .btxt { font-style: italic; color: #d9ccff; }
.sr .loc-beat { cursor: default; }
.sr .opt-in { display: block; border: 0; padding: 7px 4px; cursor: default; }
.sr .opt-chips { cursor: default; }
.sr .if-cond { cursor: default; }
.sr-cg { display: flex; gap: 14px; align-items: flex-start; margin: 10px 0; padding: 12px; border-radius: 14px; background: linear-gradient(90deg, rgba(226,69,127,.14), rgba(123,92,255,.1)); border: 1px solid rgba(226,69,127,.25); }
.sr-cg img, .sr-cg-ph { display: block; width: 132px; aspect-ratio: 16/9; object-fit: cover; border-radius: 10px; background: rgba(255,255,255,.06); flex: none; }
.sr-cg b { display: block; font-size: 13px; color: var(--accent-2); }
.sr-cg small { display: block; margin-top: 4px; font-size: 12.5px; line-height: 1.45; color: var(--mut); }
@media (max-width: 720px) {
  .adm-th { flex-wrap: wrap; } .adm-th .adm-act { width: 100%; justify-content: flex-end; }
  .sr-cg { flex-direction: column; } .sr-cg img, .sr-cg-ph { width: 100%; }
}

/* иконка в строке с текстом */
.ic.g { flex: none; display: inline-block; vertical-align: -0.18em; }
.bav.ic .ic.g, .bav .ic.g { vertical-align: 0; }
.oc .ic.g { margin-right: 1px; }
.rv-more .pick-btn { width: 46px; height: 46px; justify-content: center; padding: 0; border-radius: 14px; }
.rv-more .pick-pop { min-width: 250px; }

/* план сцены изменён после того, как написан текст */
.stale { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; margin-top: 8px; padding: 8px 8px 8px 12px; border-radius: 12px; background: rgba(241,196,107,.07); border: 1px solid rgba(241,196,107,.3); font-size: 12.5px; font-weight: 700; color: var(--gold); }
.stale > span { display: inline-flex; align-items: center; gap: 7px; }
.stale-note { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12.5px; font-weight: 700; color: var(--gold); }
