:root {
  color-scheme: dark;
  --ink: #f5edf9;
  --muted: #c1aecf;
  --purple: #241137;
  --purple-soft: #52346c;
  --yellow: #ffdb35;
  --paper: #2c183f;
  --line: #ffffff1c;
  --surface: #362148;
  font-family: "Avenir Next", "Trebuchet MS", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { min-width: 320px; margin: 0; color: var(--ink); background: var(--purple); }
button, textarea { font: inherit; }
button { cursor: pointer; }
button, a, textarea { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, summary:focus-visible, .conversation:focus-visible {
  outline: 3px solid #ad7dea; outline-offset: 4px;
}
button:disabled { cursor: default; }
.chat-shell { width: min(100%, 1360px); height: 100dvh; min-height: 0; margin: auto; display: grid; grid-template-rows: auto minmax(0, 1fr); padding: 0 32px 24px; }
.topbar { min-height: 98px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: block; flex-shrink: 0; }
.brand img { display: block; width: 224px; height: auto; }
.topbar__actions { display: flex; align-items: center; gap: 12px; }
.new-chat, .sound-toggle { min-height: 44px; border-radius: 12px; padding: 0 16px; display: inline-flex; align-items: center; gap: 9px; font-size: .84rem; font-weight: 650; }
.new-chat { color: var(--yellow); border: 1px solid #816133; background: #ffdb3509; }
.new-chat > span { font-size: 1.4rem; font-weight: 400; }
.new-chat:hover { background: #ffdb351a; }
.sound-toggle { background: transparent; border: 1px solid transparent; color: #d8cce4; }
.sound-toggle:hover { background: #ffffff0a; }
.sound-toggle svg { width: 20px; height: 20px; }
.sound-toggle .sound-on, .sound-toggle[aria-pressed="true"] .sound-off { display: none; }
.sound-toggle[aria-pressed="true"] .sound-on { display: block; }
.sound-toggle[aria-pressed="true"] { color: var(--yellow); }
.workspace { min-height: 0; display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 26px; }
.assistant-panel { min-height: 0; display: flex; flex-direction: column; align-items: center; padding: 26px 12px 18px; color: #fff8ff; position: relative; }
.assistant-heading { display: flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 600; color: #c9b8db; }
.assistant-heading__dot { width: 5px; height: 5px; border-radius: 50%; background: var(--yellow); }
.pet-stage { --tilt-x: 0deg; --tilt-y: 0deg; --shift-x: 0px; --shift-y: 0px; position: relative; width: 280px; height: 292px; flex-shrink: 0; padding: 0; margin: 18px 0 8px; border: 0; border-radius: 40px; background: radial-gradient(ellipse at 50% 70%, #a47be21a, transparent 65%); perspective: 750px; transform-style: preserve-3d; }
.pet-body { position: absolute; inset: 15px 24px 25px; transform: rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) translate3d(var(--shift-x), var(--shift-y), 25px); transform-style: preserve-3d; transition: transform .14s ease-out; z-index: 3; }
.pet-body img { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 9px 10px #08011240); }
.pet-shadow { position: absolute; width: 142px; height: 20px; left: calc(50% - 71px); bottom: 36px; border-radius: 50%; background: #10061c; filter: blur(10px); transform: translateX(var(--shift-x)); opacity: .7; }
.stage-floor { position: absolute; width: 252px; height: 150px; left: 14px; bottom: -15px; border-radius: 50%; background: repeating-linear-gradient(90deg, transparent 0 30px, #b989ef14 30px 31px), repeating-linear-gradient(0deg, transparent 0 30px, #b989ef14 30px 31px); transform: rotateX(75deg); mask-image: radial-gradient(ellipse, black, transparent 65%); }
.stage-orbit { position: absolute; inset: 58px 0 12px; border-radius: 50%; border: 1px solid #bfa0e44d; transform: rotateX(68deg) rotateZ(-24deg) translateZ(-30px); pointer-events: none; }
.stage-orbit--two { inset: 35px -12px -3px; border-color: #ffdb352e; transform: rotateX(75deg) rotateZ(24deg) translateZ(-35px); }
.stage-orb { position: absolute; z-index: 4; width: 22px; height: 22px; border-radius: 50%; box-shadow: 0 8px 10px #10041d66; pointer-events: none; }
.stage-orb--gold { left: 17px; top: 116px; background: radial-gradient(circle at 32% 27%, #fff6b5, #ffdb35 42%, #bd8614); transform: translate3d(calc(var(--shift-x) * -1), calc(var(--shift-y) * -1), 40px); }
.stage-orb--purple { right: 4px; bottom: 65px; width: 16px; height: 16px; background: radial-gradient(circle at 30% 25%, #e3c6ff, #a074de 46%, #482370); transform: translate3d(var(--shift-x), var(--shift-y), 55px); }
.pet-stage.is-reacting .pet-body { animation: pet-bounce .7s cubic-bezier(.28,.8,.3,1); }
.pet-stage.is-reacting .stage-orbit { border-color: #ffdb35a3; box-shadow: 0 0 14px #ffdb351c; }
.assistant-copy { width: 100%; text-align: center; }
.pet-status { margin: 0 0 10px; font-size: 1.27rem; font-weight: 750; letter-spacing: -.035em; }
.pet-message { max-width: 242px; min-height: 48px; margin: 0 auto; font-size: .84rem; line-height: 1.55; color: #c9b9d9; }
.pet-hint { margin: 18px 0 0; font-size: .68rem; color: #ad96c1; }
.search-tips { align-self: stretch; margin-top: auto; padding: 24px 0 0; border-top: 1px solid #b591d52b; }
.search-tips p { margin: 0 0 7px; font-size: .8rem; line-height: 1.5; color: #bfa9d1; }
.search-tips p:first-child { color: #f7eefc; font-weight: 650; }
.search-tips span { display: block; color: #dfccee; font-size: .74rem; line-height: 1.55; margin-top: 12px; }
.chat-panel { min-width: 0; min-height: 0; display: grid; grid-template-rows: auto minmax(0,1fr) auto; overflow: hidden; background: radial-gradient(ellipse at 85% 0%, #7542991c, transparent 55%), var(--paper); border: 1px solid var(--line); border-radius: 26px; box-shadow: 0 12px 60px #0b021f60; }
.chat-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 19px 28px; border-bottom: 1px solid var(--line); font-size: .75rem; color: var(--muted); }
.chat-heading > div { display: flex; align-items: center; gap: 8px; }
.status-dot { width: 6px; height: 6px; flex-shrink: 0; border-radius: 50%; background: #c399ec; }
.conversation { min-height: 0; width: 100%; padding: 30px 32px 20px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #745688 transparent; }
.welcome { min-height: 100%; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 0 10px 20px; }
.welcome h1 { max-width: 470px; margin: 0 0 17px; font-size: clamp(2.1rem, 3.9vw, 3.3rem); font-weight: 750; line-height: 1.06; letter-spacing: -.055em; }
.welcome > p { max-width: 430px; margin: 0; color: var(--muted); font-size: .96rem; line-height: 1.6; }
.suggestions { width: 100%; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin-top: 34px; }
.suggestions button { min-height: 180px; display: flex; flex-direction: column; align-items: flex-start; gap: 13px; padding: 15px; color: var(--ink); background: var(--surface); border: 1px solid #a779cc40; border-radius: 14px; text-align: left; perspective: 600px; transition: transform .16s, border-color .16s, box-shadow .16s; }
.suggestions button:hover { transform: translateY(-3px); border-color: #b08cce; box-shadow: 0 5px 0 #170b27; }
.suggestions button:active { transform: translateY(0); box-shadow: none; }
.suggestions button > img { display: block; width: 100%; height: 104px; object-fit: contain; filter: drop-shadow(0 10px 7px #10041d60); transition: transform .2s ease; }
.suggestions button:hover > img, .suggestions button:focus-visible > img { transform: translateY(-4px) rotateY(-10deg) rotateZ(-3deg); }
.suggestions button > span { font-size: .8rem; line-height: 1.35; font-weight: 650; }
.suggestions small { display: block; font-size: .7rem; font-weight: 400; color: var(--muted); margin-top: 4px; }
.welcome > .welcome-tip { font-size: .72rem; margin-top: 21px; }
.message { max-width: 810px; margin: 0 auto 22px; display: grid; gap: 8px; }
.message__label { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: .73rem; font-weight: 650; }
.agent-avatar { width: 30px; height: 30px; flex-shrink: 0; object-fit: contain; }
.message__content { width: fit-content; max-width: min(100%,660px); padding: 14px 17px; border-radius: 18px; line-height: 1.58; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .9rem; }
.message--user { justify-items: end; }
.message--user .message__content { background: #fce791; color: #3c2825; border-bottom-right-radius: 5px; }
.message--assistant .message__content { background: #422958; border-bottom-left-radius: 5px; }
.searching { display: flex; align-items: center; gap: 11px; color: var(--muted); font-size: .86rem; padding: 14px 0; }
.searching .agent-avatar { width: 40px; height: 40px; }
.products { max-width: 810px; margin: 0 auto 22px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.product { min-width: 0; padding: 14px; display: grid; grid-template-columns: 76px 1fr; grid-template-rows: 1fr auto; gap: 14px; border: 1px solid #a779cc40; border-radius: 18px; background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.product:hover { border-color: #c0a1d8; box-shadow: 0 5px 16px #10041d40; }
.product__image { width: 76px; height: 90px; border-radius: 11px; background: #241137; object-fit: contain; }
.product__image--empty { display: grid; place-items: center; }
.product__image--empty::before { content: "◇"; font-size: 28px; color: #c1b1d0; }
.product__main { min-width: 0; }
.product h2 { margin: 0; font-size: .86rem; line-height: 1.35; overflow-wrap: anywhere; }
.product__store { margin: 6px 0 0; color: var(--muted); font-size: .69rem; }
.price { margin: 12px 0 0; color: var(--yellow); font-size: 1.13rem; font-weight: 800; letter-spacing: -.025em; }
.price small { display: block; margin-bottom: 2px; color: var(--muted); font-weight: 400; font-size: .69rem; }
.old-price { margin: 3px 0 0; color: var(--muted); font-size: .72rem; text-decoration: line-through; }
.product a { align-self: end; grid-column: 1/-1; min-height: 40px; display: grid; place-items: center; border-radius: 11px; padding: 9px 10px; color: #352019; background: var(--yellow); text-decoration: none; font-size: .79rem; font-weight: 750; }
.product a:hover { background: #ffe16c; }
.error { max-width: 810px; margin: 0 auto 24px; padding: 16px; border-left: 3px solid #f18ba7; border-radius: 10px; background: #482338; color: #ffdae5; }
.error p { margin: 0 0 11px; line-height: 1.5; font-size: .86rem; }
.retry { min-height: 38px; border: 0; border-radius: 8px; padding: 8px 12px; background: #ffb8ce; color: #482338; font-size: .8rem; font-weight: 650; }
.composer-wrap { padding: 16px 28px 18px; border-top: 1px solid var(--line); background: var(--purple); }
.composer { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: 12px; padding: 9px 10px 9px 17px; border: 1.5px solid #a779cc70; border-radius: 17px; background: var(--surface); transition: box-shadow .15s, border-color .15s; }
.composer:focus-within { border-color: #c399ec; box-shadow: 0 0 0 3px #ab87c726; }
.composer textarea { width: 100%; max-height: 130px; min-height: 26px; border: 0; outline: 0; resize: none; padding: 9px 0; color: var(--ink); background: transparent; font-size: .9rem; line-height: 1.5; }
.composer textarea::placeholder { color: #c1aecf; }
.composer textarea:disabled { opacity: .7; }
.send { width: 44px; height: 44px; flex-shrink: 0; display: grid; place-items: center; border: 0; border-radius: 12px; color: #2b183d; background: var(--yellow); transition: transform .15s, background .15s; }
.send:not(:disabled):hover { background: #ffe16c; transform: translateY(-1px); }
.send:disabled { opacity: .35; }
.send svg { width: 21px; height: 21px; }
.composer-hint { margin: 8px 2px 0; display: flex; justify-content: space-between; color: var(--muted); font-size: .64rem; }
.disclosure { max-width: 660px; margin: 10px auto 0; color: var(--muted); font-size: .61rem; line-height: 1.5; text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.assistant-panel[data-state="searching"] .stage-orbit { border-color: #ffdb356b; animation: search-orbit 4s linear infinite; }
.assistant-panel[data-state="searching"] .stage-orbit--two { animation-direction: reverse; animation-duration: 6s; }
.assistant-panel[data-state="typing"] .stage-orb--gold { box-shadow: 0 0 22px #ffdb354d; }
.assistant-panel[data-state="success"] .pet-status { color: #ffdf61; }
.assistant-panel[data-state="error"] .pet-status { color: #ffbdc9; }
body.motion-paused .pet-body, body.motion-paused .stage-orb { transform: none; }
body.motion-paused *, body.motion-paused *::before, body.motion-paused *::after { animation: none !important; transition: none !important; }
@keyframes pet-bounce { 0%,100% { transform: translateY(0) rotateY(0); } 30% { transform: translateY(-22px) rotateY(-12deg) rotateZ(-5deg); } 60% { transform: translateY(-6px) rotateY(10deg) rotateZ(5deg); } }
@keyframes search-orbit { from { transform: rotateX(68deg) rotateZ(0deg); } to { transform: rotateX(68deg) rotateZ(360deg); } }
@media (min-width: 1440px) { .chat-shell { padding-top: 12px; padding-bottom: 36px; } }
@media (max-height: 760px) and (min-width: 901px) { .pet-stage { width: 250px; height: 245px; margin-top: 7px; }.search-tips { padding-top: 14px; }.assistant-panel { padding-top: 12px; }.welcome h1 { font-size: 2.7rem; } }
@media (max-width: 1100px) { .chat-shell { padding-inline: 22px; }.workspace { grid-template-columns: 250px minmax(0,1fr); gap: 16px; }.pet-stage { width: 250px; height: 265px; }.stage-floor { left: 0; width: 250px; }.pet-body { inset-inline: 18px; }.conversation { padding-inline: 24px; }.welcome { padding-inline: 0; }.suggestions { gap: 8px; }.suggestions button { padding: 12px; } }
@media (max-width: 900px) {
  .chat-shell { padding: 0 18px 18px; }
  .topbar { min-height: 86px; }.brand img { width: 196px; }
  .workspace { grid-template-columns: minmax(0,1fr); grid-template-rows: auto minmax(0,1fr); gap: 12px; }
  .assistant-panel { width: 100%; height: 106px; padding: 0 4px; display: grid; grid-template-columns: 100px minmax(0,1fr); gap: 13px; }
  .assistant-heading, .search-tips, .stage-orb, .stage-floor, .stage-orbit { display: none; }
  .pet-stage { width: 100px; height: 106px; margin: 0; border-radius: 18px; grid-row: 1; grid-column: 1; }
  .pet-body { inset: 0; }.pet-shadow { width: 64px; height: 10px; left: 18px; bottom: 8px; filter: blur(5px); }
  .assistant-copy { text-align: left; }.pet-status { margin-bottom: 5px; font-size: 1rem; }.pet-message { max-width: 450px; min-height: 0; margin: 0; font-size: .76rem; line-height: 1.4; }
  .pet-hint { display: none; }
  .chat-heading { padding: 15px 22px; }.conversation { padding: 24px 26px 16px; }.welcome h1 { max-width: 510px; font-size: 2.7rem; }
  .welcome { padding-bottom: 10px; }.suggestions { margin-top: 24px; }.composer-wrap { padding: 13px 22px 15px; }
}
@media (max-width: 520px) {
  .chat-shell { padding: 0 10px max(10px, env(safe-area-inset-bottom)); }
  .topbar { min-height: 76px; gap: 8px; padding: 0 4px; }.brand img { width: 155px; }.topbar__actions { gap: 2px; }
  .new-chat { min-height: 40px; padding-inline: 9px; gap: 5px; font-size: .68rem; border-radius: 10px; }.new-chat > span { font-size: 1.05rem; }
  .sound-toggle { min-width: 38px; min-height: 40px; padding: 8px; }.sound-toggle > span { display: none; }.sound-toggle svg { width: 17px; height: 17px; }
  .workspace { gap: 8px; }.assistant-panel { height: 82px; grid-template-columns: 74px minmax(0,1fr); gap: 9px; }
  .pet-stage { width: 74px; height: 82px; }.pet-shadow { width: 50px; left: 12px; bottom: 5px; }.pet-status { font-size: .9rem; }.pet-message { font-size: .68rem; }
  .chat-panel { border-radius: 20px; }.chat-heading { padding: 13px 16px; gap: 8px; font-size: .63rem; }
  .conversation { padding: 22px 17px 14px; }.welcome { justify-content: center; padding: 0; }.welcome h1 { max-width: 290px; margin-bottom: 12px; font-size: 2rem; line-height: 1.08; }.welcome > p { font-size: .83rem; line-height: 1.55; }
  .suggestions { grid-template-columns: 1fr; gap: 7px; margin-top: 20px; }.suggestions button { min-height: 74px; flex-direction: row; align-items: center; gap: 13px; padding: 9px 13px; border-radius: 11px; }.suggestions button > img { width: 60px; height: 56px; flex-shrink: 0; }.suggestions button > span { display: flex; flex: 1; align-items: center; justify-content: space-between; gap: 8px; font-size: .77rem; }.suggestions small { margin: 0; font-size: .65rem; }
  .welcome > .welcome-tip { margin-top: 14px; font-size: .63rem; }.composer-wrap { padding: 11px 14px 12px; }.composer { border-radius: 14px; gap: 8px; padding: 7px 8px 7px 12px; }.composer textarea { font-size: 16px; padding-block: 8px; }.send { width: 40px; height: 40px; border-radius: 10px; }.composer-hint { font-size: .6rem; margin-top: 6px; }.disclosure { font-size: .57rem; margin-top: 7px; line-height: 1.4; }.products { grid-template-columns: 1fr; gap: 11px; }.product { grid-template-columns: 82px minmax(0,1fr); }.product__image { width: 82px; }.message__content { max-width: 100%; padding: 12px 14px; font-size: .84rem; }.message__label { font-size: .67rem; }
}
@media (max-width: 370px) { .brand img { width: 137px; }.new-chat { font-size: .63rem; padding-inline: 7px; }.sound-toggle { min-width: 32px; padding-inline: 6px; }.pet-message { font-size: .64rem; }.assistant-panel { gap: 6px; grid-template-columns: 66px minmax(0,1fr); }.pet-stage { width: 66px; } }
@media (max-height: 680px) and (max-width: 900px) { .assistant-panel { height: 65px; }.pet-stage { height: 65px; }.welcome { justify-content: flex-start; }.welcome h1 { font-size: 1.8rem; }.welcome-tip { display: none; }.conversation { padding-top: 17px; }.topbar { min-height: 65px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }.pet-body, .stage-orb, .suggestions button, .suggestions button > img { transform: none !important; } }

@media (max-height: 650px) and (min-width: 901px) { .search-tips { display: none; }.pet-stage { height: 220px; } }
