/* LL AI v66.73 — final Settings + Chat/Work alignment layer.
   Loaded last. It intentionally hides older settings surfaces instead of styling them. */
:root{
  --ll46-bg:#000;
  --ll46-card:#181818;
  --ll46-card-hover:#222;
  --ll46-line:rgba(255,255,255,.075);
  --ll46-muted:#9b9b9b;
  --ll46-muted2:#747474;
  --ll46-text:#f5f5f5;
}

/* The older chooser had two 102px minimum-width buttons inside a 200px box.
   That overflow is what produced the broken Work segment in the screenshots. */
#ll6642WorkSwitch{display:none!important}
#ll6646WorkSwitch{
  position:fixed;top:17px;left:calc(50% + var(--ll46-main-shift, 0px));transform:translateX(-50%);z-index:720;
  width:232px;height:50px;padding:4px;box-sizing:border-box;
  display:grid;grid-template-columns:1fr 1fr;gap:3px;
  border:1px solid rgba(255,255,255,.09);border-radius:999px;
  background:#303030;box-shadow:0 10px 34px rgba(0,0,0,.28),inset 0 1px 0 rgba(255,255,255,.035);
  transition:opacity .17s ease,transform .2s cubic-bezier(.2,.8,.2,1),left .22s cubic-bezier(.2,.8,.2,1)
}
#ll6646WorkSwitch[hidden]{display:none!important}
#ll6646WorkSwitch button{
  width:100%;min-width:0;height:40px;margin:0;padding:0 12px;box-sizing:border-box;
  border:0;border-radius:999px;background:transparent;color:#f1f1f1;
  font:560 14px/1 system-ui,-apple-system,Segoe UI,sans-serif;letter-spacing:-.01em;
  cursor:pointer;transition:background .16s ease,color .16s ease,transform .11s ease,box-shadow .16s ease
}
#ll6646WorkSwitch button.active{background:#101010;color:#fff;box-shadow:0 1px 0 rgba(255,255,255,.04),0 5px 18px rgba(0,0,0,.18)}
#ll6646WorkSwitch button:active{transform:scale(.97)}
#ll6646WorkSwitch button:focus-visible{outline:2px solid var(--accent,#fff);outline-offset:2px}


body.ll46SettingsOpen{overflow:hidden!important}
body.ll46SettingsOpen #ll6646WorkSwitch{display:none!important}

/* Never show legacy settings pages. v66.73 owns the complete Settings route. */
#ll6637Settings,#ll6624Settings,.ll6626Settings{display:none!important}

