/* SYLORA Living Horizon — account routes.
   Bounded composition for Profile, Inbox and Settings using the canonical
   material and spacing tokens from design-system-2026.css. */

body[data-view="profile"] #app,
body[data-view="messages"] #app,
body[data-view="more"] #app{
  min-width:0;
}

/* Authentication -------------------------------------------------------- */
.auth-shell{
  width:min(100%,620px);
  margin:clamp(12px,4vh,42px) auto;
  padding:clamp(24px,4vw,38px)!important;
}

.auth-shell h2{
  margin:7px 0 20px;
  color:var(--sy-ink);
  font-size:clamp(30px,4vw,42px);
  letter-spacing:-.045em;
}

.auth-tabs{
  margin-bottom:20px;
}

.auth-tabs button{
  min-height:42px;
}

.auth-field-list{
  display:grid;
  gap:14px;
}

.auth-field{
  display:grid;
  gap:7px;
  color:var(--sy-muted);
  font-size:11px;
  font-weight:680;
}

.auth-field>span{
  padding-left:2px;
}

.auth-field>small{
  padding:0 2px;
  color:var(--sy-subtle);
  font-size:10px;
  font-weight:500;
  line-height:1.45;
}

.auth-fields input{
  min-height:48px;
  padding:12px 14px;
  border-color:rgba(65,80,82,.13);
  background:rgba(255,255,255,.88);
}

.auth-fields input:focus{
  border-color:rgba(93,132,125,.55);
  box-shadow:0 0 0 3px rgba(138,187,178,.15);
}

.auth-fields input[aria-invalid="true"]{
  border-color:#b45555;
  box-shadow:0 0 0 3px rgba(180,85,85,.13);
}

.auth-submit{
  min-height:48px;
  margin-top:3px;
}

.auth-submit:disabled,
.auth-tabs button:disabled{
  cursor:wait;
  opacity:.68;
}

.auth-error{
  margin:2px 0 0;
  padding:11px 13px;
  border:1px solid rgba(180,85,85,.22);
  border-radius:13px;
  background:rgba(255,241,241,.88);
  color:#7a3030;
  font-size:12px;
  font-weight:620;
  line-height:1.45;
}

.auth-error[hidden]{
  display:none;
}

/* Profile ---------------------------------------------------------------- */
body[data-view="profile"] .profile-hero{
  min-height:260px!important;
  margin-bottom:14px;
  padding:36px 40px 34px 176px!important;
  border-radius:var(--sy-r-xl);
  background:
    radial-gradient(circle at 86% 14%,rgba(213,173,112,.18),transparent 29%),
    radial-gradient(circle at 72% 100%,rgba(138,187,178,.16),transparent 34%),
    linear-gradient(135deg,rgba(255,254,251,.96),rgba(239,246,244,.76));
  box-shadow:var(--sy-shadow-2);
}

body[data-view="profile"] .profile-hero h1{
  position:relative;
  z-index:2;
  max-width:650px;
  margin:9px 0 7px;
  color:var(--sy-ink);
  font-size:clamp(38px,4.3vw,56px);
  font-weight:640;
  letter-spacing:-.055em;
  line-height:1;
  overflow-wrap:anywhere;
}

body[data-view="profile"] .profile-hero>p{
  position:relative;
  z-index:2;
  max-width:620px;
  margin:0;
  color:var(--sy-muted);
  font-size:13px;
  line-height:1.6;
  overflow-wrap:anywhere;
}

