.profile-only{display:none}
body.view-profile main>:not(.profile-only){display:none!important}
body.view-profile .profile-only{display:block}
body.view-profile main{width:min(1180px,calc(100% - 28px));margin-top:18px}
body.view-profile .topbar .eyebrow{color:#1769aa}
.bottom-nav{grid-template-columns:repeat(5,1fr)}
.profile-page{color:#1d1d1f}
.profile-hero{position:relative;overflow:hidden;padding:clamp(24px,5vw,48px);background:linear-gradient(145deg,#fff 0%,#f7fbff 62%,#eef6ff 100%)}
.profile-hero:after{content:"";position:absolute;width:260px;height:260px;border-radius:50%;right:-95px;top:-120px;background:radial-gradient(circle,rgba(45,126,196,.17),rgba(45,126,196,0) 70%);pointer-events:none}
.profile-hero-grid{position:relative;z-index:1;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:28px;align-items:end}
.profile-hero h2{max-width:none;font-size:clamp(2rem,5vw,3.35rem);letter-spacing:-.045em}
.profile-intro{max-width:710px;color:#5f6065;font-size:1rem;line-height:1.55;margin-top:12px}
.profile-save-state{display:inline-flex;align-items:center;gap:8px;margin-top:20px;padding:8px 12px;border-radius:999px;background:rgba(255,255,255,.76);border:1px solid rgba(0,0,0,.07);font-size:.78rem;font-weight:750;color:#5f6065}
.profile-save-dot{width:8px;height:8px;border-radius:50%;background:#2e8b68;box-shadow:0 0 0 4px rgba(46,139,104,.12)}
.profile-save-state.saving .profile-save-dot{background:#d99016;box-shadow:0 0 0 4px rgba(217,144,22,.12)}
.profile-save-state.error .profile-save-dot{background:#d84b45;box-shadow:0 0 0 4px rgba(216,75,69,.12)}
.profile-completion{width:142px;height:142px;border-radius:50%;display:grid;place-content:center;text-align:center;background:conic-gradient(#1769aa var(--profile-completion,90%),#e7edf2 0);position:relative;box-shadow:0 14px 35px rgba(23,105,170,.12)}
.profile-completion:before{content:"";position:absolute;inset:10px;border-radius:50%;background:#fff}
.profile-completion strong,.profile-completion span{position:relative;z-index:1}
.profile-completion strong{font-size:2rem;letter-spacing:-.04em}
.profile-completion span{font-size:.72rem;color:#6e6e73;font-weight:750;text-transform:uppercase;letter-spacing:.08em}
.profile-knowledge{margin-top:18px;padding:22px 24px;background:#172a3b;color:#fff;border:0;box-shadow:0 14px 38px rgba(18,39,56,.14)}
.profile-knowledge-head{display:flex;justify-content:space-between;align-items:center;gap:16px}
.profile-knowledge h3{font-size:1.15rem}
.profile-knowledge p{color:#b9c7d2;margin-top:6px;line-height:1.45}
.profile-rule-count{white-space:nowrap;padding:7px 11px;border-radius:999px;background:rgba(255,255,255,.11);font-size:.75rem;font-weight:800}
.knowledge-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin-top:18px}
.knowledge-rule{display:flex;gap:9px;align-items:flex-start;min-height:66px;padding:12px;border-radius:14px;background:rgba(255,255,255,.07);font-size:.79rem;line-height:1.35;color:#eef5fa}
.knowledge-rule span:first-child{display:grid;place-items:center;flex:0 0 20px;width:20px;height:20px;border-radius:50%;background:#51a77e;color:#fff;font-size:.68rem;font-weight:900}
.profile-layout{display:grid;grid-template-columns:230px minmax(0,1fr);gap:22px;margin-top:22px;align-items:start}
.profile-sidebar{position:sticky;top:102px;display:grid;gap:12px}
.profile-search{position:relative}
.profile-search input{width:100%;padding:11px 13px 11px 36px;border:1px solid rgba(0,0,0,.09);border-radius:13px;background:#fff;font-size:.85rem;outline:none}
.profile-search:before{content:"⌕";position:absolute;left:13px;top:9px;color:#777;font-size:1.05rem}
.profile-search input:focus{border-color:#75a8d0;box-shadow:0 0 0 3px rgba(23,105,170,.1)}
.profile-side-nav{padding:7px;background:#fff;border:1px solid rgba(0,0,0,.06);border-radius:18px;box-shadow:0 8px 28px rgba(0,0,0,.035)}
.profile-side-nav button{width:100%;border:0;background:transparent;border-radius:11px;padding:10px 11px;text-align:left;color:#555;font-size:.8rem;font-weight:700;cursor:pointer}
.profile-side-nav button:hover,.profile-side-nav button.active{background:#edf5fb;color:#1769aa}
.profile-side-note{padding:14px;color:#6e6e73;font-size:.75rem;line-height:1.45}
.profile-content{display:grid;gap:18px}
.profile-section{padding:0;overflow:hidden;scroll-margin-top:98px}
.profile-section-head{padding:22px 24px 16px}
.profile-section-head h3{font-size:1.25rem;letter-spacing:-.015em}
.profile-section-head p{color:#6e6e73;font-size:.84rem;line-height:1.45;margin-top:6px}
.profile-setting-list{border-top:1px solid #ececf0}
.profile-setting-row{display:grid;grid-template-columns:minmax(190px,1fr) minmax(230px,1.1fr);gap:24px;align-items:center;padding:16px 24px;border-top:1px solid #ececf0}
.profile-setting-row:first-child{border-top:0}
.profile-setting-copy strong{display:block;font-size:.9rem}
.profile-setting-copy small{display:block;color:#777;font-size:.76rem;line-height:1.4;margin-top:4px}
.profile-control{justify-self:stretch;display:flex;justify-content:flex-end;align-items:center;gap:9px;min-width:0}
.profile-control input[type="text"],.profile-control input[type="time"],.profile-control input[type="number"],.profile-control select,.profile-control textarea{width:min(100%,360px);border:1px solid #d8d8dc;border-radius:11px;padding:10px 11px;background:#fafafa;color:#1d1d1f;text-align:left;outline:none;font-size:.84rem}
.profile-control textarea{min-height:76px;resize:vertical;line-height:1.45}
.profile-control input:focus,.profile-control select:focus,.profile-control textarea:focus{border-color:#6da2ca;box-shadow:0 0 0 3px rgba(23,105,170,.09);background:#fff}
.profile-control .time-range{display:flex;align-items:center;gap:7px;color:#777;font-size:.75rem}
.profile-switch{position:relative;width:46px;height:27px;flex:0 0 auto}
.profile-switch input{position:absolute;opacity:0;pointer-events:none}
.profile-switch span{position:absolute;inset:0;border-radius:999px;background:#d8d9dd;transition:.18s;cursor:pointer}
.profile-switch span:before{content:"";position:absolute;width:23px;height:23px;left:2px;top:2px;border-radius:50%;background:#fff;box-shadow:0 2px 5px rgba(0,0,0,.18);transition:.18s}
.profile-switch input:checked+span{background:#2d8b68}
.profile-switch input:checked+span:before{transform:translateX(19px)}
.profile-switch input:focus-visible+span{outline:3px solid rgba(23,105,170,.22);outline-offset:2px}
.profile-value-note{color:#6e6e73;font-size:.77rem;text-align:right}
.profile-future{display:inline-flex;align-items:center;padding:5px 8px;border-radius:999px;background:#f0f0f3;color:#777;font-size:.68rem;font-weight:800;text-transform:uppercase;letter-spacing:.05em}
.profile-action{border:0;border-radius:10px;padding:9px 12px;background:#edf5fb;color:#1769aa;font-size:.8rem;font-weight:800;cursor:pointer}
.profile-action:hover{background:#e2f0fa}
.profile-action.destructive{background:#fff0ef;color:#a8322d}
.profile-action:disabled{cursor:not-allowed;background:#f2f2f5;color:#929397}
.profile-action-row{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}
.profile-warning{margin:0 24px 20px;padding:13px 14px;border-radius:13px;background:#fff8e8;color:#7b570d;font-size:.78rem;line-height:1.45}
.profile-empty-search{padding:38px;text-align:center;color:#6e6e73}
.profile-history-list{display:grid;gap:9px;max-height:360px;overflow:auto;margin-top:16px}
.profile-history-item{display:grid;grid-template-columns:1fr auto;gap:12px;padding:13px;border-radius:13px;background:#f6f6f8}
.profile-history-item strong{font-size:.84rem}.profile-history-item small{display:block;color:#777;margin-top:4px}
.profile-dialog-body{padding:22px}
.profile-dialog-body .dialog-head{margin-bottom:10px}
.profile-restore-input{display:none}
@media(max-width:900px){.knowledge-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.profile-layout{grid-template-columns:1fr}.profile-sidebar{position:static}.profile-side-nav{display:flex;overflow-x:auto;padding:6px}.profile-side-nav button{width:auto;white-space:nowrap}.profile-side-note{display:none}}
@media(max-width:700px){.profile-hero-grid{grid-template-columns:1fr}.profile-completion{width:116px;height:116px}.profile-knowledge{padding:19px}.knowledge-grid{grid-template-columns:1fr}.profile-setting-row{grid-template-columns:1fr;gap:10px;padding:15px 18px}.profile-control{justify-content:flex-start}.profile-control input[type="text"],.profile-control input[type="time"],.profile-control input[type="number"],.profile-control select,.profile-control textarea{width:100%;max-width:none}.profile-value-note{text-align:left}.profile-section-head{padding:19px 18px 14px}.profile-warning{margin:0 18px 18px}.bottom-nav button{font-size:.72rem;padding-left:2px;padding-right:2px}}


.profile-multi-select{width:min(100%,420px);border:1px solid #d8d8dc;border-radius:12px;padding:10px 12px;background:#fafafa;color:#1d1d1f;display:flex;align-items:center;justify-content:space-between;gap:14px;text-align:left;cursor:pointer}
.profile-multi-select:hover{background:#fff;border-color:#9ab9d1}
.profile-multi-select>span:first-child{display:flex;flex-direction:column;gap:3px;min-width:0}
.profile-multi-select strong{font-size:.84rem;line-height:1.25}
.profile-multi-select small{font-size:.7rem;color:#6e6e73;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.profile-multi-select>span:last-child{font-size:1.4rem;color:#1769aa}
.profile-selection-dialog{width:min(620px,calc(100vw - 36px));max-height:min(760px,calc(100vh - 48px));display:flex;flex-direction:column}
.profile-selection-search{width:100%;border:1px solid #d8d8dc;border-radius:11px;padding:11px 12px;background:#fafafa;margin:4px 0 12px;font-size:.88rem}
.profile-selection-list{overflow:auto;min-height:160px;max-height:480px;border:1px solid #ececf0;border-radius:12px;background:#fff}
.profile-selection-item{display:flex;align-items:flex-start;gap:11px;padding:12px 14px;border-top:1px solid #ececf0;cursor:pointer}
.profile-selection-item:first-child{border-top:0}
.profile-selection-item:hover{background:#f7fafc}
.profile-selection-item input{margin-top:3px;accent-color:#278f6b}
.profile-selection-item span{display:flex;flex-direction:column;gap:2px}
.profile-selection-item strong{font-size:.84rem}
.profile-selection-item small{color:#6e6e73;font-size:.73rem}
.profile-save-floating{display:none;position:fixed;right:22px;bottom:78px;z-index:20;align-items:center;gap:8px;padding:9px 12px;border:1px solid rgba(0,0,0,.08);border-radius:999px;background:rgba(255,255,255,.94);box-shadow:0 8px 28px rgba(0,0,0,.12);backdrop-filter:blur(16px);font-size:.74rem;font-weight:700;color:#5e5e63}
.view-profile .profile-save-floating{display:flex}
.profile-save-floating.saving{color:#1769aa}
.profile-save-floating.error{color:#a8322d}
@media(max-width:700px){.profile-multi-select{width:100%;max-width:none}.profile-save-floating{left:16px;right:16px;bottom:70px;justify-content:center}.profile-selection-dialog{width:calc(100vw - 24px);max-height:calc(100vh - 32px)}}
