/* XMM settings: refined panel, tactile buttons, smooth open/close. Loaded last. */
#settings{--sx-ac:#f2f2f3;--sx-ez:cubic-bezier(.22,1,.3,1)}
html body #settings .sheet.pro{
  width:min(820px,calc(100% - 24px))!important;height:min(640px,88dvh)!important;border-radius:26px!important;
  background:linear-gradient(180deg,#1d1d20,#161618)!important;
  box-shadow:0 0 0 1px rgba(255,255,255,.08),0 40px 100px rgba(0,0,0,.6),inset 0 1px 0 rgba(255,255,255,.06)!important}
html body #settings .pro .sheet-h{padding:20px 24px!important;border-bottom:1px solid rgba(255,255,255,.07)!important}
html body #settings .sheet-h h3{font-size:19px;font-weight:650;letter-spacing:-.01em}
/* tabs */
html body #settings .stabs{background:rgba(255,255,255,.02);gap:4px!important;position:relative}
html body #settings .stabs button{height:40px!important;border-radius:12px!important;font-weight:550!important;color:#9b9ba2!important;
  transition:background .2s,color .2s,transform .18s var(--sx-ez)!important}
html body #settings .stabs button:hover{background:rgba(255,255,255,.06)!important;color:#fff!important}
html body #settings .stabs button:active{transform:scale(.96)}
html body #settings .stabs button.on{background:rgba(255,255,255,.1)!important;color:#fff!important;box-shadow:inset 0 0 0 1px rgba(255,255,255,.16)}
@media(min-width:640px){html body #settings .stabs{width:210px!important;padding:16px 12px!important}
  html body #settings .stabs button.on{padding-left:18px!important}
  html body #settings .stabs button.on::before{content:"";position:absolute;left:0;top:10px;bottom:10px;width:3px;border-radius:3px;background:var(--sx-ac)}
  html body #settings .stabs button{position:relative}}
/* panes */
html body #settings .spanes{padding:26px 28px!important}
html body #settings .pane{max-width:540px}
html body #settings .pane.on{animation:sxIn .35s var(--sx-ez)}
@keyframes sxIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
html body #settings .pf{margin-bottom:22px;padding:16px;border-radius:18px;background:rgba(255,255,255,.035);box-shadow:inset 0 0 0 1px rgba(255,255,255,.06)}
html body #settings .pf>label{font-size:12px!important;text-transform:uppercase;letter-spacing:.08em;color:#9b9ba2!important;margin-bottom:10px!important}
html body #settings .pf .ph,html body #settings .ph{color:#85858c}
html body #settings .field{border-radius:12px!important;background:rgba(0,0,0,.28)!important;box-shadow:inset 0 0 0 1px rgba(255,255,255,.08)!important;margin:0!important}
html body #settings .field:focus{box-shadow:inset 0 0 0 1px var(--sx-ac),0 0 0 4px rgba(255,255,255,.08)!important}
/* switch rows */
html body #settings .sk{padding:16px 4px!important;border-bottom:1px solid rgba(255,255,255,.06)!important;transition:background .2s}
html body #settings .sk:last-child{border-bottom:0!important}
html body #settings .sk b{font-size:14.5px}
html body #settings .sw{width:48px!important;height:28px!important;background:#38383d!important;transition:background .25s,transform .15s!important}
html body #settings .sw:after{top:3px!important;left:3px!important;width:22px!important;height:22px!important;box-shadow:0 2px 6px rgba(0,0,0,.4);
  transition:transform .35s cubic-bezier(.3,1.5,.5,1),width .2s!important}