body[data-view="profile"] .profile-aura{
  position:absolute;
  top:50%;
  left:38px;
  z-index:3;
  display:grid;
  width:112px;
  height:112px;
  place-items:center;
  border:1px solid rgba(255,255,255,.96);
  border-radius:50%;
  background:conic-gradient(from 24deg,var(--sy-champagne),#eef3f1,var(--sy-mint),#e7dfd1,var(--sy-champagne));
  box-shadow:0 0 0 9px rgba(255,255,255,.30),0 20px 56px rgba(49,67,69,.12);
  transform:translateY(-50%);
}

body[data-view="profile"] .profile-aura:before{
  content:"";
  position:absolute;
  inset:5px;
  border-radius:inherit;
  background:linear-gradient(145deg,rgba(255,255,255,.98),rgba(226,236,233,.88));
  box-shadow:inset 0 1px 0 #fff;
  pointer-events:none;
}

body[data-view="profile"] .profile-aura span{
  position:relative;
  z-index:2;
  color:var(--sy-graphite);
  font:620 39px/1 Inter,ui-sans-serif,system-ui,sans-serif;
  letter-spacing:-.06em;
}

body[data-view="profile"] .profile-orbit-level{
  position:relative;
  z-index:2;
  width:min(100%,420px);
  max-width:none;
  margin-top:21px;
}

body[data-view="profile"] .profile-orbit-level>span{
  display:block;
  color:#806947;
  font-size:10px;
  font-weight:760;
  letter-spacing:.12em;
}

body[data-view="profile"] .profile-orbit-level>i{
  display:block;
  overflow:hidden;
  height:6px;
  margin:8px 0 7px;
  border-radius:999px;
  background:rgba(64,79,81,.09);
  box-shadow:inset 0 1px 2px rgba(44,58,60,.05);
}

body[data-view="profile"] .profile-orbit-level>i em{
  display:block;
  height:100%;
  border-radius:inherit;
  background:linear-gradient(90deg,var(--sy-champagne),var(--sy-mint));
  box-shadow:0 0 16px rgba(138,187,178,.24);
}

body[data-view="profile"] .profile-orbit-level>small{
  display:block;
  color:var(--sy-subtle);
  font-size:9px;
  line-height:1.45;
}

body[data-view="profile"] .profile-vitals{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:11px;
  margin:0 0 14px;
}

body[data-view="profile"] .profile-vitals .card{
  min-width:0;
  min-height:112px;
  margin:0!important;
  padding:18px 19px!important;
  border-radius:var(--sy-r-lg);
}

body[data-view="profile"] .profile-vitals small,
body[data-view="profile"] .profile-vitals b,
body[data-view="profile"] .profile-vitals span{
  display:block;
}

body[data-view="profile"] .profile-vitals small{
  color:#806947;
  font-size:9px;
  font-weight:740;
  letter-spacing:.14em;
}

body[data-view="profile"] .profile-vitals b{
  margin:10px 0 5px;
  overflow:hidden;
  color:var(--sy-graphite);
  font:650 clamp(20px,2vw,27px)/1 Inter,ui-sans-serif,system-ui,sans-serif;
  letter-spacing:-.045em;
  text-overflow:ellipsis;
  white-space:nowrap;
}

body[data-view="profile"] .profile-vitals span{
  color:var(--sy-subtle);
  font-size:10px;
  line-height:1.4;
}

body[data-view="profile"] .profile-columns{
  display:grid;
  grid-template-columns:minmax(0,5fr) minmax(0,6fr);
  gap:14px;
}

body[data-view="profile"] .profile-columns>.card{
  min-width:0;
  margin:0!important;
  padding:24px;
  border-radius:var(--sy-r-xl);
}

body[data-view="profile"] .profile-columns h3{
  margin:9px 0 17px;
  color:var(--sy-ink);
  font-size:22px;
  letter-spacing:-.035em;
}

body[data-view="profile"] .profile-settings label{
  display:grid;
  gap:7px;
  color:var(--sy-muted);
  font-size:11px;
  font-weight:650;
}

body[data-view="profile"] .profile-settings :is(input,textarea,select){
  min-height:44px;
  padding:11px 13px;
}

body[data-view="profile"] .profile-settings textarea{
  min-height:94px;
  resize:vertical;
}

body[data-view="profile"] .profile-settings .primary{
  min-height:44px;
  justify-self:start;
  margin-top:2px;
  padding-inline:20px;
}

body[data-view="profile"] .profile-activity h3{
  margin:18px 0 9px;
  color:var(--sy-graphite);
  font-size:14px;
}

body[data-view="profile"] .profile-scroll{
  display:grid;
  gap:7px;
  max-height:236px;
  overflow:auto;
  padding-right:2px;
  scrollbar-width:thin;
  scrollbar-color:rgba(70,86,88,.18) transparent;
}

body[data-view="profile"] .profile-event,
body[data-view="messages"] .profile-event{
  display:grid;
  grid-template-columns:34px minmax(0,1fr);
  gap:10px;
  align-items:center;
  min-width:0;
  padding:9px 10px;
  border:1px solid rgba(255,255,255,.88);
  border-radius:var(--sy-r-md);
  background:rgba(255,255,255,.50);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.82);
}

