/* Закреплённая граница 80/20; бренд не участвует в масштабировании сводки. */
header.pw-header{display:grid;grid-template-columns:minmax(0,4fr) minmax(0,1fr);gap:0;padding:0 20px;align-items:stretch;overflow:visible}
.pw-header .header-functional{min-width:0;padding-right:18px;display:flex;flex-direction:column;justify-content:space-between}
.pw-header .header-functional-top{display:flex;align-items:center;min-height:78px;gap:20px;min-width:0;flex:1}
.pw-header a.pw-brand{display:flex;align-items:center;gap:10px;flex:0 0 auto;width:max-content;min-width:max-content;margin:0;font:600 19px Georgia,serif;white-space:nowrap;letter-spacing:0;color:var(--fg)}
.pw-brand img{flex:none;object-fit:contain}.pw-brand small{display:block;margin-top:6px;font:11px system-ui,sans-serif;letter-spacing:.07em;color:var(--mut)}
.header-flow{flex:1;min-width:0;position:relative;height:62px;display:flex;align-items:center}
.header-flow-content{display:flex;align-items:center;justify-content:space-between;gap:20px;width:max-content;min-width:100%;flex:none;transform-origin:left center}
.pw-header #market-pulse{display:flex;flex:1 0 auto;align-items:center;justify-content:space-between;gap:18px;margin:0;padding:0;border:0;width:auto;min-width:0;flex-wrap:nowrap;order:0}
.pw-header .pulse-counters{display:flex;align-items:center;justify-content:space-between;gap:14px;flex:none;width:660px;box-sizing:border-box;padding:0 18px;border-left:1px solid var(--line);border-right:1px solid var(--line);white-space:nowrap}
.pw-header .pulse-stamp{min-width:144px}.pw-header .pulse-metric{min-width:64px}.pw-header .pulse-metric b{font-size:17px}.pw-header .pulse-metric small,.pw-header .pulse-stamp small{font-size:10px;white-space:nowrap}
.pw-header .pulse-gold{display:grid;grid-template-columns:1fr 1fr;gap:5px 14px;position:relative;padding:0 18px 0 44px;border-left:0;border-right:1px solid var(--line);flex:none;width:350px;box-sizing:border-box;min-width:350px}
.pw-header .pulse-group-label{grid-column:1/-1}.pw-header .pulse-rate{display:flex;align-items:center;gap:6px}.pw-header .pulse-rate b{font-size:15px}.pw-header .pulse-rate small{font-size:10px}.pw-header .gold-change{font-size:10px}
.market-actions{display:flex;gap:10px;align-items:center;flex:none}.pw-header .market-actions a{display:flex;flex-direction:column;align-items:center;gap:3px;font-size:10px;padding:0;color:var(--acc)}.market-actions span{font-size:27px;line-height:30px}
.pw-header .pulse-deal{box-sizing:border-box;flex:0 0 250px;width:250px;min-width:250px;max-width:250px;margin:0;padding:8px;gap:7px}.pw-header .pulse-deal-name{max-width:135px;font-size:11px}.pw-header .pulse-deal .pulse-gain{margin-left:auto;font-size:12px}.pw-header .pulse-deal small{font-size:9px}.pw-header .pulse-deal.empty{height:52px;display:flex;flex-direction:column;align-items:flex-start;justify-content:center}
.pw-header .cat-finder{flex:0 0 194px;width:194px;min-width:194px;margin:0;border-left:1px solid var(--line);padding-left:18px;box-sizing:content-box}.pw-header .cat-finder input{width:194px;box-sizing:border-box;font-size:12px}.pw-header .cat-finder>svg{left:26px}.pw-header .cat-suggestions{width:360px;right:0;left:auto}
.pw-header .header-functional-bottom{display:flex;gap:16px;align-items:center;min-height:56px;border-top:1px solid var(--line);padding:10px 0;box-sizing:border-box;min-width:0}
.pw-header .finder{width:180px;flex:0 0 180px;position:relative;margin:0}.pw-header .finder input{width:100%;height:36px;padding:7px 10px 7px 40px;font-size:12px}.search-mark{position:absolute;left:11px;top:3px;font:24px system-ui;pointer-events:none;color:var(--acc)}
.pw-header .equipment-link{display:flex;align-items:center;gap:6px;font-size:12px;font-weight:700;flex:none;border-right:1px solid var(--line);padding-right:16px}.equipment-link strong{font-weight:700}.equipment-link img,.market-actions img{display:block;object-fit:contain;flex:none}.personal-sections{display:flex;align-items:center;gap:14px;min-width:0;flex:1;white-space:nowrap;scrollbar-width:thin}
.pw-header .personal-sections a,.pw-header .section-menu summary{font-size:12px;cursor:pointer;color:var(--mut)}.pw-header .section-menu summary:hover,.pw-header .section-menu[open] summary{color:var(--acc)}
.section-menu{position:relative;flex:none}.section-menu summary{list-style:none;padding:8px 0}.section-menu summary::-webkit-details-marker{display:none}.section-menu summary:after{content:'⌄';font-size:11px;margin-left:5px}
.section-menu nav{position:fixed;z-index:110;min-width:180px;max-width:320px;max-height:60vh;overflow:auto;padding:8px;background:var(--card);border:1px solid var(--line);border-radius:10px;box-shadow:var(--shadow)}
.pw-header .section-menu nav a{display:block;padding:9px;border-radius:6px;white-space:normal;color:var(--fg)}.section-menu nav a:hover{background:var(--accent-soft)}.section-menu nav .mut{display:block;padding:9px;font-size:12px}
.pw-header a.sections-settings{flex:none;font-size:23px;line-height:28px;padding:4px 8px;border:1px solid var(--line);border-radius:8px;color:var(--acc);margin-left:0}
/* Собственная шапка аккаунта и две строки в заданном пользователем порядке. */
.pw-header .header-account-panel{border-left:1px solid var(--line);padding:0 0 0 12px;display:flex;flex-direction:column;min-width:0;box-sizing:border-box}
.pw-header .account-summary{display:flex;align-items:center;gap:10px;margin:0;padding:9px 10px;border:0;border-bottom:1px solid var(--line);background:color-mix(in srgb,var(--header) 86%,var(--acc));width:100%;min-height:43px;box-sizing:border-box;font-size:12px;min-width:0}
.account-name{font-weight:700;color:var(--fg);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.account-head-divider{height:22px;border-left:1px solid var(--line);flex:none}.pw-header .account-summary .month-profit{display:flex;flex-direction:column;align-items:flex-end;gap:3px;margin:0 0 0 auto;font-size:12px;flex:none}.month-profit>small{font-size:8px;font-weight:400;color:var(--mut)}.account-profit-amount{display:flex;align-items:center;gap:4px}.pw-header .month-profit svg{width:15px;height:15px;flex:none}
.pw-header .account-exit{margin:0 0 0 auto;flex:none}.pw-header .account-exit button{display:flex;align-items:center;gap:5px;margin:0;padding:4px 0 4px 9px;border:0;border-left:1px solid var(--line);border-radius:0;background:none;font-size:10px}.account-exit svg{width:15px;height:15px}
.account-actions{display:flex;flex-direction:column;gap:0;min-width:0;padding:3px 0}.account-row{display:flex;align-items:stretch;gap:3px;min-width:0}.account-secondary{border-top:1px solid color-mix(in srgb,var(--line) 50%,transparent)}
.pw-header .account-row>:is(a,button,details,span){flex:1;min-width:0}.pw-header .account-row>:is(a,button),.pw-header .account-row>details>summary,.pw-header .account-row>.refresh-controls>button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;position:relative;box-sizing:border-box;width:100%;height:43px;min-height:43px;padding:4px 2px;margin:0;border:1px solid transparent;border-radius:6px;background:transparent;font-size:10px;line-height:1.1;text-align:center}
.pw-header .account-row>:is(a,button):hover,.pw-header .account-row>details>summary:hover,.pw-header .account-row>.refresh-controls>button:hover{background:var(--accent-soft);border-color:var(--line)}.pw-header .account-row svg{width:18px;height:18px;flex:none}.pw-header .account-row .action-label{display:inline;font-size:10px;white-space:nowrap}.pw-header .account-row summary{list-style:none}.pw-header .account-row summary::-webkit-details-marker{display:none}
.pw-header .account-row .heart-count,.pw-header .account-row .nav-report-count,.pw-header .collection-count{position:absolute;right:calc(50% - 24px);top:2px;bottom:auto;font-size:8px;min-width:11px;height:11px;line-height:11px;border:0;background:var(--header);padding:0 2px;margin:0;color:var(--mut)}.pw-header .sound-panel{margin:0}.pw-header .sound-popover{max-width:calc(100vw - 40px);right:0;left:auto;z-index:120}.pw-header .sound-popover a svg{display:none}.pw-header .account-row .guest-locked{font-size:9px;padding:5px;white-space:normal}
.pw-header .header-period{display:flex;flex:none;gap:6px;align-items:center;flex-direction:column}.header-period>small{font-size:9px;color:var(--mut);line-height:1}.pw-header .header-period .switch{display:flex;margin:0;white-space:nowrap;gap:3px}.pw-header .header-period .switch a,.pw-header .header-period .switch .off{font-size:10px;padding:3px 6px}
.pw-header .pulse-counters,.pw-header .pulse-gold{height:48px;align-content:center}.pw-header .pulse-metric{display:grid;grid-template-columns:28px auto;column-gap:6px;align-items:center}.pulse-metric .pulse-symbol{grid-row:1/3}.pulse-metric small{grid-column:2}.pw-header .pulse-stamp{position:relative;gap:7px}.pw-header .pulse-stamp .pulse-dot{position:absolute;left:22px;bottom:0;width:5px;height:5px;box-shadow:0 0 0 2px var(--header)}.pulse-symbol{display:block;object-fit:contain;flex:none}.pulse-gold-icon{position:absolute;left:0;top:50%;transform:translateY(-50%);object-fit:contain}.pw-header .pulse-gold small{margin-top:0}.pw-header .pulse-deal{min-height:52px;align-items:center}.pw-header .cat-finder{display:flex;align-items:center;height:48px}.pw-header .cat-finder input{height:42px}.pw-header .cat-finder>svg{top:50%;transform:translateY(-50%)}
.pw-header .search-mark{position:absolute;left:10px;top:50%;transform:translateY(-50%);display:flex;align-items:center;pointer-events:none}.search-mark img{display:block;object-fit:contain}
.pw-header .sound-popover .action-label{display:inline!important}
/* Активный раздел и лучшая связка подсвечены цветом оформления, без подложки. */
header.pw-header{--header-glow:0 0 6px color-mix(in srgb,var(--acc) 75%,transparent),0 0 14px color-mix(in srgb,var(--acc) 40%,transparent)}
header.pw-header a[aria-current="page"],header.pw-header .switch a.on,header.pw-header .section-menu:has(a[aria-current="page"])>summary,header.pw-header .sound-panel[open]>summary,body:has(.hidden-items-dialog[open]) header.pw-header #hidden-items-open,body:has(#collection-dialog[open]) header.pw-header #collection-open{background:transparent!important;border-color:transparent!important;box-shadow:none;color:var(--acc);text-shadow:var(--header-glow);animation:none}
header.pw-header a[aria-current="page"] :is(img,svg),header.pw-header .sound-panel[open]>summary svg,body:has(.hidden-items-dialog[open]) header.pw-header #hidden-items-open svg,body:has(#collection-dialog[open]) header.pw-header #collection-open svg{filter:drop-shadow(0 0 5px color-mix(in srgb,var(--acc) 80%,transparent))}
header.pw-header a.pulse-deal{background:transparent!important;box-shadow:none;text-shadow:var(--header-glow)}
header.pw-header a.pulse-deal img{filter:drop-shadow(0 0 5px color-mix(in srgb,var(--acc) 80%,transparent));border-color:transparent}
header.pw-header .pulse-deal-name{padding:4px;margin:-4px}
.pw-header .header-cat-suggestions{position:fixed;right:auto;z-index:130;max-width:calc(100vw - 24px);font-size:13px}
.section-editor{max-width:1100px;margin:25px auto}.section-editor h1{font:30px Georgia,serif}.section-editor p{color:var(--mut);line-height:1.6}.section-editor table{width:100%;border-collapse:collapse}.section-editor td,.section-editor th{padding:12px;white-space:normal}.section-editor th:nth-child(2),.section-editor td:nth-child(2){width:100px;text-align:center}.section-editor th:last-child,.section-editor td:last-child{width:100px;text-align:right}.section-editor [data-children]>td{padding:0 0 12px 25px;background:var(--card)}.section-editor [data-expand]{background:transparent;border:0;padding-left:0;font-weight:600}.section-editor [data-move]{padding:6px 10px;margin:0 3px}.section-editor input[type=checkbox]{width:18px;height:18px;accent-color:var(--acc)}.section-save{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:22px 0}.section-save button:first-child{background:var(--acc);color:var(--bg)}
@media(max-width:2100px){.pw-header .header-period>small{display:none}.pw-header .account-row .action-label{font-size:8px}.pw-header .account-summary{gap:6px;padding:7px}.pw-header .account-summary .month-profit{font-size:11px}.pw-header .account-exit svg{display:none}}
@media(max-width:1400px){header.pw-header{padding:0 12px}.pw-header .header-functional{padding-right:12px}.pw-header .header-functional-top{gap:12px}.pw-header a.pw-brand{font-size:17px;gap:6px}.pw-brand img{width:38px;height:38px}.pw-header .header-account-panel{padding-left:8px}.pw-header .header-functional-bottom{gap:10px}.personal-sections{gap:10px}.pw-header .finder{width:150px;flex-basis:150px}.pw-header .account-summary .month-profit{font-size:10px}.pw-header .month-profit svg{display:none}.pw-header .account-row .action-label{font-size:7px;white-space:normal}.pw-header .account-row svg{width:16px;height:16px}.pw-header .account-summary{font-size:10px}}
@media(max-width:1100px){.pw-header .header-functional-bottom{flex-wrap:wrap}.personal-sections{order:2;flex-basis:100%}.pw-header .header-period{order:3;margin-left:auto}.pw-header a.sections-settings{order:4}.pw-header .account-summary{flex-wrap:wrap}.pw-header .account-summary .month-profit{order:3;width:100%;align-items:flex-start}.account-row{flex-wrap:wrap}.pw-header .account-row>:is(a,button,details,span){flex-basis:30%}.pw-header .account-row .action-label{font-size:8px}}
@media(max-width:900px){header.pw-header{position:relative}.pw-header .header-functional-top{flex-wrap:wrap;padding:12px 0;gap:8px}.header-flow{flex-basis:100%;height:42px}.section-editor .small{display:none}}
