:root {
  color-scheme: dark;
  font-family: 'Segoe UI', sans-serif;
  background: #100d12;
  color: #faf1f4;
  --surface: #171219;
  --line: #392b37;
  --muted: #bcaeb8;
  --accent: #f1acc3;
  --pink: #edabc2;
  --display: Georgia, 'Times New Roman', serif;
  font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 280px; background: radial-gradient(ellipse at 45% -20%, #382130 0%, transparent 48%); }
button, input { color: inherit; font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }

.shell { max-width: 1240px; margin: 0 auto; padding: 0 34px; }
.topbar { height: 82px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.brand { justify-self: start; display: flex; align-items: center; gap: 10px; color: #fff5f9; text-decoration: none; font: italic 2rem/1 var(--display); letter-spacing: -.08em; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid #794e67; border-radius: 50%; background: #271923; color: var(--accent); font: 1.1rem/1 'Segoe UI Symbol', sans-serif; letter-spacing: 0; }
.tabs { display: flex; gap: 3px; padding: 4px; background: #1b141c; border: 1px solid #382633; border-radius: 99px; }
.tabs button { min-height: 40px; border: 0; border-radius: 99px; background: transparent; padding: 0 20px; color: var(--muted); font-size: .9rem; }
.tabs button:hover, .tabs button[aria-current] { background: #382631; color: #ffe8f1; }
.preview-label { justify-self: end; color: var(--muted); font-size: .85rem; }

.workspace { display: grid; grid-template-columns: 1.12fr 1fr; gap: 16px; --panel-size: clamp(565px, calc(100vh - 136px), 740px); }
.stage, .side-panel { height: var(--panel-size); min-width: 0; border: 1px solid var(--line); border-radius: 24px; }
.stage { position: relative; isolation: isolate; overflow: hidden; background: #2b1820; }
.session-retry { position: fixed; top: 45%; left: 50%; transform: translateX(-50%); padding: 12px 18px; color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.stage-ambient, .stage-art, .portrait, .stage-shade { position: absolute; inset: 0; }
.stage-ambient { background: radial-gradient(ellipse at 55% 34%, #6f4237, #231318 60%, #100d12); }
.portrait, .look-art { overflow: hidden; }
.portrait img, .look-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: center; }
.portrait { background: #160e16; }
.stage-shade { background: linear-gradient(0deg, #100b12 0%, #110c14bf 10%, transparent 43%), linear-gradient(180deg, #100b1270, transparent 24%); pointer-events: none; }
.stage-top { position: absolute; top: 22px; left: 22px; right: 22px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.identity, .stage-outfit, .motion-picker select { background: #160f17d9; border: 1px solid #f4c2d449; border-radius: 99px; backdrop-filter: blur(10px); }
.identity { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; font-size: .85rem; }
.motion-picker select { display: block; max-width: min(38vw, 172px); min-height: 44px; padding: 5px 10px; font: inherit; font-size: .85rem; color: #fff2f8; cursor: pointer; }
.motion-picker select option, .motion-picker select optgroup { color: #fff2f8; background: #211521; }
.identity span, .mini-hanger { color: var(--accent); }
.stage-caption { position: absolute; bottom: 25px; left: 25px; right: 25px; display: flex; justify-content: space-between; align-items: end; gap: 12px; }
.stage h1 { font: 400 italic clamp(3.3rem, 6vw, 5.3rem)/.94 var(--display); margin: 0 0 10px; letter-spacing: -.075em; }
.presence { display: flex; align-items: center; gap: 9px; min-height: 23px; color: #f6dce5; font-size: .92rem; }
.presence-dot { width: 8px; height: 8px; border-radius: 50%; background: #eaaec2; box-shadow: 0 0 11px #eda7c292; }
.stage[data-mood='caring'] .presence-dot { background: #d2badf; }
.stage[data-mood='playful'] .presence-dot, .stage[data-mood='surprised'] .presence-dot { background: #ffce9e; }
.stage[data-speaking='true'] .presence-dot { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.45); opacity: .75; } }
.stage-outfit { min-height: 44px; display: flex; align-items: center; gap: 7px; padding: 6px 13px; font-size: .85rem; }
.stage-outfit:hover { background: #352034; }

.side-panel { display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; overflow: hidden; background: linear-gradient(#1b151d, var(--surface)); }
.panel-header { position: relative; display: flex; justify-content: space-between; align-items: center; padding: 24px 24px 21px; min-height: 96px; border-bottom: 1px solid #332833; }
.panel-header h2 { font: 400 1.85rem/1.1 var(--display); margin: 0 0 5px; letter-spacing: -.03em; }
.panel-header p { color: var(--muted); font-size: .92rem; margin: 0; }
.call-link { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; flex: none; margin-left: auto; min-height: 44px; padding: 7px 14px; color: #321a27; background: var(--pink); border-radius: 99px; text-decoration: none; font-weight: 600; font-size: .9rem; }
.call-link:hover { background: #ffc7db; }
#history-older { display: block; margin: 0 auto 1rem; }
@media (max-width: 380px) { .call-link { padding-inline: 9px; } .panel-header { gap: 4px; } }
.icon-button { display: grid; place-items: center; width: 44px; height: 44px; flex: none; background: transparent; border: 0; border-radius: 50%; color: #e5ccd7; }
.icon-button:hover { background: #382936; }
.settings summary { list-style: none; font-size: 1.8rem; line-height: 1; cursor: pointer; }
.settings summary::-webkit-details-marker { display: none; }
.settings-menu { position: absolute; right: 20px; top: calc(50% + 25px); z-index: 2; padding: 5px; border: 1px solid var(--line); border-radius: 12px; background: #291e29; }
.settings-menu button { background: transparent; border: 0; border-radius: 8px; padding: 10px; text-align: left; }
.settings-menu button:hover { background: #42303d; }
.conversation { overflow-y: auto; overscroll-behavior: contain; padding: 24px 23px 12px; scrollbar-width: thin; scrollbar-color: #634758 transparent; }
.message-row { display: flex; gap: 11px; align-items: flex-start; margin: 0 0 15px; }
.message-row.user { justify-content: flex-end; }
.message-mark { background: #382537; color: var(--pink); width: 30px; height: 30px; display: grid; place-items: center; flex: none; margin-top: 1px; border: 1px solid #593c53; border-radius: 50%; }
.message-content { min-width: 0; max-width: 87%; }
.message-bubble { border-radius: 2px 16px 16px 16px; margin: 0; padding: 11px 14px; background: #2c202d; color: #f7edf0; font-size: 1rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.elise .message-bubble:not(:only-child) { width: fit-content; max-width: 100%; padding-block: 8px; }
.elise .message-bubble + .message-bubble { margin-block-start: 4px; }
.user .message-bubble { background: #512b40; border-radius: 16px 2px 16px 16px; }
.suggestions { display: flex; flex-wrap: wrap; gap: 7px; padding: 6px 23px 12px; }
.suggestions button, .quiet-button { min-height: 40px; border: 1px solid #604252; border-radius: 99px; background: transparent; color: #f2cbd9; padding: 6px 12px; font-size: .875rem; }
.suggestions button:hover, .quiet-button:hover { background: #342533; }
.chat-form { padding: 2px 22px 14px; }
.composer { min-height: 58px; display: flex; gap: 4px; align-items: center; padding: 5px 6px 5px 14px; border: 1px solid #634354; background: #221922; border-radius: 16px; }
.composer:focus-within { border-color: var(--accent); }
.composer input { min-width: 0; width: 100%; align-self: stretch; border: 0; background: transparent; outline: none; font-size: 1rem; }
.composer input::placeholder { color: #bfabb7; }
.send-button { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border: 0; border-radius: 12px; color: #23101b; background: var(--pink); }
.send-button:disabled { background: #b48398; color: #2b1724; }
.send-button:not(:disabled):hover { background: #ffc7db; }
.send-icon { position: relative; display: block; width: 2px; height: 16px; background: currentColor; border-radius: 2px; }
.send-icon::before { content: ''; position: absolute; width: 9px; height: 9px; left: -3.5px; top: 0; border-left: 2px solid; border-top: 2px solid; transform: rotate(45deg); }
.mic-icon { position: relative; display: block; width: 8px; height: 13px; border: 1.5px solid; border-radius: 9px; transform: translateY(-2px); }
.mic-icon::before { content: ''; position: absolute; width: 14px; height: 10px; top: 6px; left: -4.5px; border: 1.5px solid; border-top: 0; border-radius: 0 0 8px 8px; }
.mic-icon::after { content: ''; position: absolute; width: 1.5px; height: 4px; background: currentColor; left: 2px; top: 15px; }
.microphone[aria-pressed='true'] { color: #fff; background: #713952; }
.chat-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 3px 8px; }
.chat-tools p { color: var(--muted); font-size: .81rem; margin: 0; }
.voice-toggle { display: inline-flex; align-items: center; gap: 7px; padding: 6px 0; min-height: 35px; border: 0; background: transparent; color: var(--muted); font-size: .85rem; }
.voice-toggle[aria-pressed='true'] { color: #ffc9dc; }
.voice-toggle:hover { color: #fff3f7; }
.wave-icon { display: flex; align-items: center; gap: 2px; }
.wave-icon i { width: 2px; height: 9px; background: currentColor; border-radius: 2px; }
.wave-icon i:nth-child(2) { height: 14px; }
.wave-icon i:nth-child(4) { height: 5px; }

.options-panel { grid-template-rows: auto minmax(0, 1fr); }
.option-body { padding: 23px; overflow-y: auto; }
.looks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 19px; }
.look { display: grid; width: 100%; min-width: 0; padding: 0; text-align: left; overflow: hidden; color: inherit; background: #221923; border: 1px solid #50394a; border-radius: 15px; }
.look:hover, .look[aria-pressed='true'] { border-color: var(--accent); }
.look-art { position: relative; display: block; aspect-ratio: .86; background: #38242e; }
.look-detail { display: grid; gap: 3px; padding: 10px; }
.look-detail span, .catalog-note { color: var(--muted); font-size: .88rem; }
.topics { display: grid; gap: 10px; }
.topics button { display: flex; align-items: center; gap: 12px; padding: 12px; text-align: left; background: #211823; border: 1px solid #483343; border-radius: 14px; }
.topics button:hover { border-color: var(--accent); }
.topic-icon { flex: 0 0 33px; color: var(--accent); text-align: center; font-size: 1.3rem; }
.topics strong, .topics small { display: block; }
.topics small { margin-top: 3px; color: var(--muted); font-size: .88rem; }
.catalog-note { margin: 19px 0 0; }
.footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 54px; padding: 6px 1px; color: var(--muted); font-size: .82rem; }

[data-live-home] #call-video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
  pointer-events: none; opacity: 0; background: #160e16;
}
[data-live-home] #call-video[data-playing] { opacity: 1; }
#wardrobe-room {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
  background: #160e16; pointer-events: none; visibility: hidden; clip-path: inset(0 100% 0 0);
}
.stage[data-wardrobe-phase] #wardrobe-room { visibility: visible; }
.stage[data-wardrobe-phase='changing'] #wardrobe-room,
.stage[data-wardrobe-phase='recovering'] #wardrobe-room {
  clip-path: inset(0); transition: clip-path .5s ease-in-out;
}
.stage[data-wardrobe-phase='returning'] #wardrobe-room {
  clip-path: inset(0 100% 0 0);
}
#stage[data-room-return='hold'] #wardrobe-room {
  visibility: visible; clip-path: inset(0); transition: none;
}
#stage[data-room-return='reveal'] #wardrobe-room {
  visibility: visible; clip-path: inset(0 100% 0 0); transition: clip-path 1.7s ease-in-out;
}
@media (prefers-reduced-motion: reduce) {
  .stage[data-wardrobe-phase] #wardrobe-room, #stage[data-room-return] #wardrobe-room { transition: none; }
}
[data-live-home] .stage-shade { background: linear-gradient(0deg, #100b12 0, #100b12d1 11%, transparent 37%); }
[data-live-home] .stage-caption { bottom: 54px; }
[data-live-home] .stage-caption h1 { margin: 0; }
.look-caption {
  display: inline-flex; align-items: center; gap: 5px; min-height: 36px; border: 0;
  padding: 4px 0; background: transparent; color: #f6dce5; font-size: .88rem; text-align: left;
}
.look-caption:hover { text-decoration: underline; }
.live-actions { display: flex; flex-wrap: wrap; justify-content: end; align-items: center; gap: 8px; padding-bottom: 4px; }
.live-actions button { min-height: 44px; margin: 0; border: 1px solid transparent; padding: 8px 15px; }
.live-actions button:disabled { opacity: .7; }
.live-actions :is(.end-call, .resume-call) { color: #fff0f6; background: #251621ed; border-color: #a77e94; }
.live-actions :is(.end-call, .resume-call):hover { background: #513246; }
.live-status-bar {
  position: absolute; inset: auto 0 0; min-height: 39px; padding: 9px 20px;
  display: flex; justify-content: space-between; gap: 8px; align-items: center;
  background: #1c131bf0; border-top: 1px solid #6644527d; font-size: .84rem; color: #ebd7e1;
}
.live-status-bar p { margin: 0; }
.live-status-bar #media-info { flex: none; color: #d0b7c4; font-size: .78rem; }
.camera-dot { display: block; border: 1.5px solid #efbfd2; border-radius: 50%; width: 9px; height: 9px; }
#frame-status { color: #fff2f8; }
[data-live-home] .stage:has(#call-video[data-playing]) .look-caption { visibility: hidden; }
[data-live-home] .settings-menu { display: grid; gap: 8px; width: min(248px, calc(100% - 24px)); padding: 14px; z-index: 3; }
.settings-menu label { font-size: .87rem; color: #ead0dc; }
.settings-menu select { min-height: 44px; min-width: 0; border: 1px solid #705164; border-radius: 8px; padding: 6px; background: #1c151c; color: inherit; font: inherit; }
[data-live-home] .chat-tools { justify-content: flex-start; }
[data-live-home] .chat-tools p { margin-block: 6px; }
[data-live-home] .chat-tools p:empty { display: none; }
[data-live-home]:not([data-live]) #call-interrupt { display: none; }
[data-live-home] #call-interrupt { margin-left: auto; min-height: 40px; }
[data-live-home] .microphone:disabled { opacity: .55; }

@media (max-width: 900px) {
  .shell { padding-inline: 20px; }
  .workspace { gap: 12px; }
  .panel-header, .conversation, .suggestions, .chat-form, .option-body { padding-inline: 16px; }
}

@media (max-width: 650px) {
  .shell { padding-inline: 12px; }
  .topbar { height: 64px; grid-template-columns: 1fr auto; gap: 8px; }
  .brand { gap: 6px; font-size: 1.67rem; }
  .brand-mark { width: 29px; height: 29px; font-size: .88rem; }
  .tabs { padding: 3px; }
  .tabs button { padding-inline: 10px; min-height: 37px; font-size: .85rem; }
  .preview-label { display: none; }
  .workspace { grid-template-columns: 1fr; gap: 10px; }
  .stage, .side-panel { border-radius: 19px; }
  .stage { height: clamp(295px, 47svh, 440px); }
  .stage-top { top: 13px; left: 13px; right: 13px; }
  .stage-caption { bottom: 14px; left: 15px; right: 14px; }
  .stage h1 { font-size: 3.55rem; margin-bottom: 6px; }
  .side-panel { height: clamp(360px, 49svh, 540px); }
  .options-panel { height: auto; min-height: 290px; }
  .panel-header { padding-block: 12px; min-height: 72px; }
  .panel-header h2 { font-size: 1.54rem; }
  .panel-header p { font-size: .87rem; }
  .conversation { padding-top: 15px; }
  .suggestions { padding-bottom: 9px; }
  .suggestions button { font-size: .81rem; padding-inline: 9px; }
  .chat-form { padding-bottom: 8px; }
  .look-art { max-height: 220px; }
  .footer { min-height: 44px; padding-bottom: max(6px, env(safe-area-inset-bottom)); }
  [data-live-home] .workspace {
    min-height: 530px; height: calc(100svh - 106px);
    height: calc(100dvh - 106px); grid-template-rows: minmax(222px, 1fr) minmax(292px, 1.1fr);
  }
  [data-live-home] .workspace > section { height: auto; min-height: 0; }
  [data-live-home] .stage[data-pose='seated'] .portrait img { object-fit: cover; object-position: center 16%; }
  [data-live-home] .stage-caption { left: 14px; right: 14px; bottom: 43px; }
  [data-live-home] .stage h1 { font-size: clamp(2.6rem, 7svh, 3.7rem); }
  .live-actions { max-width: 54%; gap: 4px; padding-bottom: 2px; }
  .live-actions button { padding-inline: 10px; font-size: .84rem; }
  .live-status-bar { padding: 7px 12px; min-height: 34px; line-height: 1.3; }
  .live-status-bar #media-info { display: none; }
  [data-live-home] .panel-header { min-height: 59px; padding-block: 9px; }
  [data-live-home] .suggestions { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; }
  [data-live-home] .suggestions button { flex: none; }
  [data-live-home] .look-art { aspect-ratio: .8; }
  .looks { gap: 6px; }
  .look-detail { padding: 7px; font-size: .88rem; overflow-wrap: anywhere; }
  .look-detail span { font-size: .8rem; }
}

@media (max-width: 650px) and (max-height: 650px) {
  [data-live-home] .topbar { height: 53px; }
  [data-live-home] .workspace {
    min-height: 438px; height: calc(100dvh - 89px);
    grid-template-rows: minmax(178px, .88fr) minmax(250px, 1.12fr);
  }
  [data-live-home] .footer { min-height: 36px; }
}

@media (max-width: 350px) {
  .brand-mark { display: none; }
  .stage-outfit { padding-inline: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