html body #settings .sw:active:after{width:27px!important}
html body #settings .sw.on{background:#e8e8ea!important}
html body #settings .sw.on:after{background:#161618!important}
html body #settings .sw.on:after{transform:translateX(20px)!important}
html body #settings .sw.on:active:after{transform:translateX(15px)!important}
/* segmented + range from personalization */
html body #settings .lq-seg{border-radius:12px!important}
/* buttons inside sheet */
html body #settings .pane .btn{height:46px!important;border-radius:14px!important;background:rgba(255,255,255,.07)!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.09)!important;transition:transform .18s var(--sx-ez),background .2s!important}
html body #settings .pane .btn:hover{background:rgba(255,255,255,.12)!important}
html body #settings .pane .btn.danger{color:#ff7b7b!important;background:rgba(255,90,90,.1)!important;box-shadow:inset 0 0 0 1px rgba(255,90,90,.25)!important}
/* global press feedback */
html body :is(.btn,.icon-btn,.circle,.send,.mode,.chip,.lq-row,.stabs button,.lq-x){
  transition:transform .2s var(--sx-ez),background .2s,box-shadow .2s!important;will-change:transform}
html body :is(.btn,.icon-btn,.circle,.send,.mode,.chip,.lq-row):active{transform:scale(.92)!important}
html body :is(.btn,.mode,.chip):hover{transform:translateY(-1px)}
/* close X: spin + press */
html body .lq-x{transition:opacity .25s,transform .35s cubic-bezier(.3,1.5,.5,1),background .2s!important}
html body .lq-x:hover{background:rgba(255,255,255,.24)!important;transform:rotate(90deg)}
html body .lq-x:active{transform:rotate(90deg) scale(.88)!important}
html body #settings [data-act=closeSettings]:hover svg{transform:rotate(90deg)}
html body #settings [data-act=closeSettings] svg{transition:transform .3s var(--sx-ez)}
/* backdrop */
html body #settings.modal{background:rgba(0,0,0,.55)!important;-webkit-backdrop-filter:blur(8px)!important;backdrop-filter:blur(8px)!important}
@media(max-width:820px){
  html body #settings .sheet.pro{width:calc(100% - 16px)!important;height:min(86dvh,680px)!important}
  html body #settings .spanes{padding:18px!important}}
@media(prefers-reduced-motion:reduce){html body *{transition-duration:.01ms!important;animation-duration:.01ms!important}}

/* stop old CSS keyframes from fighting the JS open/close animation */
html body #settings,html body #settings .sheet,html body #installGuide,html body #installGuide .sheet,html body #welcome,html body #welcome .sheet{animation:none!important}
html body .menu.pop,html body .vpop{animation:none!important}

/* neutral links/checkbox/focus in settings (no purple anywhere) */
html body #settings a{color:#e8e8ea!important;text-decoration-color:rgba(255,255,255,.4)}
html body #settings .ab-chk input:focus-visible+.bx{box-shadow:0 0 0 3px rgba(255,255,255,.3)!important}
html body #settings :focus-visible{outline-color:rgba(255,255,255,.55)!important}
html body #settings input[type=range]{accent-color:#e8e8ea}
html body #settings .lq-seg button.on{background:rgba(255,255,255,.14)!important;color:#fff!important}

/* settings (gear) button: exact fit, centered icon, nothing clipped */
html body #sideChat .user.user{
  width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;max-width:44px!important;
  padding:0!important;margin:0!important;box-sizing:border-box!important;gap:0!important;
  border-radius:50%!important;overflow:hidden!important;display:grid!important;place-items:center!important;
  left:14px!important;right:auto!important;bottom:calc(14px + env(safe-area-inset-bottom,0px))!important;
  font-size:0!important;line-height:0!important;
  background:rgba(255,255,255,.07)!important;border:1px solid rgba(255,255,255,.12)!important;
  transition:transform .2s cubic-bezier(.22,1,.3,1),background .2s!important}
html body #sideChat .user.user::after,html body #sideChat .user.user .uname{display:none!important}
html body #sideChat .user.user .av{width:100%!important;height:100%!important;margin:0!important;padding:0!important;
  border:0!important;border-radius:50%!important;background:none!important;display:grid!important;place-items:center!important}
html body #sideChat .user.user .av svg{width:22px!important;height:22px!important;margin:0!important;display:block}
html body #sideChat .user.user:hover{background:rgba(255,255,255,.13)!important}
html body #sideChat .user.user:active{transform:scale(.92)!important}
