/* Профиль Leyvu: шапка, вкладки, конструктор, коллекция, магазин, подписка, аккаунт и публичная страница. */
body[data-section^=profile] .v3-page{max-width:1240px}
.ph-page,.pp-page{max-width:1240px;margin:0 auto}
:is(.ph-page,.pp-page,.pv-mini,.lv-confirm) :is(a,button).button{font-size:14px;gap:8px;line-height:1.2}
:is(.ph-page,.pp-page,.pv-mini,.lv-confirm) .button>span{font-size:inherit}
.ph-page .button svg,.pp-page .button svg{width:17px;height:17px;flex:none}
.pv-hero{position:relative;border:1px solid var(--line);border-radius:18px;overflow:hidden;background:var(--panel)}
.pv-banner{height:clamp(150px,22vw,240px)}
.pv-hero.is-compact .pv-banner{height:120px}
.pv-identity{display:flex;align-items:flex-end;gap:20px;flex-wrap:wrap;padding:0 24px 22px;margin-top:-52px;position:relative;z-index:2}
.pv-hero.is-compact .pv-identity{margin-top:-36px;padding:0 16px 16px;gap:14px}
.pv-identity .lv-avatar{box-shadow:0 0 0 5px var(--panel)}
.pv-names{display:grid;gap:4px;min-width:0;flex:1 1 220px;padding-bottom:4px}
.pv-name{margin:0;font-size:clamp(24px,3vw,34px);line-height:1.1;overflow-wrap:anywhere}
.pv-hero.is-compact .pv-name{font-size:20px}
.pv-handle{margin:0;color:var(--muted);font-size:14px}
.pv-names .lv-title{justify-self:start;margin-top:4px}
.pv-actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-left:auto}
.ph-wallet{display:flex;align-items:center;gap:6px;min-height:44px;padding:0 14px;border:1px solid var(--line);border-radius:999px;background:color-mix(in srgb,var(--panel) 80%,#000)}
.ph-coins{display:inline-flex;align-items:center;gap:6px;color:#ffc857}.ph-coins strong{color:var(--ink);font-size:16px}
.ph-wallet-label{color:var(--muted);font-size:13px}
.pv-actions .button,.ph-tabs a,.ph-filters a{display:inline-flex;align-items:center;gap:8px}
.ph-tabs{position:sticky;top:64px;z-index:5;display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;margin:18px 0 22px;padding:6px;border:1px solid var(--line);border-radius:14px;background:color-mix(in srgb,var(--bg) 88%,transparent);backdrop-filter:blur(12px)}
.ph-tabs::-webkit-scrollbar{display:none}
.ph-tabs a{flex:none;min-height:44px;padding:0 16px;border-radius:10px;color:var(--muted);text-decoration:none;font-weight:700;font-size:14px;transition:background .2s,color .2s}
.ph-tabs a:hover{color:var(--ink);background:color-mix(in srgb,var(--ink) 6%,transparent)}
.ph-tabs a[aria-current=page]{color:var(--ink);background:color-mix(in srgb,var(--accent) 18%,var(--panel));box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--accent) 40%,transparent)}
.ph-card{background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:22px;margin:0 0 18px;min-width:0}
.ph-card>h2,.ph-section-head h2{margin:0 0 6px;font-size:20px;display:flex;align-items:center;gap:10px}
.ph-section-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;flex-wrap:wrap;margin-bottom:14px}
.ph-section-head p,.ph-hint{margin:0 0 12px;color:var(--muted);font-size:14px;line-height:1.55}
.ph-hint a{color:var(--accent)}
.ph-kicker{margin:0;color:var(--accent);font-size:12px;font-weight:800;letter-spacing:.12em}
.ph-subhead{margin:18px 0 10px;font-size:14px;color:var(--muted)}
.ph-chip{display:inline-flex;align-items:center;min-height:26px;padding:0 10px;border-radius:999px;background:color-mix(in srgb,var(--accent) 20%,transparent);color:var(--ink);font-size:12px;font-weight:700}
.ph-empty{display:grid;justify-items:center;gap:10px;padding:28px 16px;text-align:center;color:var(--muted)}
.ph-empty svg{width:28px;height:28px;color:var(--accent)}
.ph-empty p{margin:0}