body[data-view="profile"] .profile-event i,
body[data-view="messages"] .profile-event i{
  display:grid;
  width:34px;
  height:34px;
  place-items:center;
  border-radius:12px;
  background:linear-gradient(145deg,#fff,var(--sy-crystal));
  color:#816b4a;
  font-style:normal;
}

body[data-view="profile"] .profile-event span,
body[data-view="messages"] .profile-event span{
  min-width:0;
}

body[data-view="profile"] .profile-event b,
body[data-view="profile"] .profile-event small,
body[data-view="messages"] .profile-event b,
body[data-view="messages"] .profile-event small{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

body[data-view="profile"] .profile-event b,
body[data-view="messages"] .profile-event b{
  color:var(--sy-graphite);
  font-size:11px;
}

body[data-view="profile"] .profile-event small,
body[data-view="messages"] .profile-event small{
  margin-top:3px;
  color:var(--sy-subtle);
  font-size:9px;
}

/* Inbox ------------------------------------------------------------------ */
body[data-view="messages"] .messages-hero{
  min-height:154px;
  margin-bottom:12px;
  padding:25px 30px;
  border-radius:var(--sy-r-xl);
  background:
    radial-gradient(circle at 86% 12%,rgba(138,187,178,.18),transparent 28%),
    radial-gradient(circle at 67% 100%,rgba(213,173,112,.12),transparent 34%),
    linear-gradient(135deg,rgba(255,255,253,.96),rgba(236,244,242,.74));
  box-shadow:var(--sy-shadow-2);
}

body[data-view="messages"] .messages-hero h1{
  position:relative;
  z-index:2;
  margin:8px 0 6px;
  color:var(--sy-ink);
  font-size:clamp(42px,4.6vw,60px);
  font-weight:640;
  letter-spacing:-.055em;
}

body[data-view="messages"] .messages-hero p{
  position:relative;
  z-index:2;
  margin:0;
  color:var(--sy-muted);
  font-size:12px;
  line-height:1.6;
}

body[data-view="messages"] .inbox-tabs{
  display:flex;
  gap:7px;
  max-width:100%;
  margin:0 0 12px;
  overflow-x:auto;
  padding:2px 1px;
  scrollbar-width:none;
}

body[data-view="messages"] .inbox-tabs::-webkit-scrollbar{
  display:none;
}

body[data-view="messages"] .inbox-tabs button{
  flex:0 0 auto;
  min-height:38px;
  padding:0 14px;
  border:1px solid rgba(255,255,255,.90);
  border-radius:var(--sy-r-pill);
  background:rgba(255,255,255,.54);
  color:var(--sy-muted);
  font-size:10px;
  font-weight:720;
  cursor:pointer;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.84);
  transition:background var(--sy-motion-ui) var(--sy-ease),color var(--sy-motion-ui) var(--sy-ease),transform var(--sy-motion-fast) var(--sy-ease);
}

body[data-view="messages"] .inbox-tabs button:hover{
  transform:translateY(-1px);
  background:rgba(255,255,255,.82);
  color:var(--sy-ink);
}

body[data-view="messages"] .inbox-tabs button.active{
  border-color:rgba(138,187,178,.18);
  background:linear-gradient(145deg,#fff,rgba(226,238,235,.92));
  color:var(--sy-ink);
  box-shadow:var(--sy-shadow-1),inset 0 1px 0 #fff;
}

body[data-view="messages"] .inbox-panel.card{
  padding:20px;
}

body[data-view="messages"] .inbox-panel.card>.profile-event+ .profile-event{
  margin-top:7px;
}

body[data-view="messages"] :is(.messages-shell,.inbox-shell){
  display:grid;
  grid-template-columns:minmax(240px,292px) minmax(0,1fr);
  gap:12px;
  min-width:0;
  min-height:560px;
  height:clamp(560px,66vh,720px);
}

body[data-view="messages"] .conversation-panel{
  display:grid;
  grid-template-rows:auto minmax(0,1fr);
  min-width:0;
  height:100%;
  margin:0;
  overflow:hidden;
  padding:12px;
  border-radius:var(--sy-r-xl);
}

body[data-view="messages"] .new-message{
  padding:8px 7px 13px;
  border-bottom:1px solid var(--sy-line);
}

body[data-view="messages"] .new-message .fields{
  display:grid;
  grid-template-columns:minmax(0,1fr) 42px;
  gap:7px;
  margin-top:10px;
}

body[data-view="messages"] .new-message :is(select,button){
  min-width:0;
  min-height:42px;
}

body[data-view="messages"] .new-message select{
  padding:9px 11px;
}

body[data-view="messages"] .new-message button{
  width:42px;
  padding:0;
}

body[data-view="messages"] .conversation-list{
  display:grid;
  align-content:start;
  gap:5px;
  min-height:0;
  overflow:auto;
  padding:10px 2px 2px;
  scrollbar-width:thin;
  scrollbar-color:rgba(70,86,88,.17) transparent;
}

body[data-view="messages"] .convo{
  display:flex;
  align-items:center;
  gap:10px;
  width:100%;
  min-width:0;
  min-height:58px;
  padding:9px 10px;
  border:1px solid transparent;
  border-radius:var(--sy-r-md);
  background:transparent;
  color:var(--sy-graphite);
  text-align:left;
  cursor:pointer;
  transition:background var(--sy-motion-ui) var(--sy-ease),border-color var(--sy-motion-ui) var(--sy-ease),transform var(--sy-motion-fast) var(--sy-ease);
}

body[data-view="messages"] .convo:hover{
  transform:translateX(1px);
  background:rgba(255,255,255,.58);
}

body[data-view="messages"] .convo.active{
  border-color:rgba(255,255,255,.94);
  background:linear-gradient(135deg,rgba(255,255,255,.94),rgba(226,237,234,.82));
  box-shadow:var(--sy-shadow-1),inset 0 1px 0 #fff;
}

body[data-view="messages"] .conversation-avatar{
  display:grid;
  width:40px;
  height:40px;
  flex:0 0 40px;
  place-items:center;
  border:1px solid rgba(255,255,255,.94);
  border-radius:14px;
  background:linear-gradient(145deg,#fbfaf6,#dfeae7);
  color:var(--sy-graphite);
  font-size:13px;
  font-weight:760;
  box-shadow:var(--sy-shadow-1);
}

body[data-view="messages"] .convo>span:last-child{
  min-width:0;
}

body[data-view="messages"] .convo b,
body[data-view="messages"] .convo small{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

body[data-view="messages"] .convo b{
  color:var(--sy-graphite);
  font-size:11px;
}

body[data-view="messages"] .convo small{
  max-width:185px;
  margin-top:4px;
  color:var(--sy-subtle);
  font-size:9px;
}

body[data-view="messages"] .conversation-empty{
  padding:12px;
  text-align:center;
}

body[data-view="messages"] .chat-space{
  min-width:0;
  min-height:0;
}

body[data-view="messages"] :is(.chat-placeholder,.chat-card){
  width:100%;
  height:100%;
  min-height:540px;
  margin:0;
  border-radius:var(--sy-r-xl);
}

body[data-view="messages"] .chat-placeholder{
  display:grid;
  place-content:center;
  place-items:center;
  padding:28px;
  text-align:center;
  border:1px solid rgba(255,255,255,.94)!important;
  background:
    radial-gradient(circle at 72% 18%,rgba(138,187,178,.16),transparent 28%),
    radial-gradient(circle at 26% 86%,rgba(213,173,112,.12),transparent 34%),
    linear-gradient(145deg,rgba(255,255,255,.97),rgba(238,244,242,.88))!important;
  box-shadow:var(--sy-shadow-2)!important;
}

body[data-view="messages"] .chat-placeholder>span{
  display:grid;
  width:64px;
  height:64px;
  place-items:center;
  border:1px solid rgba(255,255,255,.95);
  border-radius:50%;
  background:linear-gradient(145deg,#fff,var(--sy-crystal));
  color:#806947;
  font-size:27px;
  box-shadow:var(--sy-shadow-1);
}

body[data-view="messages"] .chat-placeholder b{
  margin-top:13px;
  color:var(--sy-graphite);
  font-size:16px;
}

body[data-view="messages"] .chat-placeholder p{
  margin:6px 0 0;
  font-size:11px;
}

body[data-view="messages"] .chat-card{
  display:grid;
  grid-template-rows:auto minmax(0,1fr) auto;
  overflow:hidden;
  padding:0;
}

body[data-view="messages"] .chat-head{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto auto;
  gap:10px;
  align-items:center;
  min-height:66px;
  padding:12px 17px;
  border-bottom:1px solid var(--sy-line);
  background:rgba(255,255,255,.48);
}

body[data-view="messages"] .chat-head>span{
  overflow:hidden;
  color:var(--sy-subtle);
  font-size:9px;
  letter-spacing:.08em;
  text-overflow:ellipsis;
  white-space:nowrap;
}

body[data-view="messages"] .chat-head i{
  display:inline-block;
  width:7px;
  height:7px;
  margin-right:6px;
  border-radius:50%;
  background:var(--sy-success);
  box-shadow:0 0 0 4px rgba(91,153,137,.10);
}

body[data-view="messages"] .chat-head>b{
  color:var(--sy-graphite);
  font-size:11px;
}

body[data-view="messages"] .chat-head .row{
  gap:5px;
}

body[data-view="messages"] .chat-head button{
  min-height:34px;
  padding:0 11px;
  font-size:9px;
}

body[data-view="messages"] .message-stream{
  display:flex;
  flex-direction:column;
  gap:9px;
  min-height:0;
  max-height:none;
  overflow:auto;
  padding:22px;
  background:
    radial-gradient(circle at 16% 8%,rgba(213,173,112,.08),transparent 31%),
    radial-gradient(circle at 90% 88%,rgba(138,187,178,.09),transparent 32%),
    rgba(248,250,249,.44);
  scrollbar-width:thin;
  scrollbar-color:rgba(70,86,88,.16) transparent;
}

body[data-view="messages"] .message-bubble{
  max-width:min(78%,540px);
  padding:10px 13px;
  border:1px solid rgba(255,255,255,.90);
  border-radius:18px;
  box-shadow:var(--sy-shadow-1);
}

body[data-view="messages"] .message-bubble small{
  color:var(--sy-subtle);
  font-size:8px;
  font-weight:660;
}

body[data-view="messages"] .message-bubble p{
  margin:4px 0 0;
  color:var(--sy-graphite);
  font-size:13px;
  line-height:1.5;
  overflow-wrap:anywhere;
}

body[data-view="messages"] .message-bubble.mine{
  align-self:flex-end;
  border-bottom-right-radius:6px;
  background:linear-gradient(135deg,rgba(244,235,217,.94),rgba(230,239,236,.88));
}

body[data-view="messages"] .message-bubble.theirs{
  align-self:flex-start;
  border-bottom-left-radius:6px;
  background:rgba(255,255,255,.86);
}

body[data-view="messages"] .chat-empty{
  margin:auto;
}

body[data-view="messages"] .message-compose{
  position:static;
  display:grid;
  grid-template-columns:minmax(0,1fr) 44px;
  gap:8px;
  padding:12px;
  border-top:1px solid var(--sy-line);
  background:rgba(250,252,251,.80);
}

body[data-view="messages"] .message-compose input{
  min-width:0;
  min-height:44px;
  padding:10px 13px;
}

body[data-view="messages"] .message-compose button{
  width:44px;
  min-height:44px;
  padding:0;
}

body[data-view="messages"] .inbox-panel>.fields{
  gap:10px;
}

body[data-view="messages"] .inbox-panel>.fields>.row{
  justify-content:flex-start;
  flex-wrap:wrap;
}

/* Settings --------------------------------------------------------------- */
body[data-view="more"] #app>.hero:first-child{
  min-height:196px;
  margin-bottom:14px;
  padding:30px 34px;
  border-radius:var(--sy-r-xl);
  background:
    radial-gradient(circle at 86% 12%,rgba(213,173,112,.15),transparent 28%),
    radial-gradient(circle at 69% 100%,rgba(138,187,178,.13),transparent 34%),
    linear-gradient(135deg,rgba(255,254,252,.96),rgba(239,245,243,.72));
  box-shadow:var(--sy-shadow-2);
  filter:none;
}

body[data-view="more"] #app>.hero:first-child h1,
body[data-view="more"] #app>.hero:first-child p,
body[data-view="more"] #app>.hero:first-child .eyebrow{
  position:relative;
  z-index:2;
}

body[data-view="more"] #app>.hero:first-child h1{
  max-width:720px;
  margin:9px 0 8px;
  color:var(--sy-ink);
  font-size:clamp(38px,4vw,54px);
  font-weight:640;
  letter-spacing:-.055em;
  line-height:1.02;
}

body[data-view="more"] #app>.hero:first-child p{
  max-width:650px;
  margin:0;
  color:var(--sy-muted);
  font-size:13px;
  line-height:1.6;
}

body[data-view="more"] .settings-scene{
  position:relative;
  min-height:238px;
  margin-bottom:14px;
  overflow:hidden;
  padding:38px 40px;
  border:1px solid rgba(255,255,255,.92);
  border-radius:var(--sy-r-xl);
  background:
    radial-gradient(circle at 88% 12%,rgba(213,173,112,.22),transparent 30%),
    radial-gradient(circle at 66% 100%,rgba(138,187,178,.18),transparent 35%),
    linear-gradient(118deg,rgba(255,255,255,.98),rgba(237,245,242,.88));
  box-shadow:var(--sy-shadow-2);
  isolation:isolate;
}

body[data-view="more"] .settings-scene:before{
  content:"";
  position:absolute;
  inset:auto 7% -54% auto;
  z-index:-1;
  width:260px;
  aspect-ratio:1;
  border:1px solid rgba(138,187,178,.10);
  border-radius:50%;
  box-shadow:0 0 0 38px rgba(255,255,255,.11),0 0 0 76px rgba(213,173,112,.035);
}

body[data-view="more"] .settings-copy{
  position:relative;
  z-index:2;
  max-width:66%;
}

body[data-view="more"] .settings-copy h1{
  max-width:760px;margin:10px 0 10px;color:var(--sy-ink);
  font-size:clamp(42px,4.7vw,62px);font-weight:620;line-height:.96;
  letter-spacing:-.06em;text-wrap:balance;
}

body[data-view="more"] .settings-copy h2{
  margin:8px 0 7px;
  color:var(--sy-ink);
  font-size:clamp(27px,3vw,36px);
  font-weight:640;
  letter-spacing:-.045em;
}

body[data-view="more"] .settings-copy p{
  margin:0;
  color:var(--sy-muted);
  max-width:620px;font-size:13px;
  line-height:1.62;
}

body[data-view="more"] .settings-orbit{
  position:absolute;
  top:50%;
  right:8%;
  z-index:1;
  display:grid;
  width:126px;
  height:126px;
  place-items:center;
  border:1px solid rgba(138,187,178,.20);
  border-radius:50%;
  box-shadow:0 0 52px rgba(138,187,178,.12);
  transform:translateY(-50%);
  pointer-events:none;
}

body[data-view="more"] .settings-orbit:before,
body[data-view="more"] .settings-orbit:after{
  content:"";
  position:absolute;
  border:1px solid rgba(213,173,112,.20);
  border-radius:50%;
  pointer-events:none;
}

body[data-view="more"] .settings-orbit:before{
  inset:15px;
  border-color:rgba(213,173,112,.20);
}

body[data-view="more"] .settings-orbit:after{
  inset:-18px;
  border-color:rgba(138,187,178,.12);
}

body[data-view="more"] .settings-orbit i{
  position:relative;
  z-index:2;
  color:var(--sy-graphite);
  font-size:27px;
  font-style:normal;
  filter:drop-shadow(0 0 12px rgba(213,173,112,.20));
}

body[data-view="more"] .settings-orbit span{
  position:absolute;
  z-index:2;
  width:10px;
  height:10px;
  border-radius:50%;
  background:var(--sy-champagne);
  box-shadow:0 0 13px rgba(213,173,112,.32);
}

body[data-view="more"] .settings-orbit span:nth-child(2){
  top:50%;
  left:-5px;
  transform:translateY(-50%);
}

body[data-view="more"] .settings-orbit span:nth-child(3){
  top:11px;
  right:11px;
  background:var(--sy-mint);
}

body[data-view="more"] .settings-orbit span:nth-child(4){
  bottom:6px;
  left:22px;
  background:#778583;
}

body[data-view="more"] .settings-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
}

