/* Sanctuary: a cinematic environment with an immediately usable workspace. */
:root { --experience-ease: cubic-bezier(.2,.75,.25,1); }
body { background: #080c10; }
.sidebar {
  background: radial-gradient(ellipse at 0 0, #51483b1c, transparent 47%), linear-gradient(105deg, #191c1e, #101518 66%, #0b1014);
  box-shadow: inset -4px 0 8px #0005, 14px 0 42px #0004;
}
.sidebar::before { opacity: .026; }
.sidebar::after { background: linear-gradient(transparent, rgb(var(--cabin-rgb) / .56) 15%, rgb(var(--cabin-rgb) / .14) 65%, transparent); }
.identity-mark { background: linear-gradient(142deg,#c8c8bf,#555e61 10%,#202a2e 14%,#0c1419 68%,#495457 95%,#bbbcb1); }
.identity-sub { font-size: 7px; letter-spacing: .13em; color: #9a9c95; }
.new-chat { border-color: #e9e8deb3; background: linear-gradient(115deg,#e6e0d3,#cbc6ba 34%,#b5b7ae 75%,#d5d6cc); box-shadow: inset 0 1px #fff9,inset 0 -2px #505f5829,0 7px 18px #0007; }
.studio-nav-item > .ui-icon:first-child { border-color: #c1c6bd32; background: linear-gradient(145deg,#3f464555,#0b1319 80%); box-shadow: inset 0 1px #e7e1ca19,inset 0 -1px #0009,0 3px 6px #0005; }
.access-panel { background: linear-gradient(132deg,#303531,#1e2828 42%,#121d22 78%,#25302e); border-color: #b8b6a565; box-shadow: inset 0 1px #e9dfc530,inset 0 -1px #000a,0 10px 30px #0006; }
.topbar { background: linear-gradient(180deg,#171d1fee,#0b1216f2); box-shadow: 0 4px 20px #0003; }
.topbar-right { gap: 10px; }
.immersive-trigger { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 7px 10px; min-height: 34px; background: transparent; border: 1px solid #b4b7a521; border-radius: 7px; color: #bfc6bf; font-size: 10px; white-space: nowrap; }
.immersive-trigger .ui-icon { width: 14px; height: 14px; }
.immersive-trigger:hover,.immersive-trigger[aria-pressed="true"] { color: var(--cabin-accent); border-color: rgb(var(--cabin-rgb) / .48); background: rgb(var(--cabin-rgb) / .05); }

.chat-surface:has(.empty-state:not([hidden])) { padding: 72px 40px 28px; background: #080e14; justify-content: center; }
.chat-surface { scrollbar-width: thin; scrollbar-color: #aebbb142 transparent; }
.chat-surface:has(.empty-state:not([hidden]))::before,.chat-surface:has(.empty-state:not([hidden]))::after { content: none; }
.scene-stage { position: absolute; z-index: -1; pointer-events: none; inset: 0; overflow: hidden; isolation: isolate; background: #080e14; }
.scene-art { position: absolute; inset: -16px; background-position: center 43%; background-size: cover; background-repeat: no-repeat; transform: translate3d(var(--scene-x,0px),var(--scene-y,0px),0) scale(1.025); transition: opacity 1s var(--experience-ease),transform 1.5s var(--experience-ease); }
.scene-portal,.scene-sanctum { background-image: none; opacity: 0; }
body:not([data-world="sanctum"]) .scene-portal { background-image: url('/hero-sanctuary-v16.png'); opacity: .88; }
.scene-stage::after { content: ''; position: absolute; inset: 0; background: linear-gradient(#070d1333,transparent 22%,#080e1410 42%,#080e1466 70%,#080e14e8 100%); }
body[data-world="sanctum"] .scene-sanctum { background-image: url('/hero-sanctum-v13.png'); opacity: .88; }
body[data-scene="balanced"] .scene-stage { opacity: .68; }
body[data-scene="quiet"] .scene-stage { opacity: .25; }
.scene-atmosphere { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 42%,transparent 25%,#02090d40 80%),radial-gradient(ellipse at 50% 66%,#b9ddf012,transparent 32%); }
.scene-horizon { position: absolute; width: 50%; height: 1px; bottom: 19%; left: 25%; background: linear-gradient(90deg,transparent,#d7eaf330,transparent); box-shadow: 0 0 26px 5px #aecdd30c; }
.experience-toolbar { position: absolute; top: 25px; left: 38px; right: 38px; display: flex; align-items: center; justify-content: space-between; gap: 14px; z-index: 1; }
.experience-edition { display: inline-flex; align-items: center; gap: 10px; font-size: 8px; letter-spacing: .22em; font-weight: 500; color: #c2c4bb; }
.experience-edition i { display: block; width: 4px; height: 4px; border: 1px solid var(--cabin-accent); transform: rotate(45deg); }
.experience-edition > span { color: #828f95; letter-spacing: .15em; }
.experience-scenes { display: flex; padding: 3px; gap: 3px; background: #050c11a1; border: 1px solid #d5dcc129; border-radius: 999px; box-shadow: inset 0 1px #fff07,0 3px 12px #0003; backdrop-filter: blur(18px); }
.experience-scenes button { display: inline-flex; align-items: center; gap: 7px; min-height: 29px; padding: 5px 12px; font-size: 10px; letter-spacing: .06em; border: 1px solid transparent; border-radius: 999px; color: #a0abae; background: none; }
.experience-scenes button[aria-pressed="true"] { color: #e5e1d5; border-color: #c4c7b134; background: linear-gradient(130deg,#89938424,#89938408); box-shadow: inset 0 1px #f4f1de10; }
.experience-scenes button:hover { color: #f3ecda; }
.world-dot { width: 10px; height: 10px; display: block; border: 1px solid #c5c6b2b8; }
.portal-dot { border-radius: 50%; box-shadow: inset 0 0 3px #dbe7e640,0 0 4px #dbe7e620; }
.sanctum-dot { border-radius: 1px; width: 7px; border-right-color: #f2eddf; }
.chat-surface:has(.empty-state:not([hidden])) .empty-state { width: min(100%,860px); padding: 0 0 32px; }
.hero-sigil { display: flex; align-items: center; justify-content: center; gap: 17px; margin-bottom: 19px; }
.hero-sigil > span { width: 32px; height: 1px; background: linear-gradient(90deg,transparent,#d8c8a768); }
.hero-sigil > span:last-child { transform: rotate(180deg); }
.hero-sigil .ui-icon { width: 21px; height: 25px; color: #d6d5c9; filter: drop-shadow(0 2px 8px #d4e9ed33); }
.empty-state .hero-eyebrow { font-size: 10px; margin: 0 0 23px; letter-spacing: .28em; font-weight: 400; color: #e6d7b8; text-shadow: 0 2px 15px #000; }
.empty-state .hero-eyebrow::before { display: none; }
.empty-state .hero-eyebrow span { color: #c3cbd0; letter-spacing: .2em; }
.empty-state h1 { font-size: clamp(56px,5.5vw,82px); line-height: 1.16; font-weight: 500; letter-spacing: -.055em; margin: 0 0 22px; color: #f4f0e5; text-shadow: 0 5px 35px #0008; }
.empty-state h1 span { background: linear-gradient(115deg,#a6bdcb 8%,#ebede8 34%,#e9dfcc 65%,#c2ab83 93%); background-clip: text; -webkit-background-clip: text; color: transparent; text-shadow: none; }
.empty-state .hero-description { width: 100%; max-width: none; margin-inline: auto; text-align: center; font-size: 13px; letter-spacing: .12em; color: #c5ccd0; text-shadow: 0 2px 12px #000; }
.hero-actions { gap: 19px; margin-top: 24px; }
.hero-explore { gap: 16px; min-height: 41px; padding: 11px 18px; font-size: 11px; font-weight: 450; color: #ede5d2; border-color: #d0c7af78; background: linear-gradient(135deg,#96927c24,#10202b9e 74%); box-shadow: inset 0 1px #e8dfc431,0 4px 14px #0006; backdrop-filter: blur(18px); }
.hero-explore .ui-icon { width: 14px; height: 14px; }
.hero-action-note { font-size: 10px; letter-spacing: .08em; color: #adb7b8; }
.chat-surface:has(.empty-state:not([hidden])) .composer-dock { position: relative; max-width: 800px; margin-inline: auto; }
.composer { background: linear-gradient(120deg,#283137d9,#15212aeb 52%,#101a23f0); border-color: #b9c0ba75; box-shadow: inset 0 1px #f2f2df1f,inset 0 -1px #000b,0 18px 55px #0009,0 1px 0 3px #071017aa; backdrop-filter: blur(28px); }
.composer::before { opacity: .035; }
.composer::after { left: 4%; right: 4%; background: linear-gradient(90deg,transparent,#d8d4baad 28%,#e5efebd6 52%,#abc9d18c 78%,transparent); box-shadow: 0 2px 9px #d5decd23; }
.composer-head { letter-spacing: .16em; }
.composer textarea::placeholder { color: #aab8c0; }
.model-picker { background: linear-gradient(140deg,#d5e2da10,#0a151c87); border-color: #b5c3c144; }
.quick-actions { gap: 9px; margin-top: 17px; }
.quick-actions button { min-height: 33px; border-color: #bec7be28; background: #111c2385; color: #b3c0c5; padding: 7px 10px; font-size: 10px; border-radius: 6px; backdrop-filter: blur(15px); }
.inspiration-card { display: flex; align-items: center; gap: 17px; max-width: 800px; margin: 22px auto 0; padding: 18px 21px; border: 1px solid #c7cab32c; border-radius: 12px; background: linear-gradient(105deg,#63736c14,#15232c8c 48%,#0d1a2275); box-shadow: inset 0 1px #e5ead308,0 8px 25px #0002; backdrop-filter: blur(20px); text-align: left; }
.inspiration-emblem { flex: 0 0 43px; width: 43px; height: 43px; display: grid; place-items: center; border-radius: 50%; border: 1px solid #c4c9b747; background: radial-gradient(circle at 30% 20%,#b7bea417,#07131e80 70%); box-shadow: inset 0 0 0 4px #d9dacb05,inset 0 1px #e7e1cc20; }
.inspiration-emblem .ui-icon { width: 23px; height: 23px; color: #c7c6b4; stroke-width: 1; }
.inspiration-copy { min-width: 0; flex: 1; }
.inspiration-eyebrow { color: #b6b19d; font-size: 8px; letter-spacing: .15em; }
.inspiration-eyebrow span { color: #7f939b; font-size: 7px; letter-spacing: .12em; margin-left: 9px; }
.inspiration-copy h2 { color: #dfdfd4; font-size: 13px; font-weight: 450; margin: 6px 0 4px; letter-spacing: .02em; }
.inspiration-copy p { color: #8f9fa7; font-size: 10px; margin: 0; line-height: 1.5; }
.inspiration-actions { display: flex; align-items: center; gap: 10px; }
.inspiration-actions button { min-height: 34px; background: none; border: 1px solid transparent; color: #c9cbbd; border-radius: 6px; }
#inspiration-shuffle { width: 34px; display: grid; place-items: center; color: #8da0a9; }
#inspiration-shuffle .ui-icon { width: 15px; height: 15px; }
#inspiration-use { display: inline-flex; align-items: center; gap: 10px; padding: 7px 11px; font-size: 10px; border-color: #a1b2af3b; white-space: nowrap; }
#inspiration-use .ui-icon { width: 13px; height: 13px; }
.inspiration-actions button:hover { color: #e4d6b8; border-color: #c6b58d7a; background: #bfbda00a; }
.composer-note { font-size: 9px; color: #8b9da7; margin-top: 15px; }
.chat-surface:has(.empty-state[hidden]) .scene-stage,.chat-surface:has(.empty-state[hidden]) .experience-toolbar,.chat-surface:has(.empty-state[hidden]) .inspiration-card { display: none; }
body.experience-immersive .sidebar { display: none; }
body.experience-immersive .app-shell { grid-template-columns: minmax(0,1fr); }
body.experience-immersive .topbar #toggle-sidebar,body.experience-immersive .topbar #show-sidebar { display: none; }
body.experience-immersive .topbar { padding-inline: max(30px,calc((100vw - 1280px) / 2)); }
body.experience-immersive .scene-art { background-position: center 48%; }
body.experience-immersive .experience-toolbar { left: max(38px,calc((100vw - 1280px) / 2)); right: max(38px,calc((100vw - 1280px) / 2)); }

@media (prefers-reduced-motion: no-preference) {
  body:not([data-reduced-motion="true"]) .scene-stage { animation: sanctuary-arrive 1.6s var(--experience-ease) both; }
  body:not([data-reduced-motion="true"]) .hero-sigil { animation: sanctuary-rise 1.1s .1s var(--experience-ease) both; }
  body:not([data-reduced-motion="true"]) .hero-eyebrow { animation: sanctuary-rise 1.1s .16s var(--experience-ease) both; }
  body:not([data-reduced-motion="true"]) .empty-state h1 { animation: sanctuary-rise 1.2s .22s var(--experience-ease) both; }
  body:not([data-reduced-motion="true"]) .hero-description,body:not([data-reduced-motion="true"]) .hero-actions { animation: sanctuary-rise 1.1s .32s var(--experience-ease) both; }
  body:not([data-reduced-motion="true"]) .chat-surface:has(.empty-state:not([hidden])) .composer-dock { animation: sanctuary-rise 1.2s .4s var(--experience-ease) both; }
  .inspiration-actions button,.experience-scenes button,.immersive-trigger { transition: color .25s,border-color .25s,background .25s; }
  @keyframes sanctuary-arrive { from { opacity: 0; filter: brightness(.5); } to { filter: brightness(1); } }
  @keyframes sanctuary-rise { from { opacity: 0; translate: 0 14px; } to { opacity: 1; translate: 0 0; } }
}
@media (prefers-reduced-motion: reduce) { .scene-art { transition: none; transform: none; } }
body[data-reduced-motion="true"] .scene-art { transition: none; transform: none; }
@media (max-width: 1150px) and (min-width: 761px) {
  .topbar { padding-inline: 20px; }
  .topbar-right { gap: 6px; }
  .topbar-context .topbar-overline { display: none; }
  .topbar-context .topbar-title::before { content: none; }
  .chat-surface:has(.empty-state:not([hidden])) { padding-inline: 28px; }
  .empty-state h1 { font-size: 66px; }
  .hero-action-note { display: none; }
  .inspiration-card { gap: 13px; padding-inline: 16px; }
  .inspiration-eyebrow span { display: none; }
}
@media (max-height: 820px) and (min-width: 761px) {
  .chat-surface:has(.empty-state:not([hidden])) { padding-top: 61px; padding-bottom: 12px; justify-content: flex-start; }
  .experience-toolbar { top: 16px; }
  .chat-surface:has(.empty-state:not([hidden])) .empty-state { padding: 0 0 20px; }
  .hero-sigil { display: none; }
  .empty-state .hero-eyebrow { margin-bottom: 14px; font-size: 9px; }
  .empty-state h1 { font-size: 53px; margin-bottom: 14px; }
  .empty-state .hero-description { font-size: 11px; }
  .hero-actions { margin-top: 17px; }
  .hero-explore { min-height: 36px; padding-block: 8px; }
  .composer { padding-top: 15px; padding-bottom: 13px; }
  .composer-head { margin-bottom: 12px; }
  .composer textarea { min-height: 44px; font-size: 14px; }
  .composer-controls { padding-top: 11px; }
  .quick-actions { margin-top: 13px; }
  .inspiration-card { margin-top: 14px; padding-block: 10px; }
  .inspiration-copy p { display: none; }
  .composer-note { margin-top: 11px; }
}
@media (max-width: 760px) {
  .topbar { padding-inline: 14px; }
  .topbar-left { gap: 8px; }
  .topbar-right { gap: 6px; }
  .immersive-trigger { width: 31px; min-height: 31px; padding: 6px; }
  .immersive-trigger [data-immersive-label] { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
  .ambience-trigger { padding: 6px; width: 31px; justify-content: center; }
  .ambience-trigger > span:last-child { display: none; }
  .chat-surface:has(.empty-state:not([hidden])) { padding: 83px 18px 22px; justify-content: flex-start; }
  .scene-art { background-position: center top; background-size: auto 780px; }
  .scene-stage::after { background: linear-gradient(#080e141a,transparent 25%,#080e1455 55%,#080e14 90%); }
  .experience-toolbar { top: 20px; left: 19px; right: 19px; gap: 8px; }
  .experience-edition { font-size: 7px; gap: 7px; letter-spacing: .14em; }
  .experience-edition > span { display: none; }
  .experience-scenes { padding: 2px; }
  .experience-scenes button { min-height: 28px; padding: 5px 9px; font-size: 9px; gap: 5px; }
  .chat-surface:has(.empty-state:not([hidden])) .empty-state { padding: 8px 0 27px; }
  .hero-sigil { margin-bottom: 19px; gap: 14px; }
  .hero-sigil .ui-icon { width: 17px; height: 21px; }
  .hero-sigil > span { width: 24px; }
  .empty-state .hero-eyebrow { font-size: 8px; margin-bottom: 20px; letter-spacing: .2em; }
  .empty-state h1 { font-size: clamp(40px,12vw,56px); line-height: 1.2; margin-bottom: 18px; }
  .empty-state .hero-description { font-size: 11px; letter-spacing: .07em; }
  .hero-actions { margin-top: 22px; gap: 14px; }
  .hero-explore { min-height: 37px; padding: 9px 13px; font-size: 10px; gap: 11px; }
  .hero-action-note { font-size: 9px; }
  .composer { padding: 15px 13px 12px; }
  .composer textarea { font-size: 13px; min-height: 55px; }
  .composer-head { font-size: 8px; margin-bottom: 12px; }
  .quick-actions { gap: 6px; margin-top: 16px; }
  .quick-actions button { flex: 0 0 calc((100% - 12px) / 3); padding: 7px 5px; font-size: 9px; gap: 5px; min-height: 32px; }
  .quick-actions button:nth-child(n) { padding-left: 5px; }
  .inspiration-card { margin-top: 20px; padding: 14px; gap: 10px; position: relative; }
  .inspiration-emblem { display: none; }
  .inspiration-eyebrow { font-size: 7px; }
  .inspiration-eyebrow span { display: none; }
  .inspiration-copy h2 { font-size: 11px; margin-top: 5px; margin-bottom: 0; line-height: 1.6; }
  .inspiration-copy p { display: none; }
  .inspiration-actions { gap: 3px; }
  #inspiration-shuffle { width: 27px; }
  #inspiration-shuffle .ui-icon { width: 13px; }
  #inspiration-use { font-size: 9px; gap: 4px; padding-inline: 7px; }
  .composer-note { font-size: 8px; line-height: 1.7; margin-top: 14px; }
  body.experience-immersive .topbar { padding-inline: 14px; }
  body.experience-immersive .scene-art { background-position: center top; }
  body.experience-immersive .experience-toolbar { left: 19px; right: 19px; }
}
@media (max-width: 350px) {
  .topbar-right { gap: 4px; }
  .topbar-title { font-size: 11px; }
  .topbar #export-chat { width: 22px; }
  .chat-surface:has(.empty-state:not([hidden])) { padding-inline: 13px; }
  .experience-edition { font-size: 6px; }
  .experience-scenes button { padding-inline: 8px; }
  .hero-action-note { display: none; }
  .inspiration-card { padding-inline: 10px; gap: 6px; }
  .inspiration-actions { gap: 0; }
}