#ll6646Settings{
  position:fixed;inset:0;z-index:26000;background:var(--ll46-bg);color:var(--ll46-text);
  opacity:0;transform:translateY(4px);transition:opacity .16s ease,transform .2s cubic-bezier(.2,.8,.2,1)
}
#ll6646Settings[hidden]{display:none!important}
#ll6646Settings.isOpen{opacity:1;transform:none}
.ll46SettingsTop{
  height:106px;box-sizing:border-box;padding:43px 20px 10px;
  position:sticky;top:0;z-index:4;display:grid;grid-template-columns:56px 1fr 56px;align-items:start;
  background:linear-gradient(180deg,#000 82%,rgba(0,0,0,.96));
}
.ll46SettingsTop h1{margin:10px 0 0;text-align:center;font-size:22px;line-height:1;font-weight:680;letter-spacing:-.025em}
.ll46CircleBtn{
  width:52px;height:52px;border:1px solid rgba(255,255,255,.1);border-radius:50%;background:#242424;color:#fff;
  display:grid;place-items:center;cursor:pointer;transition:background .13s ease,transform .1s ease
}
.ll46CircleBtn:hover{background:#2d2d2d}.ll46CircleBtn:active{transform:scale(.96)}
.ll46CircleBtn svg,.ll46Icon svg,.ll46Chevron svg,.ll46ActionIcon svg,.ll46EmptyIcon svg{fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}
.ll46CircleBtn svg{width:24px;height:24px}
.ll46SettingsScroll{height:calc(100dvh - 106px);overflow:auto;overscroll-behavior:contain;scrollbar-width:none;padding:6px 18px 82px;box-sizing:border-box}
.ll46SettingsScroll::-webkit-scrollbar{display:none}
.ll46SettingsStack{width:min(710px,100%);margin:0 auto}
.ll46Profile{
  width:100%;border:0;background:transparent;color:#fff;display:grid;grid-template-columns:68px minmax(0,1fr) 28px;
  align-items:center;gap:14px;padding:6px 8px 24px;text-align:left;cursor:pointer
}
.ll46Avatar{width:62px;height:62px;border-radius:50%;display:grid;place-items:center;font-size:24px;font-weight:560;background:linear-gradient(145deg,color-mix(in srgb,var(--accent,#6d78ff) 76%,#fff 10%),color-mix(in srgb,var(--accent,#6d78ff) 70%,#11b68a 18%));box-shadow:inset 0 0 0 1px rgba(255,255,255,.15)}
.ll46ProfileCopy{min-width:0;display:grid;gap:4px}.ll46ProfileCopy b{font-size:18px;font-weight:650;letter-spacing:-.02em}.ll46ProfileCopy small{color:#8f8f8f;font-size:12.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ll46Profile .ll46Chevron{color:#777}
.ll46Group{margin:0 0 24px}.ll46Group>h2{margin:0 0 9px;padding:0 17px;color:#9d9d9d;font-size:13.5px;font-weight:540}
.ll46Card{overflow:hidden;border:1px solid var(--ll46-line);border-radius:23px;background:var(--ll46-card);box-shadow:inset 0 1px 0 rgba(255,255,255,.018)}
.ll46Row{
  width:100%;min-height:68px;border:0;border-bottom:1px solid var(--ll46-line);background:transparent;color:var(--ll46-text);
  display:grid;grid-template-columns:50px minmax(0,1fr) auto 22px;align-items:center;gap:6px;padding:8px 16px;text-align:left;cursor:pointer;
  transition:background .13s ease,transform .1s ease
}
.ll46Row:last-child{border-bottom:0}.ll46Row:hover{background:var(--ll46-card-hover)}.ll46Row:active{background:#272727;transform:scale(.998)}
.ll46Icon{width:42px;height:42px;display:grid;place-items:center}.ll46Icon svg{width:23px;height:23px}.ll46RowCopy{min-width:0;display:grid;gap:2px}.ll46RowCopy b{font-size:15.5px;font-weight:570;letter-spacing:-.01em}.ll46RowCopy small{font-size:12.2px;color:#909090;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ll46RowValue{color:#aaa;font-size:13.5px;white-space:nowrap;padding-left:8px}.ll46Chevron{display:grid;place-items:center;color:#777}.ll46Chevron svg{width:17px;height:17px}
.ll46Logout{width:100%;min-height:58px;border:1px solid var(--ll46-line);border-radius:22px;background:var(--ll46-card);color:#ff8791;display:flex;align-items:center;gap:13px;padding:0 20px;font:560 15px system-ui;cursor:pointer}.ll46Logout:hover{background:#211719}

/* sub-pages stay inside the same settings surface */
.ll46Sub{width:min(710px,100%);margin:0 auto}.ll46SubIntro{padding:4px 3px 18px}.ll46SubIntro h2{margin:0 0 6px;font-size:24px;letter-spacing:-.035em}.ll46SubIntro p{margin:0;color:#8f8f8f;font-size:13px;line-height:1.55;max-width:640px}
.ll46Section{margin:0 0 18px}.ll46SectionTitle{margin:0 0 8px;padding:0 14px;color:#9b9b9b;font-size:13px;font-weight:560}
.ll46Panel{border:1px solid var(--ll46-line);border-radius:21px;background:#181818;overflow:hidden;box-shadow:inset 0 1px 0 rgba(255,255,255,.02)}
.ll46Field{display:grid;gap:7px;padding:14px 16px;border-bottom:1px solid var(--ll46-line)}.ll46Field:last-child{border-bottom:0}.ll46Field>span,.ll46Label{font-size:12.5px;color:#b4b4b4;font-weight:560}
.ll46Field input[type="text"],.ll46Field textarea,.ll46Field select,.ll46Search input{
  width:100%;box-sizing:border-box;border:1px solid rgba(255,255,255,.11);border-radius:13px;background:#111;color:#fff;outline:0;font:inherit
}
.ll46Field input[type="text"],.ll46Field select{height:44px;padding:0 12px}.ll46Field textarea{min-height:100px;resize:vertical;padding:11px 12px;line-height:1.45}
.ll46Field input:focus,.ll46Field textarea:focus,.ll46Field select:focus,.ll46Search input:focus{border-color:color-mix(in srgb,var(--accent,#7280ff) 68%,#fff 14%);box-shadow:0 0 0 3px color-mix(in srgb,var(--accent,#7280ff) 18%,transparent)}
.ll46Grid2{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:12px 16px 16px}.ll46Grid2 .ll46Field{padding:0;border:0}
.ll46ToggleRow{min-height:66px;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;padding:10px 16px;border-bottom:1px solid var(--ll46-line)}.ll46ToggleRow:last-child{border-bottom:0}.ll46ToggleCopy{display:grid;gap:3px}.ll46ToggleCopy b{font-size:14.5px}.ll46ToggleCopy small{font-size:12px;color:#8c8c8c;line-height:1.35}.ll46Toggle{position:relative;width:46px;height:28px;display:inline-block}.ll46Toggle input{position:absolute;opacity:0}.ll46Toggle i{position:absolute;inset:0;border-radius:999px;background:#3c3c3c;transition:background .16s ease}.ll46Toggle i::after{content:"";position:absolute;width:22px;height:22px;left:3px;top:3px;border-radius:50%;background:#dedede;transition:transform .17s cubic-bezier(.2,.8,.2,1),background .16s ease}.ll46Toggle input:checked+i{background:var(--accent,#6e7aff)}.ll46Toggle input:checked+i::after{transform:translateX(18px);background:#fff}
.ll46ButtonRow{display:flex;gap:8px;flex-wrap:wrap;padding:14px 16px}.ll46Btn{min-height:40px;border:1px solid rgba(255,255,255,.12);border-radius:12px;background:#252525;color:#fff;padding:0 14px;font:560 13px system-ui;cursor:pointer}.ll46Btn:hover{background:#303030}.ll46Btn.primary{background:#f1f1f1;color:#111;border-color:#f1f1f1}.ll46Btn.danger{color:#ff8791}.ll46Btn:disabled{opacity:.5;cursor:default}
.ll46Notice{margin-top:10px;border:1px solid var(--ll46-line);border-radius:15px;background:#262626;padding:12px 14px;color:#8d8d8d;font-size:12px;line-height:1.5}

/* memory + archives */
.ll46MemoryList,.ll46ArchiveList{overflow:hidden;border:1px solid var(--ll46-line);border-radius:21px;background:#181818}.ll46MemoryItem{min-height:58px;border-bottom:1px solid var(--ll46-line);display:grid;grid-template-columns:minmax(0,1fr) 42px;align-items:center;gap:8px;padding:7px 8px 7px 16px}.ll46MemoryItem:last-child{border-bottom:0}.ll46MemoryItem span{font-size:13px;line-height:1.4;color:#ddd}.ll46MemoryItem button,.ll46ArchiveActions button{width:38px;height:38px;border:0;border-radius:50%;display:grid;place-items:center;background:transparent;color:#aaa;cursor:pointer}.ll46MemoryItem button:hover,.ll46ArchiveActions button:hover{background:#292929;color:#fff}.ll46Search{display:flex;align-items:center;gap:9px;height:50px;margin-bottom:12px;padding:0 13px;border:1px solid var(--ll46-line);border-radius:17px;background:#181818;color:#888}.ll46Search svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8}.ll46Search input{height:46px;border:0;background:transparent;padding:0;color:#fff}.ll46ArchiveRow{min-height:72px;border-bottom:1px solid var(--ll46-line);display:grid;grid-template-columns:minmax(0,1fr) auto}.ll46ArchiveRow:last-child{border-bottom:0}.ll46ArchiveMain{border:0;background:transparent;color:#fff;text-align:left;padding:11px 8px 11px 16px;min-width:0;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center;cursor:pointer}.ll46ArchiveMain:hover{background:#1e1e1e}.ll46ArchiveMain span{min-width:0;display:grid;gap:4px}.ll46ArchiveMain b{font-size:14.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ll46ArchiveMain small{font-size:11.8px;color:#8c8c8c;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ll46ArchiveMain time{font-size:11px;color:#747474;white-space:nowrap}.ll46ArchiveActions{display:flex;align-items:center;gap:2px;padding-right:9px}.ll46ArchiveActions svg{width:20px;height:20px}.ll46ArchiveActions .danger:hover{background:rgba(255,80,95,.12);color:#ff7b86}.ll46Empty{min-height:230px;display:grid;place-items:center;align-content:center;gap:8px;text-align:center;color:#888}.ll46EmptyIcon{width:54px;height:54px;border-radius:17px;background:#1b1b1b;display:grid;place-items:center;color:#aaa}.ll46EmptyIcon svg{width:25px;height:25px}.ll46Empty b{color:#e7e7e7;font-size:16px}.ll46Empty small{font-size:12px}

/* diagnostics/support */
.ll46Code{margin:0;padding:14px 16px;max-height:260px;overflow:auto;background:#101010;color:#c9c9c9;font:11.5px/1.5 ui-monospace,SFMono-Regular,Consolas,monospace;white-space:pre-wrap;word-break:break-word}
.ll46About{text-align:center;padding:54px 18px}.ll46AboutMark{width:76px;height:76px;margin:0 auto 16px;border-radius:23px;display:grid;place-items:center;background:#181818;border:1px solid var(--ll46-line);font-size:27px;font-weight:720}.ll46About h2{margin:0 0 6px;font-size:25px}.ll46About p{margin:0 0 12px;color:#999}.ll46About small{max-width:540px;margin:auto;display:block;color:#7d7d7d;line-height:1.5}

html[data-ll46-contrast="increased"] #ll6646Settings{--ll46-line:rgba(255,255,255,.2);--ll46-muted:#c2c2c2;--ll46-card:#3b3b3b}
html[data-ll46-contrast="medium"] #ll6646Settings{--ll46-line:rgba(255,255,255,.12)}
html[data-ll46-reduce-motion="1"] *,html[data-ll46-reduce-motion="1"] *::before,html[data-ll46-reduce-motion="1"] *::after{animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important;scroll-behavior:auto!important}
html[data-ll46-hide-starters="1"] #welcome .starterGrid,html[data-ll46-hide-starters="1"] #welcome .ll6631StarterGrid{display:none!important}

@media(max-width:800px){
  #ll6646WorkSwitch{top:14px;width:196px;height:46px}
  #ll6646WorkSwitch button{height:36px;font-size:13.5px}
}
@media(max-width:700px){
  .ll46SettingsTop{height:94px;padding:29px 12px 8px}.ll46SettingsScroll{height:calc(100dvh - 94px);padding:5px 12px 70px}
  .ll46SettingsStack,.ll46Sub{width:100%}.ll46Profile{grid-template-columns:60px minmax(0,1fr) 24px;padding-inline:4px}.ll46Avatar{width:54px;height:54px}
  .ll46Card{border-radius:20px}.ll46Row{min-height:65px;grid-template-columns:44px minmax(0,1fr) auto 20px;padding:8px 12px}.ll46Icon{width:38px;height:38px}.ll46Icon svg{width:22px;height:22px}.ll46RowCopy small{font-size:11.6px}.ll46Grid2{grid-template-columns:1fr}.ll46ArchiveMain time{display:none}
}
@media(prefers-reduced-motion:reduce){#ll6646Settings,#ll6646WorkSwitch,#ll6646WorkSwitch button,.ll46Row,.ll46Toggle i,.ll46Toggle i::after{transition:none!important}}

/* v66.73 visual tune */
.ll46Card,.ll46Panel,.ll46MemoryList,.ll46ArchiveList,.ll46Search{box-shadow:0 1px 0 rgba(255,255,255,.02) inset}
.ll46Row{min-height:66px}.ll46Row:hover{background:#202020}.ll46Row:active{background:#242424}.ll46Icon{color:#d9d9d9}.ll46Profile{border-radius:22px;transition:background .14s ease}.ll46Profile:hover{background:#111}.ll46Btn{border-radius:999px;padding-inline:16px;background:#1d1d1d}.ll46Btn:hover{background:#292929}.ll46Logout{background:#181818}.ll46SettingsTop h1{letter-spacing:-.03em}