body[data-view="more"] .settings-grid .module{
  position:relative;
  min-width:0;
  min-height:172px;
  overflow:hidden;
  padding:22px;
  border-radius:var(--sy-r-lg);
  transition:transform var(--sy-motion-fast) var(--sy-ease),box-shadow var(--sy-motion-ui) var(--sy-ease);
}

body[data-view="more"] .settings-grid .module:after{
  content:"";
  position:absolute;
  right:-38px;
  bottom:-48px;
  width:112px;
  height:112px;
  border:1px solid rgba(138,187,178,.10);
  border-radius:50%;
  pointer-events:none;
}

body[data-view="more"] .settings-grid .module:hover{
  transform:translateY(-2px);
  box-shadow:var(--sy-shadow-2)!important;
}

body[data-view="more"] .settings-grid .module .icon{
  display:grid;
  width:43px;
  height:43px;
  place-items:center;
  border:1px solid rgba(255,255,255,.94);
  border-radius:50%;
  background:linear-gradient(145deg,#fff,var(--sy-crystal));
  color:#806947;
  font-size:18px;
  box-shadow:var(--sy-shadow-1),inset 0 1px 0 #fff;
}

body[data-view="more"] .settings-grid .module h3{
  margin:14px 0 7px;
  color:var(--sy-graphite);
  font-size:15px;
  letter-spacing:-.025em;
  line-height:1.25;
}

body[data-view="more"] .settings-grid .module p{
  margin:0;
  color:var(--sy-muted);
  font-size:11px;
  line-height:1.55;
}

/* Account route adaptation ------------------------------------------------ */
@media(max-width:900px){
  body[data-view="profile"] .profile-hero{
    padding-right:28px!important;
  }

  body[data-view="profile"] .profile-vitals{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  body[data-view="profile"] .profile-columns{
    grid-template-columns:1fr;
  }

  body[data-view="messages"] :is(.messages-shell,.inbox-shell){
    grid-template-columns:minmax(220px,260px) minmax(0,1fr);
    min-height:520px;
    height:clamp(520px,68vh,640px);
  }

  body[data-view="messages"] :is(.chat-placeholder,.chat-card){
    min-height:520px;
  }

  body[data-view="messages"] .chat-head{
    grid-template-columns:minmax(0,1fr) auto;
  }

  body[data-view="messages"] .chat-head>b{
    display:none;
  }

  body[data-view="more"] .settings-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media(max-width:620px){
  body[data-view="profile"] .profile-hero{
    min-height:0!important;
    padding:104px 20px 24px!important;
  }

  body[data-view="profile"] .profile-aura{
    top:20px!important;
    left:20px!important;
    width:70px;
    height:70px;
    transform:none!important;
    box-shadow:0 0 0 6px rgba(255,255,255,.30),var(--sy-shadow-1);
  }

  body[data-view="profile"] .profile-aura span{
    font-size:25px;
  }

  body[data-view="profile"] .profile-hero h1{
    font-size:35px;
  }

  body[data-view="profile"] .profile-orbit-level{
    margin-top:17px;
  }

  body[data-view="profile"] .profile-columns>.card{
    padding:20px;
  }

  body[data-view="messages"] .messages-hero{
    min-height:148px;
    padding:24px 21px;
  }

  body[data-view="messages"] .messages-hero h1{
    font-size:36px;
  }

  body[data-view="messages"] :is(.messages-shell,.inbox-shell){
    display:block;
    height:auto;
    min-height:0;
  }

  body[data-view="messages"] .conversation-panel{
    display:block;
    height:auto;
    margin-bottom:10px;
  }

  body[data-view="messages"] .conversation-list{
    display:flex;
    gap:7px;
    overflow-x:auto;
    padding:9px 1px 2px;
    scroll-snap-type:x proximity;
    scrollbar-width:none;
  }

  body[data-view="messages"] .conversation-list::-webkit-scrollbar{
    display:none;
  }

  body[data-view="messages"] .convo{
    flex:0 0 176px;
    scroll-snap-align:start;
  }

  body[data-view="messages"] .convo small{
    max-width:105px;
  }

  body[data-view="messages"] :is(.chat-placeholder,.chat-card){
    height:auto;
    min-height:430px;
  }

  body[data-view="messages"] .chat-card{
    height:min(58svh,540px);
    min-height:430px;
  }

  body[data-view="messages"] .message-stream{
    padding:16px;
  }

  body[data-view="messages"] .message-bubble{
    max-width:88%;
  }

  body[data-view="messages"] .message-compose{
    position:static;
    bottom:auto;
    padding:12px!important;
  }

  body[data-view="more"] #app>.hero:first-child{
    min-height:178px;
    padding:25px 21px;
  }

  body[data-view="more"] #app>.hero:first-child h1{
    font-size:36px;
  }

  body[data-view="more"] .settings-scene{
    min-height:230px;
    padding:26px 22px 112px;
  }

  body[data-view="more"] .settings-copy{
    max-width:100%;
  }

  body[data-view="more"] .settings-copy h1{
    font-size:36px;
  }

  body[data-view="more"] .settings-orbit{
    top:auto;
    right:22px;
    bottom:18px;
    width:78px;
    height:78px;
    transform:none;
  }

  body[data-view="more"] .settings-grid{
    grid-template-columns:1fr;
  }

  body[data-view="more"] .settings-grid .module{
    min-height:148px;
  }
}

@media(max-width:480px){
  body[data-view="profile"] .profile-hero,
  body[data-view="messages"] .messages-hero,
  body[data-view="more"] #app>.hero:first-child,
  body[data-view="more"] .settings-scene{
    border-radius:24px;
  }

  body[data-view="profile"] .profile-vitals{
    gap:8px;
  }

  body[data-view="profile"] .profile-vitals .card{
    min-height:96px;
    padding:14px!important;
  }

  body[data-view="profile"] .profile-vitals b{
    margin-top:8px;
    font-size:19px;
  }

  body[data-view="profile"] .profile-columns>.card{
    padding:18px;
    border-radius:22px;
  }

  body[data-view="profile"] .profile-settings .primary{
    width:100%;
  }

  body[data-view="messages"] .inbox-tabs button{
    min-height:36px;
    padding-inline:12px;
  }

  body[data-view="messages"] .conversation-panel,
  body[data-view="messages"] :is(.chat-placeholder,.chat-card){
    border-radius:22px;
  }

  body[data-view="messages"] .chat-head{
    min-height:62px;
    padding:10px 12px;
  }

  body[data-view="messages"] .chat-head>span{
    max-width:110px;
  }

  body[data-view="messages"] .chat-head button{
    padding-inline:9px;
  }

  body[data-view="messages"] .message-bubble{
    max-width:92%;
  }

  body[data-view="messages"] .inbox-panel.card{
    padding:16px;
  }

  body[data-view="more"] .settings-scene{
    padding-left:20px;
    padding-right:20px;
  }

  body[data-view="more"] .settings-grid .module{
    min-height:142px;
    padding:19px;
    border-radius:22px;
  }
}

@media(prefers-reduced-motion:reduce){
  body[data-view="messages"] .convo,
  body[data-view="messages"] .inbox-tabs button,
  body[data-view="more"] .settings-grid .module{transition:none!important;transform:none!important}
  body[data-view="more"] .settings-orbit span{animation:none!important}
}

/* Grouped settings architecture replaces the old equal-weight module wall. */
body[data-view="more"] .settings-groups{display:grid;gap:14px;margin-top:14px}
body[data-view="more"] .settings-group{padding:22px;border:1px solid rgba(255,255,255,.94);border-radius:27px;background:linear-gradient(145deg,rgba(255,255,255,.96),rgba(237,243,241,.82));box-shadow:var(--sy-shadow-1),inset 0 1px 0 #fff}
body[data-view="more"] .settings-group:nth-child(2){background:linear-gradient(145deg,rgba(255,255,255,.80),rgba(243,237,226,.64))}
body[data-view="more"] .settings-group:nth-child(3){background:linear-gradient(145deg,rgba(255,255,255,.80),rgba(236,238,244,.66))}
body[data-view="more"] .settings-group-head{margin:0 2px 14px}
body[data-view="more"] .settings-group-head h2{margin:6px 0 4px;font-size:21px;letter-spacing:-.035em}
body[data-view="more"] .settings-group-head p{margin:0;color:var(--sy-muted);font-size:11px}
body[data-view="more"] .settings-group .settings-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
body[data-view="more"] .settings-group .settings-grid .module{width:100%;min-height:96px;display:grid;grid-template-columns:43px minmax(0,1fr) auto;align-items:center;gap:12px;padding:14px 15px;text-align:left;cursor:pointer;background:rgba(255,255,255,.74)!important}
body[data-view="more"] .settings-group .module>span:nth-child(2){min-width:0}
body[data-view="more"] .settings-group .module h3{margin:0 0 4px}
body[data-view="more"] .settings-group .module>i{color:var(--sy-route-accent);font-style:normal;font-size:15px}
@media(max-width:700px){body[data-view="more"] .settings-group{padding:15px;border-radius:23px}body[data-view="more"] .settings-group .settings-grid{grid-template-columns:1fr}body[data-view="more"] .settings-group .settings-grid .module{min-height:84px;padding:11px 12px}}


/* Mobile session control ------------------------------------------------- */
body[data-view="profile"] .profile-mobile-signout{
  display:none!important;
}

@media(max-width:900px){
  body[data-view="profile"] .profile-mobile-signout{
    display:inline-flex!important;
    width:100%;
    min-height:46px;
    align-items:center;
    justify-content:center;
    margin-top:16px;
    border-color:rgba(180,85,85,.24)!important;
    background:rgba(255,244,244,.78)!important;
    color:#7a3030!important;
    font-weight:720;
  }
}