/* Конструктор */
.ph-grid{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,6fr);gap:22px;align-items:start}
.ph-preview{position:sticky;top:134px}
.ph-preview-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
.ph-preview-head h2{margin:0;font-size:16px}
.ph-preview-card{border-radius:18px}
.pv-showcase{display:grid;gap:12px;margin-top:12px}
.ph-editor fieldset{border:1px solid var(--line);margin:0 0 18px}
.ph-editor legend{float:left;width:100%;padding:0;margin:0 0 14px;font-size:18px;font-weight:800}
.ph-editor legend+*{clear:both}
.ph-editor label{display:grid;gap:7px;margin:0 0 14px;font-size:13px;font-weight:700}
.ph-editor :is(input:not([type=checkbox]):not([type=radio]):not([type=file]),textarea),.ph-inline-form input:not([type=checkbox]),#hubDelete input{width:100%;min-height:44px;padding:11px 13px;border:1px solid var(--line);border-radius:10px;background:var(--bg);color:var(--ink);font:inherit;font-weight:500;font-size:15px;line-height:1.4}
.ph-editor textarea{resize:vertical}
.ph-editor small,.ph-hint small{color:var(--muted);font-weight:500;font-size:12px;line-height:1.45}
.ph-error{color:var(--v2-error,#e4776b)!important}
.ph-avatar-row{display:flex;align-items:center;gap:16px;margin:0 0 16px}
.ph-avatar-row>div{display:grid;gap:8px;justify-items:start}
.ph-upload{cursor:pointer;margin:0!important;display:inline-flex!important;grid-auto-flow:column}
.ph-switch{position:relative;display:grid!important;grid-template-columns:auto 1fr;align-items:start;gap:12px!important;cursor:pointer}
.ph-switch input{position:absolute;opacity:0;width:1px;height:1px}
.ph-switch-ui{width:44px;height:26px;border-radius:999px;background:var(--line);position:relative;transition:background .2s;margin-top:2px}
.ph-switch-ui::after{content:"";position:absolute;top:3px;left:3px;width:20px;height:20px;border-radius:50%;background:#fff;transition:transform .2s}
.ph-switch input:checked+.ph-switch-ui{background:var(--accent)}
.ph-switch input:checked+.ph-switch-ui::after{transform:translateX(18px)}
.ph-switch input:focus-visible+.ph-switch-ui{outline:3px solid var(--accent);outline-offset:3px}
.ph-switch>span:last-child{display:grid;gap:3px}
.ph-slot{margin:0 0 18px}
.ph-slot h3{margin:0 0 10px;font-size:14px}
.ph-swatches{display:flex;gap:10px;overflow-x:auto;padding:4px 2px 8px;scroll-snap-type:x proximity}
.ph-swatch{position:relative;flex:none;display:grid!important;gap:6px!important;justify-items:center;width:104px;margin:0!important;font-size:12px!important;font-weight:600!important;text-align:center;cursor:pointer;scroll-snap-align:start;color:var(--muted)}
.ph-swatch input{position:absolute;opacity:0;width:1px;height:1px}
.ph-swatch-art{width:104px;height:64px;border-radius:10px;border:2px solid var(--line);display:grid;place-items:center;overflow:hidden;transition:border-color .2s,transform .2s}
.ph-swatch-art.is-title{padding:0 6px;background:var(--bg)}
.ph-swatch-art.is-title .lv-title{font-size:10px;padding:2px 7px;min-height:20px}
.ph-swatch.is-none .ph-swatch-art{background:var(--bg);color:var(--muted)}
.ph-swatch:hover .ph-swatch-art{transform:translateY(-2px)}
.ph-swatch input:checked~.ph-swatch-art{border-color:var(--accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 30%,transparent)}
.ph-swatch input:checked~span:last-child{color:var(--ink)}
.ph-swatch input:focus-visible~.ph-swatch-art{outline:3px solid var(--accent);outline-offset:3px}
.ph-widgets{list-style:none;margin:0 0 14px;padding:0;display:grid;gap:8px}
.ph-widget-row{display:flex;align-items:center;gap:10px;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:var(--bg)}
.ph-widget-row label{flex:1;display:flex!important;align-items:center;gap:12px!important;margin:0!important;cursor:pointer}
.ph-widget-row input{width:20px;height:20px;accent-color:var(--accent)}
.ph-widget-row label>span{display:grid;gap:2px}
.ph-widget-row.is-locked{opacity:.7}
.ph-order{display:flex;gap:4px}
.ph-order button,.ph-mini-link{min-width:44px;min-height:44px;display:inline-grid;place-items:center;border:1px solid var(--line);border-radius:10px;background:transparent;color:var(--ink);cursor:pointer}
.ph-mini-link{display:inline-flex;gap:6px;padding:0 12px;text-decoration:none;font-size:13px}
.ph-order button:disabled{opacity:.35;cursor:default}
.ph-favorites{display:grid;grid-template-columns:repeat(auto-fill,minmax(96px,1fr));gap:10px;max-height:420px;overflow:auto;padding:2px}
.ph-fav{position:relative;margin:0!important;cursor:pointer;gap:6px!important;font-size:12px!important;font-weight:600!important}
.ph-fav input{position:absolute;top:6px;left:6px;width:20px;height:20px;accent-color:var(--accent);z-index:1}
.ph-fav img{width:100%;aspect-ratio:2/3;object-fit:cover;border-radius:10px;border:2px solid transparent;background:var(--bg)}
.ph-fav input:checked~img{border-color:var(--accent)}
.ph-fav span{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.ph-savebar{position:sticky;bottom:12px;z-index:4;display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:12px 14px;border:1px solid var(--line);border-radius:14px;background:color-mix(in srgb,var(--panel) 92%,transparent);backdrop-filter:blur(12px);box-shadow:0 14px 40px #0006}
.ph-savebar p{flex:1 1 160px;min-width:0;margin:0;color:var(--muted);font-size:13px}
.ph-savebar .button{flex:none}
.ph-page .text-button>span{font-size:inherit}
.ph-savebar p[data-error=true]{color:var(--v2-error,#e4776b)}
.ph-page .text-button{display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:0 6px;border:0;background:none;color:var(--muted);font:inherit;font-size:14px;cursor:pointer}
.ph-page .text-button:hover{color:var(--ink)}

/* Витрина */
.pv-widget{background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:16px}
.pv-widget h2{margin:0 0 12px;font-size:15px}
.pv-about{margin:0;white-space:pre-line;line-height:1.6}
.pv-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:10px;margin:0}
.pv-stats div{padding:12px;border-radius:10px;background:var(--bg)}
.pv-stats dt{color:var(--muted);font-size:12px}.pv-stats dd{margin:4px 0 0;font-size:22px;font-weight:800}
.pv-posters{display:grid;grid-template-columns:repeat(auto-fill,minmax(92px,1fr));gap:10px}
.pv-posters.is-small{grid-template-columns:repeat(auto-fill,minmax(76px,1fr))}
.pv-posters a{display:grid;gap:6px;color:var(--ink);text-decoration:none;font-size:12px;font-weight:600}
.pv-posters img{width:100%;aspect-ratio:2/3;object-fit:cover;border-radius:10px;background:var(--bg)}
.pv-posters span{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.pv-badges{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:8px}
.pv-badges li{display:inline-flex;align-items:center;gap:6px;min-height:32px;padding:0 12px;border-radius:999px;border:1px solid color-mix(in srgb,var(--lv-rarity) 45%,transparent);color:color-mix(in srgb,var(--lv-rarity) 35%,#fff);font-size:13px;font-weight:700}
.pv-badges svg{width:15px;height:15px}
.pv-quote{margin:0;display:flex;gap:12px;font-size:17px;line-height:1.55}
.pv-quote svg{flex:none;color:var(--accent)}.pv-quote p{margin:0}
.pv-title-shelf{display:flex;flex-wrap:wrap;gap:8px}

/* Коллекция и магазин */
.ph-ach-group h3{margin:18px 0 10px;font-size:14px;color:var(--muted);letter-spacing:.04em;text-transform:uppercase}
.ph-achievements{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:10px}
.ph-ach{display:grid;grid-template-columns:auto 1fr;gap:12px;padding:14px;border:1px solid var(--line);border-radius:12px;background:var(--bg);position:relative}
.ph-ach>.lv-rarity{grid-column:1/-1;justify-self:start}
.ph-ach h4{margin:0 0 4px;font-size:15px}.ph-ach p{margin:0 0 6px;color:var(--muted);font-size:13px;line-height:1.45}
.ph-ach-icon{width:42px;height:42px;border-radius:12px;display:grid;place-items:center;background:color-mix(in srgb,var(--lv-rarity) 12%,transparent);color:var(--muted)}
.ph-ach.is-earned{border-color:color-mix(in srgb,var(--lv-rarity) 45%,var(--line))}
.ph-ach.is-earned .ph-ach-icon{color:var(--lv-rarity);background:color-mix(in srgb,var(--lv-rarity) 20%,transparent)}
.ph-progress{height:6px;border-radius:999px;background:var(--line);overflow:hidden;margin:6px 0 4px}
.ph-progress span{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--accent),color-mix(in srgb,var(--accent) 50%,#ffc857))}
.ph-ach-count,.ph-ach-date{font-size:12px!important}
.ph-ach-reward{display:flex;align-items:center;gap:6px;color:#ffc857!important;font-size:12px!important;font-weight:700}
.ph-ach-reward svg{width:14px;height:14px}
.ph-rules{margin-top:18px;color:var(--muted);font-size:13px;line-height:1.55}
.ph-rules summary,.ph-history summary,.ph-danger summary{display:flex;align-items:center;gap:8px;min-height:44px;cursor:pointer;color:var(--ink);font-weight:700}
.ph-filters{display:flex;gap:8px;overflow-x:auto;padding:2px 2px 12px;scrollbar-width:none}
.ph-filters a{flex:none;min-height:40px;padding:0 14px;border:1px solid var(--line);border-radius:999px;color:var(--muted);text-decoration:none;font-size:13px;font-weight:700}
.ph-filters a[aria-current]{color:var(--ink);border-color:var(--accent);background:color-mix(in srgb,var(--accent) 14%,transparent)}
.ph-items{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:14px}
.ph-item{display:flex;flex-direction:column;border:1px solid var(--line);border-radius:14px;overflow:hidden;background:var(--bg);transition:transform .2s,border-color .2s}
.ph-item:hover{transform:translateY(-2px);border-color:color-mix(in srgb,var(--lv-rarity,var(--accent)) 30%,var(--line))}
.ph-item.is-equipped{border-color:var(--accent)}
.ph-item-art{height:130px;display:grid;place-items:center;padding:12px}
.ph-item-art:not(.lv-art){background:color-mix(in srgb,var(--panel) 70%,#000)}
.ph-comment-sample{width:100%;padding:12px 14px;font-size:13px}.ph-comment-sample p{margin:4px 0 0;color:var(--ink)}
.ph-widget-icon svg{width:40px;height:40px;color:var(--accent)}
.ph-item-body{display:flex;flex-direction:column;gap:6px;padding:14px;flex:1}
.ph-item-body h3{margin:0;font-size:16px}.ph-item-body p{margin:0;color:var(--muted);font-size:13px;line-height:1.45}
.ph-item-meta{font-size:12px!important}
.ph-item-body .button,.ph-source{margin-top:auto;justify-content:center;display:inline-flex;align-items:center;gap:8px}
.ph-source{min-height:44px;color:var(--muted);font-size:13px;text-align:center}
.ph-shop-top{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-bottom:4px}
.ph-balance,.ph-daily-card{display:flex;align-items:center;gap:14px}
.ph-balance p,.ph-daily-card p{margin:0;color:var(--muted);font-size:13px}
.ph-balance strong,.ph-daily-card strong{font-size:26px}
.ph-daily-card small{display:block;color:var(--muted);font-size:12px;margin-top:4px}
.ph-daily-card .button{margin-left:auto}
.ph-balance-icon{width:52px;height:52px;flex:none;border-radius:14px;display:grid;place-items:center;background:color-mix(in srgb,#ffc857 16%,transparent);color:#ffc857}
.ph-balance-icon svg{width:26px;height:26px}
.ph-earn h3{margin:0 0 8px;font-size:15px}.ph-earn ul{list-style:none;margin:0 0 8px;padding:0;display:grid;gap:6px;font-size:14px}.ph-earn li{display:flex;align-items:center;gap:8px}
.ph-earn p{margin:0;color:var(--muted);font-size:12px}.ph-earn a{color:var(--accent)}
.ph-history table{width:100%;border-collapse:collapse;font-size:14px;margin-top:10px}
.ph-history th,.ph-history td{text-align:left;padding:10px 8px;border-bottom:1px solid var(--line)}
.ph-history th{color:var(--muted);font-weight:600;font-size:12px}
.is-plus{color:var(--v2-success,#78bd9d)}.is-minus{color:var(--v2-error,#e4776b)}

/* Подписка и аккаунт */
.ph-sub-hero{display:flex;gap:18px;align-items:flex-start;background:radial-gradient(80% 120% at 0 0,#ffd77a1f,transparent 60%),var(--panel)}
.ph-sub-hero h2{margin:6px 0 8px;font-size:24px}.ph-sub-hero p{margin:0;line-height:1.6;color:var(--muted)}
.ph-sub-icon{width:56px;height:56px;flex:none;border-radius:16px;display:grid;place-items:center;background:#ffd77a22;color:#ffd77a}
.ph-list{list-style:none;margin:8px 0 0;padding:0;display:grid;gap:12px}
.ph-list li{display:flex;gap:10px;line-height:1.55}.ph-list svg{flex:none;margin-top:3px;color:var(--accent)}
.ph-card details{border-top:1px solid var(--line);padding:6px 0}
.ph-card details summary{min-height:44px;display:flex;align-items:center;cursor:pointer;font-weight:700}
.ph-card details p{margin:0 0 10px;color:var(--muted);line-height:1.55}
.ph-account{max-width:760px}
.ph-identity .identity-providers{display:flex;flex-wrap:wrap;gap:10px;margin:10px 0}
.ph-identity .button{display:inline-flex;align-items:center;gap:8px}
.ph-identity form{display:grid;gap:10px;max-width:420px}
.ph-identity input{min-height:44px;padding:11px 13px;border:1px solid var(--line);border-radius:10px;background:var(--bg);color:var(--ink);font:inherit}
.ph-inline-form{display:grid;gap:12px;max-width:520px}
.ph-inline-form label{display:grid;gap:6px;font-size:13px;font-weight:700}
.ph-inline-form .button{justify-self:start}
.ph-share{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:12px 0 0}.ph-share a{color:var(--accent)}
#hubRecovery code{display:block;margin:10px 0 14px;padding:12px;border-radius:10px;background:var(--bg);font-size:15px;word-break:break-all}
.ph-danger summary{color:var(--v2-error,#e4776b)}
.ph-danger form{display:grid;gap:12px;max-width:460px;margin-top:10px}.ph-danger label{display:grid;gap:6px;font-size:13px;font-weight:700}
.button.danger{background:var(--v2-error,#e4776b);color:#1b0b08;border:0;justify-self:start}
.ph-logout{display:inline-flex;align-items:center;gap:8px}

/* Публичный профиль */
.pp-layout{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:20px;margin-top:20px;align-items:start}
.pp-side{display:grid;gap:14px;position:sticky;top:84px}
.pp-social{display:flex;flex-wrap:wrap;gap:8px}
.pp-social .button{display:inline-flex;align-items:center;gap:8px}
.pp-closed{padding:40px 20px;text-align:center;color:var(--muted)}
.pp-closed svg{width:30px;height:30px}

@media(max-width:1100px){.ph-grid,.pp-layout{grid-template-columns:minmax(0,1fr)}.ph-preview,.pp-side{position:static}.ph-preview{order:2}.ph-shop-top{grid-template-columns:1fr 1fr}.ph-earn{grid-column:1/-1}}
@media(max-width:640px){.ph-card{padding:16px;border-radius:12px}.pv-identity{padding:0 16px 16px;margin-top:-40px;gap:12px}.pv-identity .lv-avatar{--size:84px!important}.pv-actions{width:100%;margin-left:0}.pv-actions .button{flex:1 1 auto;justify-content:center}.ph-tabs{top:56px;margin:12px 0 16px}.ph-shop-top{grid-template-columns:1fr}.ph-daily-card{flex-wrap:wrap}.ph-daily-card .button{margin-left:0;width:100%}.ph-items{grid-template-columns:1fr 1fr;gap:10px}.ph-item-art{height:96px}.ph-item-body{padding:10px}.ph-item-body p:not(.ph-item-meta){display:none}.ph-item-body .button{font-size:13px;padding:8px 10px}.ph-savebar{bottom:72px}.ph-swatch,.ph-swatch-art{width:88px}.ph-achievements{grid-template-columns:1fr}}
@media(max-width:640px){.ph-lack{display:none}}
@media(max-width:380px){.ph-items{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){.ph-item,.ph-swatch-art,.ph-switch-ui,.ph-switch-ui::after,.ph-tabs a{transition:none}.ph-item:hover,.ph-swatch:hover .ph-swatch-art{transform:none}}
.ph-franchise{border:1px solid var(--line);border-radius:12px;margin:0 0 10px;background:var(--bg);padding:0 14px}
.ph-franchise>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:52px;cursor:pointer;font-weight:800;list-style:none}
.ph-franchise>summary::-webkit-details-marker{display:none}
.ph-franchise>summary::after{content:"";width:9px;height:9px;border-right:2px solid var(--muted);border-bottom:2px solid var(--muted);transform:rotate(45deg);transition:transform .2s;margin-left:4px}
.ph-franchise[open]>summary::after{transform:rotate(-135deg)}
.ph-franchise>summary>span:first-child{flex:1}
.ph-franchise .ph-achievements{padding:0 0 14px}
.ph-franchise .ph-ach{background:var(--panel)}
.ph-ach-unlock{display:flex;align-items:center;gap:6px;font-size:12px!important}.ph-ach-unlock svg{width:14px;height:14px}.ph-ach-unlock a{color:var(--accent)}
.ph-locked summary{display:flex;align-items:center;gap:8px;min-height:44px;cursor:pointer;font-weight:700}
.ph-locked-list{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:8px}
.ph-locked-list li{display:grid;grid-template-columns:1fr auto;gap:4px 10px;align-items:center;padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:var(--bg)}
.ph-locked-list li>span{grid-column:1;color:var(--muted);font-size:12px}
.ph-locked-list li>strong{grid-row:1/3;grid-column:2;display:inline-flex;align-items:center;gap:6px;color:#ffc857;font-size:13px}
.ph-locked-list .lv-title{justify-self:start}
@media(prefers-reduced-motion:reduce){.ph-franchise>summary::after{transition:none}}
.ph-quest-list{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:10px}
.ph-quest{display:grid;grid-template-columns:auto 1fr;gap:12px;padding:14px;border:1px solid var(--line);border-radius:12px;background:var(--bg);--lv-rarity:#ffb547}
.ph-quest h4{margin:0 0 4px;font-size:15px}.ph-quest p{margin:0 0 6px;color:var(--muted);font-size:13px}
.ph-quest .ph-ach-count{display:flex;align-items:center;gap:4px}.ph-quest .ph-ach-count svg{width:14px;height:14px;color:#ffc857}
.ph-quest.is-done{border-color:color-mix(in srgb,var(--v2-success,#78bd9d) 50%,var(--line))}.ph-quest.is-done .ph-ach-icon{color:var(--v2-success,#78bd9d)}
.ph-feed{display:grid;gap:10px;margin:0 0 14px}
.ph-feed-item{display:grid;grid-template-columns:auto 1fr;gap:12px;padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--bg)}
.ph-feed-item p{margin:0 0 4px;line-height:1.5}.ph-feed-item a{color:var(--ink);font-weight:700}.ph-feed-item a:hover{color:var(--accent)}
.ph-feed-excerpt{color:var(--muted);font-size:13px}.ph-feed-item time{color:var(--muted);font-size:12px}
.ph-feed-avatar{text-decoration:none}
.pv-genres{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.pv-genres li{position:relative;display:flex;justify-content:space-between;padding:8px 12px;border-radius:10px;background:var(--bg);overflow:hidden;font-size:14px}
.pv-genres li::before{content:"";position:absolute;inset:0 auto 0 0;width:var(--w);background:color-mix(in srgb,var(--accent) 18%,transparent);border-radius:inherit}
.pv-genres li>*{position:relative}
.pv-timeline{display:flex;align-items:flex-end;gap:4px;height:120px;padding-top:8px}
.pv-timeline span{flex:1;height:100%;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:4px;min-width:0}
.pv-timeline i{display:block;width:100%;height:var(--h);border-radius:6px 6px 2px 2px;background:linear-gradient(180deg,var(--accent),color-mix(in srgb,var(--accent) 40%,transparent))}
.pv-timeline small{color:var(--muted);font-size:10px}
.pv-reviews{display:grid;gap:8px}.pv-reviews a{display:block;padding:12px;border-radius:10px;background:var(--bg);color:var(--ink);text-decoration:none}.pv-reviews a:hover{outline:1px solid var(--line)}
.pv-reviews p{margin:6px 0 0;color:var(--muted);font-size:13px;line-height:1.5}.pv-review-score{display:inline-flex;align-items:center;gap:4px;margin-left:8px;color:#ffc857;font-size:13px}.pv-review-score svg{width:13px;height:13px}
.pp-compat-score{--p:0;width:120px;height:120px;margin:6px auto 12px;border-radius:50%;display:grid;place-items:center;background:conic-gradient(var(--accent) calc(var(--p)*1%),var(--line) 0)}
.pp-compat-score strong{width:96px;height:96px;border-radius:50%;display:grid;place-items:center;background:var(--panel);font-size:26px}

/* Баннер в разделе «Основное» */
.ph-banner-row{display:flex;align-items:center;gap:16px;margin:0 0 16px}
.ph-banner-row>div{display:grid;gap:8px;justify-items:start}
.ph-banner-thumb{width:144px;aspect-ratio:4/1;flex:0 0 auto;border:1px solid var(--line);border-radius:10px;background:linear-gradient(135deg,#ff725b33,#7c5cff33) center/cover}
@media (max-width:520px){.ph-banner-row{align-items:flex-start;flex-direction:column}.ph-banner-thumb{width:100%}}
/* На телефоне шапка сайта не закреплена: вкладки прилипают к самому верху и закрывают содержимое под собой */
@media(max-width:820px){.ph-tabs{top:0;margin-left:-4px;margin-right:-4px;border-radius:0 0 14px 14px;border-top:0;background:var(--bg);box-shadow:0 8px 20px #0007;padding-top:max(6px,env(safe-area-inset-top))}}
/* позиции магазина для Leyvu Plus */
.ph-item.is-plus{border-color:#7c5cff55;box-shadow:inset 0 0 0 1px #7c5cff22}
.ph-plus-tag{display:inline-flex;align-items:center;gap:4px;justify-self:start;width:max-content;margin-left:6px;padding:1px 8px;border-radius:999px;background:linear-gradient(90deg,#7c5cff,#ff8ab0);color:#fff;font-size:11px;font-weight:800;vertical-align:middle}
.ph-plus-tag svg{width:12px;height:12px}
.ph-plus-lock{border-color:#7c5cff66!important;color:#c6b8ff!important}
.ph-old-price{margin-left:4px;opacity:.6;font-weight:600}
/* ===== Профиль, настройки и активность 27.10.2026: свечения, стеклянные карточки, настройки в две колонки ===== */
.ph-page .pv-hero{position:relative;overflow:hidden;border-radius:22px;box-shadow:0 30px 80px -40px color-mix(in srgb,var(--accent) 55%,transparent)}
.ph-page .pv-banner{position:relative}.ph-page .pv-banner::after{content:'';position:absolute;inset:auto 0 0;height:55%;background:linear-gradient(180deg,transparent,color-mix(in srgb,var(--panel) 92%,transparent));pointer-events:none}
.ph-page .pv-identity .lv-avatar:not(.has-ring):not(.has-frame-img){box-shadow:0 0 0 4px var(--panel),0 0 0 6px color-mix(in srgb,var(--accent) 55%,transparent),0 18px 40px -12px color-mix(in srgb,var(--accent) 60%,transparent)}
.ph-page .pv-name{letter-spacing:-.6px}
.ph-tabs{border-radius:18px;padding:6px;box-shadow:0 10px 30px -20px #000}
.ph-tabs a[aria-current=page],.ph-tabs a[aria-selected=true],.ph-tabs a.is-active{background:linear-gradient(135deg,color-mix(in srgb,var(--accent) 26%,transparent),color-mix(in srgb,var(--accent) 10%,transparent));color:var(--ink,#fff);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--accent) 45%,transparent),0 8px 22px -12px var(--accent)}
.ph-tabs a:hover{color:var(--ink,#fff);background:color-mix(in srgb,var(--ink,#fff) 6%,transparent)}
.ph-card{position:relative;border-radius:20px;background:radial-gradient(120% 70% at 0% 0%,color-mix(in srgb,var(--accent) 7%,transparent),transparent 55%),var(--panel);transition:border-color .2s,box-shadow .2s}
.ph-card:hover{border-color:color-mix(in srgb,var(--accent) 22%,var(--line))}
.ph-card>h2{display:flex;align-items:center;gap:10px;font-size:18px;letter-spacing:-.2px}
.ph-card>h2>svg{flex:none;width:34px;height:34px;padding:8px;border-radius:11px;background:color-mix(in srgb,var(--accent) 15%,transparent);color:var(--accent)}
.ph-empty{display:grid;justify-items:center;gap:10px;padding:34px 16px;border:1px dashed color-mix(in srgb,var(--ink,#fff) 12%,transparent);border-radius:18px;background:radial-gradient(60% 80% at 50% 0%,color-mix(in srgb,var(--accent) 8%,transparent),transparent 70%);text-align:center;color:var(--muted)}
/* «Аккаунт»: на широком экране две колонки, опасные действия — во всю ширину внизу */
@media (min-width:1100px){.ph-account{max-width:none;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;align-items:start}.ph-account>.ph-card{margin:0}.ph-account>#customTheme,.ph-account>.ph-danger,.ph-account>:last-child{grid-column:1/-1}}
.ph-account>.ph-card:has(.button.danger),.ph-danger{border-color:color-mix(in srgb,#ff5d5d 30%,var(--line));background:radial-gradient(100% 80% at 0% 0%,#ff5d5d10,transparent 60%),var(--panel)}
.ph-switch-ui{transition:background .2s,box-shadow .2s}.ph-switch input:checked+.ph-switch-ui{box-shadow:0 0 14px -2px var(--accent)}
@media (prefers-reduced-motion:reduce){.ph-card{transition:none}}
@media (min-width:1100px){.ph-account>.ph-card:has(#appearanceThemes){grid-column:1/-1}.ph-account>.ph-card:has(#appearanceThemes) .v31-theme-grid{grid-template-columns:repeat(6,minmax(0,1fr))}.ph-account>:last-child:not(.ph-card){justify-self:start}}
/* ===== Плотность профиля и вкладок (27.10.2026): меньше пустого места, больше видно сразу ===== */
@media (min-width:900px){
 .ph-page .pv-banner{height:clamp(120px,13vw,190px)}
 .ph-page .pv-hero.is-compact .pv-banner{height:96px}
 .ph-tabs{margin:12px 0 16px}
 .ph-card{padding:18px 20px;margin-bottom:14px}
 .ph-card>h2{margin-top:0;margin-bottom:6px}
 .ph-grid{grid-template-columns:minmax(300px,380px) minmax(0,1fr);gap:18px}
 .ph-preview{top:120px}
 /* магазин: верхние карточки одной полосой, задания компактнее */
 .ph-shop-top{gap:10px}.ph-shop-top>*{padding:14px 16px!important;min-height:0!important}
 .ph-quest-list{gap:8px}.ph-quest{padding:10px 12px!important}
 /* карточки предметов: шире сетка, ниже превью, описание в одну строку */
 .ph-items{grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:10px}
 .ph-item{border-radius:14px}.ph-item-art{height:96px;padding:8px}
 .ph-item-body{gap:4px;padding:10px 12px 12px}.ph-item-body h3{font-size:14.5px;line-height:1.25}
 .ph-item-body p:not(.ph-item-meta){display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;font-size:12.5px}
 .ph-item-meta{display:none}
 .ph-item-body .button,.ph-source{min-height:36px;padding:0 10px;font-size:12.5px;border-radius:10px}
 /* достижения: больше колонок, плотнее карточки */
 .ph-achievements{grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:8px}
 .ph-ach{gap:10px;padding:11px 12px;border-radius:12px}.ph-ach-icon{width:36px;height:36px;border-radius:10px}.ph-ach h4{font-size:14px}.ph-ach p{font-size:12.5px;margin-bottom:4px}
 .ph-ach-group h3{margin:14px 0 8px}
 /* редактор профиля: слоты оформления по два в ряд, витрина в две колонки */
 .ph-editor .ph-slots{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 18px}
 .ph-widgets{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.ph-widgets>*{margin:0!important}
}
.ph-more{display:flex;justify-content:center;margin:14px 0 4px}.ph-more .button{min-width:220px}
.ph-items>[hidden],.ph-more[hidden]{display:none!important}
@media (min-width:900px){.ph-item-body .button{flex-wrap:wrap;height:auto;min-height:36px;padding:6px 8px;white-space:normal;line-height:1.25;text-align:center}.ph-item-body .button .ph-lack{display:block;width:100%;font-size:11px;font-weight:600;opacity:.75}.ph-item-body .button>span{display:inline-block}}
/* Аниме-достижения: сетка постеров, панель раскрывается под рядом (dense заполняет ряд до панели) */
.ph-fr-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));grid-auto-flow:row dense;gap:16px 14px;margin-top:12px}
.ph-fr{appearance:none;border:0;background:none;color:inherit;font:inherit;padding:0;text-align:left;cursor:pointer;display:grid;gap:8px;min-width:0}
.ph-fr-poster{position:relative;display:block;aspect-ratio:2/3;border-radius:14px;overflow:hidden;background:var(--panel,#1a1b20);box-shadow:0 0 0 1px var(--line,#ffffff14);transition:transform .2s,box-shadow .2s}
.ph-fr-poster img{width:100%;height:100%;object-fit:cover;display:block;transition:filter .2s}
.ph-fr:not(.is-done):not(.is-started) .ph-fr-poster img{filter:saturate(.55) brightness(.75)}
.ph-fr:hover .ph-fr-poster{transform:translateY(-3px);box-shadow:0 0 0 1px var(--line,#ffffff24),0 14px 30px -14px #000}
.ph-fr:hover .ph-fr-poster img{filter:none}
.ph-fr[aria-expanded="true"] .ph-fr-poster{box-shadow:0 0 0 2px var(--accent,#ff725b),0 14px 30px -14px var(--accent,#ff725b)}
.ph-fr:focus-visible{outline:none}.ph-fr:focus-visible .ph-fr-poster{box-shadow:0 0 0 2px var(--accent,#ff725b)}
.ph-fr-count{position:absolute;left:8px;top:8px;display:inline-flex;align-items:center;gap:5px;padding:4px 8px;border-radius:999px;font-size:12px;font-weight:800;background:#000000b8;color:#fff;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}
.ph-fr-count svg{width:13px;height:13px}
.ph-fr.is-done .ph-fr-count{background:#f2c94c;color:#1a1300}
.ph-fr-name{font-weight:700;font-size:14px;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.ph-fr-bar{display:block;height:4px;border-radius:4px;background:var(--line,#ffffff14);overflow:hidden}
.ph-fr-bar span{display:block;height:100%;background:var(--accent,#ff725b);border-radius:inherit}
.ph-fr.is-done .ph-fr-bar span{background:#f2c94c}
.ph-fr-panel{grid-column:1/-1;border:1px solid var(--line,#ffffff14);border-radius:16px;background:var(--bg,#111215);padding:14px 16px 4px;animation:phFrIn .22s ease both}
.ph-fr-panel[hidden]{display:none!important}
.ph-fr-head{display:flex;align-items:center;gap:10px;margin-bottom:10px}
.ph-fr-head h4{margin:0;font-size:17px;flex:1;min-width:0}
.ph-fr-close{appearance:none;border:0;background:var(--panel,#ffffff10);color:inherit;width:34px;height:34px;border-radius:10px;display:grid;place-items:center;cursor:pointer}
.ph-fr-close svg{width:16px;height:16px}
.ph-fr-panel .ph-achievements{padding:0 0 12px}
.ph-fr-panel .ph-ach{background:var(--panel)}
@keyframes phFrIn{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}
@media(max-width:560px){.ph-fr-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px 8px}.ph-fr-name{font-size:12px}.ph-fr-count{font-size:11px;left:5px;top:5px;padding:3px 6px}.ph-fr-panel{padding:12px 10px 2px}}
@media(prefers-reduced-motion:reduce){.ph-fr-poster,.ph-fr-panel{transition:none;animation:none}}
/* Кнопка покупки: одна строка — «Купить» слева, цена в коинах справа (старая цена зачёркнута) */
.ph-item-body .button.ph-buy{display:flex;flex-wrap:nowrap;align-items:center;justify-content:space-between;gap:8px;width:100%;min-height:40px;height:auto;padding:0 6px 0 14px;white-space:nowrap;line-height:1;border-radius:12px;text-align:left}
.ph-buy .ph-buy-label{font-weight:750;font-size:13px;overflow:hidden;text-overflow:ellipsis;min-width:0}
.ph-buy .ph-buy-price{display:inline-flex;align-items:center;gap:5px;flex:none;padding:6px 9px;border-radius:9px;background:#00000026;font-size:13px}
.ph-buy .ph-buy-price b{font-weight:800}
.ph-buy .ph-buy-price svg{width:15px;height:15px}
.ph-buy .ph-old-price{font-size:11px;opacity:.65;font-weight:600}
.ph-item-body .button.ph-buy.is-lack{opacity:1;cursor:not-allowed;background:var(--panel,#ffffff0d);color:var(--muted,#a4a8b3);box-shadow:inset 0 0 0 1px var(--line,#ffffff14)}
.ph-buy.is-lack .ph-buy-label{font-weight:600;font-size:12px}
.ph-buy.is-lack .ph-buy-price{background:#ffffff0d;color:var(--text,#e9eaef)}
@media(max-width:560px){.ph-item-body .button.ph-buy{padding-left:10px}.ph-buy .ph-buy-label{font-size:12px}.ph-buy .ph-buy-price{padding:5px 7px;font-size:12px}.ph-buy .ph-old-price{display:none}}
/* Поиск в магазине */
.ph-search{display:flex;align-items:center;gap:10px;margin:4px 0 14px;padding:0 14px;min-height:46px;border-radius:14px;background:var(--bg,#111215);box-shadow:inset 0 0 0 1px var(--line,#ffffff14);transition:box-shadow .2s}
.ph-search:focus-within{box-shadow:inset 0 0 0 2px var(--accent,#ff725b)}
.ph-search svg{width:18px;height:18px;flex:none;color:var(--muted,#9aa0ab)}
.ph-search input{flex:1;min-width:0;border:0!important;background:none!important;outline:0!important;box-shadow:none!important;color:inherit;font:inherit;font-size:15px;padding:0!important;height:44px}
.ph-search input::-webkit-search-cancel-button{cursor:pointer}
.ph-search-empty{padding:28px 16px;text-align:center}
.ph-card label.ph-search{display:flex!important;flex-direction:row!important;align-items:center!important;flex-wrap:nowrap!important;gap:10px!important}
.ph-card label.ph-search>input{margin:0!important;width:auto!important;min-height:0!important;border-radius:0!important}
.ph-buy.is-lack .ph-buy-label{display:inline-flex;align-items:center;gap:5px}.ph-buy.is-lack .ph-buy-label svg{width:14px;height:14px;flex:none}
.ph-buy.is-lack .ph-old-price{display:none}.ph-item-body .button.ph-buy.is-lack{padding-left:10px;gap:6px}.ph-buy.is-lack .ph-buy-price{padding:6px 8px}
