/* U2: one visual vocabulary over existing surfaces. The immersive star map
   retains its own shell. This file contains no new capability or save state. */
body:not([data-view^="memory-universe"]) {
  --ink: #302d38; --muted: #716a75; --accent: #892d42;
  --line: #e8e0e3; --paper: #fffdfc;
  color: var(--ink); background: #faf8f6;
}
body:not([data-view^="memory-universe"]) .ambient { display: none; }
body:not([data-view^="memory-universe"]) :is(button,input,textarea,select) { font-family: inherit; }
body:not([data-view^="memory-universe"]) :is(button,a,input,textarea,select):focus-visible { outline: 2px solid #892d42; outline-offset: 3px; }
body:not([data-view^="memory-universe"]) :is(button.primary,button.ghost) { min-height: 44px; border-radius: 14px; padding: 10px 18px; font-size: 15px; }
body:not([data-view^="memory-universe"]) button.primary { background: #892d42; color: #fff; box-shadow: none; }
body:not([data-view^="memory-universe"]) button.ghost { background: #fffdfc; border: 1px solid #e5dce1; color: #4d4351; }
body:not([data-view^="memory-universe"]) :is(.surface,.rs-card,.dp-card) { background: #fffdfc; border: 1px solid #e8e0e3; border-radius: 22px; box-shadow: 0 8px 32px -24px #6c4c63; }
body:not([data-view^="memory-universe"]) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),textarea,select) { border-radius: 12px; background: #faf8f9; border-color: #dfd6df; color: #302d38; font-size: 16px; }
body:not([data-view^="memory-universe"]) .topbar { max-width: 1440px; padding: 20px 28px; }
body:not([data-view^="memory-universe"]) .shell { max-width: 1440px; padding: 12px 28px 112px; }
body:not([data-view^="memory-universe"]) .panel-heading { align-items: start; gap: 20px; margin-bottom: 26px; }
body:not([data-view^="memory-universe"]) .panel-heading h2 { font-size: clamp(26px,3vw,36px); letter-spacing: -.03em; }
body:not([data-view^="memory-universe"]) .panel-heading p { color: #716a75; line-height: 1.7; }
body:not([data-view^="memory-universe"]) .quick-grid { gap: 12px; }
body:not([data-view^="memory-universe"]) .quick-card { border: 1px solid #e8e0e3; background: #fffdfc; border-radius: 18px; min-width: 0; padding: 18px; box-shadow: none; }
body:not([data-view^="memory-universe"]) .site-nav { display: flex; align-items: stretch; justify-content: space-around; gap: 2px; position: fixed; inset: auto 0 0; transform: none; width: 100%; max-width: none; border: 0; border-top: 1px solid #e8e0e3; border-radius: 0; background: #fffdfcf5; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); box-shadow: none; z-index: 40; }
body:not([data-view^="memory-universe"]) .site-nav button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 0; min-height: 52px; border: 0; border-radius: 14px; padding: 5px; font-size: 12px; color: #716a75; background: transparent; }
body:not([data-view^="memory-universe"]) .site-nav button span { display: block; width: auto; height: auto; line-height: 1; font-size: 23px; background: none; color: inherit; }
body:not([data-view^="memory-universe"]) .site-nav button.active { color: #892d42; background: #f3e7eb; box-shadow: none; }
.site-nav-title { display: none; }
.site-role-context { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; padding: 24px; margin-bottom: 32px; }
.site-role-context > img { width: 80px; height: 80px; border-radius: 24px; object-fit: cover; }
.site-role-context > div:not(.site-actions) { flex: 1; min-width: 180px; }
.site-role-context h2 { font-size: 26px; margin: 4px 0; }
.site-role-context p { color: #716a75; margin: 6px 0; line-height: 1.7; }
.site-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.site-entry-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; margin: 24px 0; }
.site-entry { display: flex; flex-direction: column; align-items: start; gap: 16px; text-align: left; padding: 28px; min-width: 0; color: #302d38; }
.site-entry:hover { border-color: #bb9caa !important; }
.site-entry-symbol { display: grid; place-items: center; width: 48px; height: 48px; background: #f0eaf2; color: #785b7d; border-radius: 16px; font-size: 21px; }
.site-entry strong { font-size: 22px; }
.site-entry > span:not(.site-entry-symbol), .site-footnote { color: #716a75; font-size: 15px; line-height: 1.8; }
.site-entry small { color: #892d42; margin-top: auto; font-size: 14px; }
body:not([data-view^="memory-universe"]) #roleSettingsPanel { max-width: 1120px; }
body:not([data-view^="memory-universe"]) .rs-card { padding: 24px; }
body:not([data-view^="memory-universe"]) .rs-card h3 { font-family: inherit; font-weight: 600; font-size: 18px; }
body:not([data-view^="memory-universe"]) .rs-hint { font-size: 14px; line-height: 1.8; }
body:not([data-view^="memory-universe"]) .rs-head { margin: 8px 0 12px; }
body:not([data-view^="memory-universe"]) .rs-head p:last-child { font-size: 14px; }
body:not([data-view^="memory-universe"]) .rs-save-bar { background: #fffdfc; border: 1px solid #e8e0e3; border-radius: 18px; padding: 16px 20px; bottom: 88px; box-shadow: 0 10px 40px -28px #59334d; }
body:not([data-view^="memory-universe"]) .rs-pocket { background: #ece6ed; box-shadow: none; }
body:not([data-view^="memory-universe"]) .rs-voice { background: #faf8f9; border-color: #e8e0e3; }
body:not([data-view^="memory-universe"]) .dp-head { position: relative; padding-right: 160px; }
body:not([data-view^="memory-universe"]) #addDeviceNavButton { position: absolute; top: 8px; right: 0; }
@media(min-width:1100px) {
  body:not([data-view^="memory-universe"]):has(#appView:not([hidden])) .shell { padding-left: 244px; }
  body:not([data-view^="memory-universe"]) .site-nav { inset: 112px auto 24px max(20px,calc((100vw - 1440px)/2 + 20px)); width: 192px; padding: 16px 10px; flex-direction: column; justify-content: flex-start; gap: 8px; border: 1px solid #e8e0e3; border-radius: 24px; background: #fffdfc; }
  body:not([data-view^="memory-universe"]) .site-nav button { flex: 0 0 auto; flex-direction: row; justify-content: flex-start; gap: 16px; font-size: 16px; padding: 14px 18px; }
  .site-nav-title { display: block; padding: 12px 16px 20px; color: #8a7c88; font-size: 12px; }
  body:not([data-view^="memory-universe"]) .rs-save-bar { bottom: 20px; }
  body:has(#webChatPanel.active):not([data-view^="memory-universe"]) .shell { padding: 0; }
}
@media(min-width:900px) {
  body:not([data-view^="memory-universe"]) .rs-layout { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(250px,1fr); gap: 20px; }
  body:not([data-view^="memory-universe"]) :is(.rs-aside,.rs-main) { display: contents; }
  body:not([data-view^="memory-universe"]) .rs-head { grid-column: 1 / -1; }
  body:not([data-view^="memory-universe"]) .rs-main > .rs-card { grid-column: 1; }
  body:not([data-view^="memory-universe"]) .rs-image { grid-column: 2; grid-row: 2 / span 3; align-self: start; }
  body:not([data-view^="memory-universe"]) .rs-save-bar { grid-column: 1 / -1; }
}
@media(max-width:760px) {
  body:not([data-view^="memory-universe"]) .topbar { padding: 16px; }
  body:not([data-view^="memory-universe"]) .shell { padding: 4px 16px 108px; }
  .site-entry-grid { grid-template-columns: minmax(0,1fr); gap: 12px; }
  .site-entry { padding: 22px; gap: 10px; }
  .site-role-context { padding: 20px; gap: 14px; }
  .site-actions { width: 100%; }
  body:not([data-view^="memory-universe"]) .rs-card { padding: 18px; }
  body:not([data-view^="memory-universe"]) .rs-save-bar { padding: 12px; gap: 8px; }
  body:not([data-view^="memory-universe"]) .rs-save-state { font-size: 12px; }
  body:not([data-view^="memory-universe"]) .panel-heading { flex-direction: column; gap: 8px; }
}
@media(prefers-reduced-motion:reduce) { .site-nav *, .site-entry { transition: none !important; } }
/* Retire the old six-slot nav highlight and its forced mobile height. */
.site-nav::before { display: none; }
@media(min-width:1100px) {
  body:not([data-view^="memory-universe"]) .site-nav { bottom: 24px !important; height: auto !important; }
}
body:not([data-view^="memory-universe"]) #roleSettingsPanel .rs-head { flex-direction: row; flex-wrap: nowrap; align-items: center; justify-content: flex-start; padding: 0; background: none; box-shadow: none; }
body:not([data-view^="memory-universe"]) #roleSettingsPanel .rs-head > div { min-width: 0; }
body:not([data-view^="memory-universe"]) #roleSettingsPanel .rs-portrait { width: 68px; height: 68px; border-radius: 20px; }
@media(max-width:760px) {
  body:not([data-view^="memory-universe"]) .rs-save-bar { bottom: calc(88px + env(safe-area-inset-bottom)); }
}
/* Owner-selected U1 composition: preserve the approved hierarchy and spacing,
   binding the existing element IDs to it rather than retaining the old grid. */
body:not([data-view^="memory-universe"]) .welcome-row.home-intro { display: none; }
body:not([data-view^="memory-universe"]) #welcomeTitle { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
.site-page-title { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin: 0 0 25px; }
.site-page-title .eyebrow { font-size: 10px; color: #716a75; letter-spacing: 1.5px; margin: 0 0 10px; }
.site-page-title h1 { font: 500 32px "Songti SC","STSong",serif; letter-spacing: 1px; margin: 0; }
.site-page-title p:last-child { font-size: 12px; line-height: 1.8; color: #716a75; margin: 9px 0 0; }
.site-quiet-link { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; min-height: 44px; border: 0; background: none; font-size: 11px; color: #716a75; }
#homePanel svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
body:not([data-view^="memory-universe"]) #homePanel .home-layout { display: block; }
body:not([data-view^="memory-universe"]) #homePanel .home-hero { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(200px,.75fr); align-items: center; position: relative; top: auto; min-height: 340px; padding: 37px 40px; border: 1px solid #e4dce4; border-radius: 24px; background: linear-gradient(110deg,#fffdfa,#f0eaf4); overflow: hidden; box-shadow: none; }
body:not([data-view^="memory-universe"]) #homePanel .home-hero::after { display: none; }
body:not([data-view^="memory-universe"]) #homePanel .character-copy { position: relative; inset: auto; padding: 0; z-index: 1; color: #302d38; }
body:not([data-view^="memory-universe"]) #homePanel .character-copy h2 { font: 500 44px "Songti SC","STSong",serif; letter-spacing: 2px; color: #302d38; text-shadow: none; margin: 19px 0 13px; }
body:not([data-view^="memory-universe"]) #homePanel .site-role-tag { display: inline-flex; padding: 5px 9px; border: 1px solid #e2dce2; border-radius: 20px; font-size: 10px; color: #716a75; background: #ffffff88; margin: 0; }
body:not([data-view^="memory-universe"]) #homePanel .role-tagline { max-width: 330px; font-size: 13px; line-height: 1.8; color: #716a75; margin: 0 0 23px; text-shadow: none; }
body:not([data-view^="memory-universe"]) #homePanel .hero-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
body:not([data-view^="memory-universe"]) #homePanel .hero-actions button { display: inline-flex; justify-content: center; align-items: center; gap: 10px; flex: none; min-height: 44px; padding: 11px 19px; border-radius: 11px; font-size: 12px; font-weight: 500; white-space: nowrap; }
body:not([data-view^="memory-universe"]) #homePanel .hero-actions .ghost { border: 1px solid #e8e1e5; background: #fffefd; color: #302d38; backdrop-filter: none; }
.site-portrait-wrap { position: relative; display: grid; place-items: center; align-self: stretch; min-width: 0; }
.site-portrait-halo { position: absolute; width: 270px; height: 270px; border-radius: 50%; background: #ffffff88; border: 1px solid #fff; box-shadow: 0 0 0 20px #ffffff26; }
body:not([data-view^="memory-universe"]) #homePanel .character-art { position: relative; width: 216px; height: 216px; min-height: 0; margin: 0; border-radius: 50%; object-fit: cover; border: 7px solid #ffffff99; background: #eee8f1; box-shadow: 0 15px 30px #62506f15; }
body:not([data-view^="memory-universe"]) #homePanel .home-side { display: block; }
.site-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 30px 0 15px; }
.site-section-head h3 { font-family: inherit; font-weight: 500; font-size: 16px; margin: 0; }
.site-section-head > span { color: #716a75; font-size: 10px; letter-spacing: 1px; }
.site-home-records { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 15px; }
body:not([data-view^="memory-universe"]) #homePanel .home-together { padding: 0; border: 0; background: none; box-shadow: none; margin: 0; }
body:not([data-view^="memory-universe"]) #homePanel .home-trace { display: flex; flex-direction: column; align-items: stretch; width: 100%; min-width: 0; text-align: left; gap: 0; padding: 22px; margin: 0; border: 1px solid #e8e1e5; border-radius: 18px; background: #fffefd; color: #302d38; box-shadow: none; }
body:not([data-view^="memory-universe"]) #homePanel .home-trace:disabled { opacity: 1; cursor: default; }
.site-card-icon { width: 35px; height: 35px; display: grid; place-items: center; color: #88718b; background: #f4f0f3; border-radius: 11px; margin-bottom: 20px; }
#homePanel .site-card-icon svg { width: 18px; height: 18px; }
body:not([data-view^="memory-universe"]) #homePanel .home-trace-label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 10px; }
body:not([data-view^="memory-universe"]) #homePanel .home-trace-text { font-size: 12px; line-height: 1.8; color: #716a75; margin: 0 0 15px; min-height: 44px; }
body:not([data-view^="memory-universe"]) #homePanel .home-trace-link { display: block; font-size: 11px; color: #716a75; min-height: 24px; margin-top: auto; }
body:not([data-view^="memory-universe"]) #homePanel .home-quick { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 15px; margin-top: 20px; }
body:not([data-view^="memory-universe"]) #homePanel .home-bind-card { margin-top: 20px; }
@media(min-width:1100px) {
  body:not([data-view^="memory-universe"]) .site-nav { inset: 0 auto 0 0; bottom: 0 !important; width: 218px; height: 100dvh !important; padding: 112px 17px 17px; border: 0; border-right: 1px solid #e8e1e5; border-radius: 0; background: #f5f1ee; }
  body:not([data-view^="memory-universe"]):has(#appView:not([hidden])) .topbar { max-width: none; margin-left: 218px; width: calc(100% - 218px); height: 78px; padding: 0 38px; border-bottom: 1px solid #e8e1e5; }
  body:not([data-view^="memory-universe"]):has(#appView:not([hidden])) .topbar .brand { position: fixed; top: 28px; left: 24px; z-index: 41; gap: 10px; }
  body:not([data-view^="memory-universe"]) .site-nav button { font-size: 13px; min-height: 49px; padding: 11px 17px; border-radius: 12px; }
  body:not([data-view^="memory-universe"]):has(#appView:not([hidden])) .shell { max-width: 1580px; padding-top: 24px; padding-left: 280px; padding-right: 62px; }
  body:has(#webChatPanel.active):not([data-view^="memory-universe"]) .shell { padding: 0; }
}
@media(max-width:1100px) {
  body:not([data-view^="memory-universe"]) #homePanel .home-hero { padding: 30px; grid-template-columns: minmax(0,1fr) 205px; }
  body:not([data-view^="memory-universe"]) #homePanel .character-copy h2 { font-size: 37px; }
  body:not([data-view^="memory-universe"]) #homePanel .character-art { width: 175px; height: 175px; }
  .site-portrait-halo { width: 225px; height: 225px; }
}
@media(max-width:760px) {
  .site-page-title { margin-bottom: 21px; gap: 10px; }
  .site-page-title h1 { font-size: 27px; }
  .site-page-title p:last-child { font-size: 11px; }
  .site-page-title > .site-quiet-link { font-size: 10px; padding: 10px 0; }
  body:not([data-view^="memory-universe"]) #homePanel .home-hero { grid-template-columns: minmax(0,1fr); padding: 26px 25px 24px; min-height: 440px; gap: 12px; border-radius: 21px; }
  body:not([data-view^="memory-universe"]) #homePanel .character-copy { order: 2; }
  body:not([data-view^="memory-universe"]) #homePanel .character-copy h2 { font-size: 34px; letter-spacing: 1px; margin: 15px 0 9px; }
  body:not([data-view^="memory-universe"]) #homePanel .role-tagline { font-size: 12px; max-width: none; margin-bottom: 18px; }
  .site-portrait-wrap { order: 1; min-height: 166px; }
  body:not([data-view^="memory-universe"]) #homePanel .character-art { width: 154px; height: 154px; }
  .site-portrait-halo { width: 180px; height: 180px; box-shadow: 0 0 0 12px #ffffff26; }
  body:not([data-view^="memory-universe"]) #homePanel .hero-actions button { flex: 0 1 auto; padding-inline: 17px; }
  .site-home-records { grid-template-columns: minmax(0,1fr); gap: 12px; }
  body:not([data-view^="memory-universe"]) #homePanel .home-trace { position: relative; padding: 20px 20px 17px; }
  .site-card-icon { position: absolute; right: 19px; top: 18px; width: 31px; height: 31px; margin: 0; }
  body:not([data-view^="memory-universe"]) #homePanel .home-trace-label { padding-right: 45px; margin-bottom: 8px; }
  body:not([data-view^="memory-universe"]) #homePanel .home-trace-text { min-height: 0; margin-bottom: 3px; }
  body:not([data-view^="memory-universe"]) #homePanel .home-quick { grid-template-columns: minmax(0,1fr); gap: 12px; }
}
@media(max-width:350px) {
  .site-page-title h1 { font-size: 24px; }
  .site-page-title > .site-quiet-link { font-size: 9px; }
  body:not([data-view^="memory-universe"]) #homePanel .home-hero { padding-inline: 20px; }
  body:not([data-view^="memory-universe"]) #homePanel .character-copy h2 { font-size: 31px; }
}
/* Override the legacy shell's width subtraction; U1 defines spacing in padding. */
body:not([data-view^="memory-universe"]) .shell { width: 100%; margin: 0 auto; }
@media(max-width:760px) {
  body:not([data-view^="memory-universe"]) .shell { padding: 26px 20px 108px; }
}
@media(max-width:350px) {
  body:not([data-view^="memory-universe"]) .shell { padding-inline: 15px; }
}
body:not([data-view^="memory-universe"]) #appView::before,
body:not([data-view^="memory-universe"]) #appView::after { display: none; }
.site-nav svg { display: block; width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
@media(min-width:1100px) {
  body:not([data-view^="memory-universe"]):has(#appView:not([hidden])) .topbar { justify-content: flex-end; }
}
/* U2 refinement: a role space first, the compact picker is a secondary page. */
.site-role-header { display: flex; align-items: center; gap: 21px; padding: 7px 0 28px; }
.site-role-header > img { width: 87px; height: 87px; object-fit: cover; border: 4px solid #fff; border-radius: 25px; }
.site-role-header > div:not(.site-actions) { min-width: 0; flex: 1; }
.site-role-header h2 { font: 500 32px "Songti SC","STSong",serif; margin: 0 0 7px; }
.site-role-header p { font-size: 12px; color: #716a75; margin: 0; line-height: 1.8; }
.site-role-header .eyebrow { font-size: 10px; letter-spacing: 1.5px; margin-bottom: 8px; }
.site-role-tabs { display: flex; gap: 29px; border-bottom: 1px solid #e8e1e5; margin: 0 0 26px; }
.site-role-tabs > :is(button,span) { display: inline-flex; align-items: center; min-height: 44px; padding: 13px 1px; color: #716a75; font-size: 13px; font-family: inherit; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; }
.site-role-tabs > [aria-selected="true"],.site-role-tabs > [aria-current] { color: #892d42; border-bottom-color: #892d42; }
.site-overview-grid { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(240px,1fr); gap: 18px; }
body:not([data-view^="memory-universe"]) .site-info-card { padding: 22px; box-shadow: none; border-radius: 18px; }
.site-info-card > h3 { font: 500 24px "Songti SC","STSong",serif; margin: 0 0 13px; }
.site-info-card > p:not(.eyebrow) { font-size: 13px; line-height: 2; color: #716a75; }
.site-info-card .eyebrow { font-size: 10px; letter-spacing: 1.5px; color: #716a75; margin: 0 0 12px; }
.site-list > :is(button,div) { display: flex; align-items: center; gap: 13px; width: 100%; min-height: 76px; padding: 17px 0; text-align: left; color: #302d38; border: 0; border-top: 1px solid #efeaed; border-radius: 0; background: none; }
.site-list > :first-child { border-top: 0; }
.site-list > :is(button,div) > span:first-child { min-width: 0; flex: 1; }
.site-list strong { display: block; font-size: 12px; font-weight: 500; }
.site-list small { display: block; color: #716a75; font-size: 10px; line-height: 1.8; margin-top: 5px; }
.site-list > button > span:last-child { color: #a79aa4; }
.site-list > button:hover { color: #892d42; }
.site-pills { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 18px; }
.site-pills span,.site-planned { border: 1px solid #e8e1e5; border-radius: 20px; padding: 6px 10px; color: #716a75; font-size: 10px; }
#rolePickerPanel #roleGrid { display: block; width: 100%; max-width: none; }
#rolePickerPanel .role-contact { display: grid; grid-template-columns: repeat(auto-fill,minmax(96px,1fr)); gap: 20px 12px; overflow: visible; width: 100%; padding: 22px 0; margin: 0; }
#rolePickerPanel .role-still { display: flex; flex-direction: column; align-items: center; justify-content: start; gap: 10px; width: 100%; min-width: 0; padding: 10px 6px; border: 1px solid transparent; border-radius: 18px; background: transparent; }
#rolePickerPanel .role-still[aria-selected="true"] { background: #f3e9ee; border-color: #d9bac8; }
#rolePickerPanel .role-still-frame { display: grid; place-items: center; width: 64px; height: 64px; min-height: 0; border-radius: 50%; overflow: hidden; border: 3px solid #fff; background: #eee7ed; }
#rolePickerPanel .role-still-frame img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
#rolePickerPanel .role-still small { width: 100%; white-space: normal; overflow: visible; text-overflow: clip; text-align: center; line-height: 1.6; font-size: 12px; }
#rolePickerPanel .role-still::before,#rolePickerPanel .role-still::after { display: none; }
.site-picker-detail { display: flex; align-items: center; gap: 24px; padding: 24px; border: 1px solid #e8e1e5; background: #fffefd; border-radius: 18px; }
.site-picker-detail > div:first-child { flex: 1; min-width: 0; }
.site-picker-detail h3 { font-size: 22px; margin: 0 0 10px; }
.site-picker-detail p { color: #716a75; font-size: 13px; line-height: 1.8; }
.site-picker-detail small { font-size: 11px; color: #716a75; }
.site-picker-detail .role-spread-actions { margin: 0; padding: 0; }
body:not([data-view^="memory-universe"]) #deviceDetail { display: block; max-width: 1000px; margin: 0 auto; }
body:not([data-view^="memory-universe"]) .dp-hero { position: static; margin-bottom: 18px; padding: 22px; }
body:not([data-view^="memory-universe"]) .dp-status { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; width: 100%; }
body:not([data-view^="memory-universe"]) .dp-online { margin: 0; flex: 1; }
body:not([data-view^="memory-universe"]) .dp-role { width: auto; min-width: 220px; margin: 0; }
body:not([data-view^="memory-universe"]) .dp-quota { width: 220px; margin: 0; }
body:not([data-view^="memory-universe"]) .site-device-resources > summary { cursor: pointer; min-height: 44px; font-size: 15px; }
@media(max-width:1100px) { .site-overview-grid { grid-template-columns: minmax(0,1fr); } }
@media(max-width:760px) {
  .site-role-header { flex-wrap: wrap; gap: 13px; padding-bottom: 22px; }
  .site-role-header > img { width: 68px; height: 68px; border-radius: 19px; }
  .site-role-header h2 { font-size: 28px; }
  .site-role-header .site-actions { width: 100%; }
  .site-role-header .site-actions button { flex: 1; }
  .site-role-tabs { gap: 28px; margin-bottom: 20px; }
  .site-overview-grid { gap: 14px; }
  .site-picker-detail { flex-direction: column; align-items: stretch; gap: 10px; padding: 20px; }
  #rolePickerPanel .role-contact { grid-template-columns: repeat(auto-fill,minmax(80px,1fr)); gap: 10px 6px; }
  body:not([data-view^="memory-universe"]) .dp-status { align-items: stretch; flex-direction: column; }
  body:not([data-view^="memory-universe"]) .dp-role { min-width: 0; width: 100%; }
}
.site-list-icon { width: 19px; height: 19px; flex-shrink: 0; fill: none; stroke: #9a819b; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.site-list > :is(button,div) > span:not(:last-child) { min-width: 0; flex: 1; }
body:not([data-view^="memory-universe"]) .dp-hero { display: block; }

/* Reserved relationship surface; do not invent metrics or repeat record links. */
#siteTogether { min-height: 240px; }

/* Chat is a primary destination. Keep global navigation reachable on desktop;
   its inner sidebar continues to own conversation history only. */
@media(min-width:1100px) {
  body:has(#webChatPanel.active):not([data-view^="memory-universe"]) > .shell { width: calc(100% - 218px); max-width: none; margin: 0 0 0 218px; padding: 0; }
  body:has(#webChatPanel.active):not([data-view^="memory-universe"]) .site-nav { padding-top: 112px; }
}

/* Keep the same brand footprint when chat's immersive header is hidden. */
.site-chat-brand { display: none; }
.site-nav button,.site-nav button:active,.site-nav button.active span { animation: none; transform: none; }
@media(min-width:1100px) {
  body:has(#webChatPanel.active):not([data-view^="memory-universe"]) .site-chat-brand { display: inline-flex; position: absolute; top: 28px; left: 24px; gap: 10px; }
}

/* Keep quick switching next to the portrait without covering low-res artwork. */
.site-portrait-wrap { align-content: center; gap: 12px; }
.site-portrait-image { position: relative; display: grid; place-items: center; width: 100%; min-height: 270px; }
body:not([data-view^="memory-universe"]) #homePanel .home-hero .site-portrait-switch { position: relative; justify-self: center; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 18px; border: 1px solid #e4dce4; border-radius: 12px; background: #fffefd; color: var(--accent, #892d42); font-size: 13px; }
body:not([data-view^="memory-universe"]) #homePanel .home-hero .site-portrait-switch:hover { background: #f7eef1; }
.site-portrait-switch:focus-visible { outline: 2px solid var(--accent, #892d42); outline-offset: 4px; }
@media(max-width:1100px) { .site-portrait-image { min-height: 225px; } }
@media(max-width:760px) { .site-portrait-image { min-height: 180px; } }
