:root{
  --paper:#f7f5f0;--ink:#231f27;--accent:#564174;--line:#dcd6df;
  --purple:var(--accent);--purple-deep:#41314f;--ivory:var(--paper);--lavender:#eae5ef;
  --max-width:820px;--app-bg:var(--paper);--serif:"Songti SC","Noto Serif CJK SC","STSong",serif;
  --sans:"PingFang SC","Hiragino Sans GB","Microsoft YaHei",system-ui,sans-serif;
  font-family:var(--sans);background:#eae7e3;color:var(--ink);
}
html{
  scroll-padding-top:70px;
  scrollbar-width:none;
}
html::-webkit-scrollbar{display:none}
@media (any-pointer:coarse){
  html,body,dialog{touch-action:manipulation;touch-action:pan-x pan-y}
  html{overflow-x:clip;overscroll-behavior-y:none}
  .profile-picker,.voice-picker-body{scrollbar-width:none}
  .profile-picker::-webkit-scrollbar,.voice-picker-body::-webkit-scrollbar{display:none}
}
body .shell[data-page]{
  --paper:#f7f5f0;--ink:#231f27;--accent:#564174;--line:#dcd6df;--day-ink:var(--ink);--day-plum:var(--accent);--rule:#d7d1cf;
  --intake-accent:var(--accent);--intake-ink:var(--ink);--intake-line:#dad5d1;--intake-muted:#685f69;
  width:100%;background:var(--paper);box-shadow:none;
}
body .shell[data-page] .topbar{
  position:sticky;top:0;z-index:20;height:57px;background:var(--paper);
  padding:0 clamp(16px,5vw,32px);gap:8px;border-bottom:1px solid #d6d0cb;
}
body .shell[data-page] .topline{
  gap:9px;min-height:44px;text-decoration:none;white-space:nowrap;border-radius:4px
}
body .shell[data-page] .topline:active{opacity:.72}
body .shell[data-page] .topline:before{
  content:"";display:block;width:25px;height:25px;flex:none;border-radius:7px;background:center/100% no-repeat url('/assets/mark.svg')
}
body .shell[data-page] #brand{font:630 17px/1.2 var(--serif);letter-spacing:.055em;color:#302837}
body .shell[data-page] #header-action{display:flex;align-items:center;gap:10px}
body .shell[data-page] .model-settings-action{
  padding:0 2px;gap:0;min-height:44px;flex-direction:row;align-items:center;gap:5px;color:#564e5a;background:transparent;font-size:12px;
}
body .shell[data-page] .model-settings-action .health-caption{
  font-size:0;gap:0;display:inline-flex;align-items:center;order:-1;
}
body .shell[data-page] .model-settings-action .health-caption:before{width:6px;height:6px}
body .shell[data-page] .profile-action{
  display:flex;flex-direction:row;align-items:center;justify-content:center;min-height:44px;gap:5px;padding:0 1px;
  color:#332b38;font-size:13px;background:transparent;
}
body .shell[data-page] .profile-action .header-name{
  display:block;font-size:13px;max-width:4em;font-weight:600;line-height:1.4;overflow:hidden;text-overflow:ellipsis
}
body .shell[data-page] .profile-switch-label{font-size:0;gap:0}
body .shell[data-page] .profile-switch-label .ui-icon{width:12px;height:12px}
body .shell[data-page] .head-copy{background:transparent;color:var(--accent);width:32px;height:42px}
body .shell[data-page] #main-content{padding-inline:clamp(16px,5vw,32px)}
body .shell[data-page] .scope-nav{min-height:47px;margin:0;border-bottom:1px solid #d7d1cd}
body .shell[data-page] .scope-nav nav.seg a{font:520 13px/1.2 var(--sans);letter-spacing:0;color:#716875;text-align:center}
body .shell[data-page] .scope-nav nav.seg a[aria-current=page]{color:#3e304e;font-weight:700}
body .shell[data-page] .scope-nav nav.seg a[aria-current=page]::after{background:var(--accent);height:3px;border-radius:8px}
body .shell[data-page] #bottom-nav{
  width:min(100%,var(--max-width));height:calc(62px + env(safe-area-inset-bottom));border:0;border-top:1px solid #d6d0cc;
  background:var(--paper);box-shadow:none;padding:6px clamp(12px,3vw,22px) calc(6px + env(safe-area-inset-bottom));align-items:center;
}
body .shell[data-page] #bottom-nav a{
  display:flex;flex-direction:row;gap:7px;min-height:44px;min-width:0;border:0;background:transparent;
  border-radius:14px;color:#6b636d;font:550 13px/1.2 var(--sans);text-decoration:none
}
body .shell[data-page] #bottom-nav .ui-icon{width:19px;height:19px}
body .shell[data-page] #bottom-nav a[aria-current=page]{color:#4d365d;background:#eae4ed}
body .shell :is(button,a,summary,input,textarea,select):focus-visible,.profile-picker button:focus-visible{
  outline:2px solid #75598a;outline-offset:2px
}
@media(hover:hover){body .shell[data-page] #bottom-nav a:hover{background:#ece8e8}body .shell[data-page] .profile-action:hover,body .shell[data-page] .model-settings-action:hover{color:#67447f}}
@media(min-width:760px){
  body .shell[data-page]{border-inline:1px solid #d9d3ce}
  body .shell[data-page] .topbar{height:65px;padding-inline:38px}
  body .shell[data-page] #main-content{padding-inline:38px}
  body .shell[data-page] .scope-nav nav.seg{max-width:570px}
  body .shell[data-page] #bottom-nav{padding-inline:clamp(44px,9vw,95px)}
}
@media(max-width:355px){
  body .shell[data-page] #brand{font-size:16px}
  body .shell[data-page] .topline:before{width:22px;height:22px}
  body .shell[data-page] #header-action{gap:7px}
  body .shell[data-page] .profile-action .header-name{max-width:2.8em}
  body .shell[data-page] .head-copy{width:26px}
}
.intake-page,.shell[data-page=settings] .intake-page{padding-bottom:26px}
.shell .intake-head{border-bottom:1px solid #d6cfca;padding:32px 0 22px}
.shell .intake-head h2{font:600 clamp(29px,6vw,38px)/1.35 var(--serif);letter-spacing:-.045em;color:#2e2631}
.shell .intake-head p{color:#6b616b;line-height:1.65}
.shell .settings-health{padding:18px 0}
.shell .settings-health .health-label{font-size:15px;font-weight:650}
.shell .settings-field{padding-block:18px}
.shell :is(.intake-control,.intake-choices span,.settings-test,.intake-submit){border-radius:9px;box-shadow:none}
.shell input.intake-control,.shell select.intake-control{background:#fbfaf7;border-color:#cfc8cc;min-height:46px}
.shell .intake-choices span{background:#faf8f5}
.shell .intake-choices input:checked+span{border-color:#634f74;color:#453051;background:#ebe5ef}
.shell .intake-label{color:#413944}
.shell .settings-test{background:transparent;border-color:#928298;color:#4c375d}
.shell .intake-submit{background:#4c395e;color:#fff}
.shell .settings-result{font-size:13px}
body dialog.profile-picker{background:var(--paper);border:1px solid #cec7c7;border-radius:19px;color:var(--ink)}
body .profile-picker h2{font-family:var(--serif);font-size:23px}
body .profile-picker .profile-current{color:#584368}
body .profile-picker footer button:first-child{background:#4d395e}
body .profile-picker::backdrop{background:rgb(42 34 45 / .33)}
@media(prefers-reduced-motion:no-preference){
  .shell button,.shell .seg a,.shell #bottom-nav a{transition:background-color .16s,color .16s,border-color .16s}
  .profile-picker[open]{animation:edition-enter .18s ease-out}
  @keyframes edition-enter{from{opacity:.6;translate:0 8px}to{opacity:1;translate:0 0}}
}
body .shell .edition-top-back{min-height:44px;padding:0 3px 0 8px;background:transparent;color:var(--accent);font:600 13px/1.2 var(--sans)}
@media(max-width:360px){body .shell[data-page] .topline{gap:6px}}
.shell .model-settings-page .settings-health{
  align-items:center;margin-block:18px 0;padding:13px 16px;border:1px solid #ded7e0;
  border-radius:12px;background:#eee9f1
}
.shell .model-settings-page .health-recheck{color:#513c63;font-weight:570}
.shell .model-settings-page .settings-providers .intake-choices{
  border:0;padding:0;background:transparent;gap:6px
}
.shell .model-settings-page .settings-providers .intake-choices span{
  border:1px solid #d9d0d8;font:550 14px/1.35 var(--sans);border-radius:9px
}
.shell .model-settings-page .settings-providers .intake-choices input:checked+span{
  background:#50405e;color:#fff;border-color:#50405e
}
.shell .model-settings-page .intake-label{font:600 14px/1.5 var(--sans);letter-spacing:.015em}
.shell .model-settings-page .settings-back{display:none}
@media(min-width:760px){
  .shell .model-settings-page{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.8fr);grid-template-rows:auto 1fr;gap:0 34px;padding-top:34px}
  .shell .model-settings-page .intake-head{padding:0 0 18px;border:0}
  .shell .model-settings-page .settings-health{margin:0;grid-column:1;grid-row:2;align-self:start;display:grid;justify-content:start;gap:4px}
  .shell .model-settings-page .health-recheck{justify-self:start;padding-left:0}
  .shell .model-settings-page :is(.settings-form,.settings-load){grid-column:2;grid-row:1 / span 2;padding-top:0}
}
