chatur-inbox-scene {
  display: block;
  --scene-line: #e7e5ea;
  --scene-muted: #716e77;
  --scene-ease: cubic-bezier(.18,.8,.2,1);
}
.scene-device { position: relative; isolation: isolate; overflow-anchor: none; }
.scene-trigger { position: absolute; top: 45%; left: 50%; width: 1px; height: 1px; pointer-events: none; }
.scene-glass {
  width: 94%; margin-inline: auto; padding: 7px; position: relative;
  border: 1px solid #c2bfc7; border-radius: 25px;
  background: linear-gradient(115deg,#ecebee,#d7d6da 38%,#f4f3f5 75%,#c9c8ce);
  box-shadow: inset 0 1px 1px #fff, 0 9px 27px -12px #24202940;
}
.scene-glass::before { content: ''; position: absolute; left: 50%; top: 2px; width: 4px; height: 4px; background: #5a5862; border-radius: 50%; }
.scene-window { position: relative; overflow: hidden; border: 1px solid #ceccd1; border-radius: 17px; background: #fff; }
.scene-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 22px 14px; border-bottom: 1px solid var(--scene-line); }
.scene-title { display: grid; gap: 9px; }
.lp .scene-title h2 { font-size: clamp(1.38rem,2.1vw,1.8rem); font-weight: 500; letter-spacing: -.04em; }
.scene-lights { display: flex; gap: 5px; }
.scene-lights i { width: 9px; height: 9px; border-radius: 50%; background: #fa7066; }
.scene-lights i:nth-child(2) { background: #f7bd4c; }
.scene-lights i:nth-child(3) { background: #64bd74; }
.scene-inbox { display: grid; grid-template-columns: minmax(0,.84fr) minmax(0,1.56fr); }
.scene-list { min-width: 0; max-height: 29rem; padding: 9px; border-right: 1px solid var(--scene-line); overflow-y: auto; }
.scene-slot { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .58s var(--scene-ease); }
.scene-slot.ready { grid-template-rows: 1fr; }
.scene-slot > div { min-height: 0; overflow: hidden; }
.scene-contact {
  display: flex; align-items: center; position: relative; width: 100%; gap: 11px;
  text-align: left; padding: 12px 9px; color: var(--lp-ink); border-radius: 10px;
  transition: background .32s, opacity .52s, transform .59s var(--scene-ease);
}
.scene-slot:not(.ready) .scene-contact { visibility: hidden; opacity: 0; transform: translate(-10px,-4px); }
.scene-slot.ready .scene-contact { opacity: 1; }
.scene-contact[aria-pressed=true] { background: var(--accent-tint); }
.scene-contact:enabled:hover { background: #f3f1f5; }
.scene-contact:enabled[aria-pressed=true]:hover { background: var(--accent-soft); }
.scene-avatar { display: block; position: relative; flex: none; }
.scene-avatar img { display: block; object-fit: cover; border-radius: 50%; }
.scene-avatar .channel-icon { position: absolute; right: -2px; bottom: -1px; border-radius: 50%; box-shadow: 0 0 0 2px #fff; }
.scene-contact-copy { flex: 1; min-width: 0; }
.scene-contact-copy > * { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scene-contact-copy strong { padding-right: 31px; font-size: 1.04rem; font-weight: 600; }
.scene-excerpt { color: #625e68; font-size: .94rem; line-height: 1.35; }
.scene-contact time { position: absolute; top: 11px; right: 9px; color: var(--scene-muted); font-size: .75rem; }
.scene-thread { min-width: 0; position: relative; height: 29rem; display: grid; grid-template-rows: 3.65rem minmax(0,1fr) 5rem; background: #f8f8fa; }
.scene-person { display: flex; align-items: center; gap: 10px; padding-inline: 16px; border-bottom: 1px solid var(--scene-line); background: #fcfcfd; }
.scene-person strong { font-size: 1.06rem; font-weight: 600; }
.scene-history { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; min-height: 0; overflow: auto; padding: 15px clamp(12px,2vw,24px); }
.scene-bubble { flex: none; padding: 8px 12px 6px; border-radius: 16px 16px 16px 5px; max-width: 86%; font-size: 1.04rem; line-height: 1.33; background: #fff; border: 1px solid #e6e4e9; box-shadow: 0 2px 4px #29223205; }
.scene-bubble time { display: flex; align-items: center; justify-content: end; gap: 4px; color: var(--scene-muted); font-size: .75rem; line-height: 1; margin-top: 4px; }
.scene-saved, .scene-outgoing { align-self: flex-end; border-radius: 16px 16px 5px 16px; }
.scene-saved { max-width: min(85%,250px); background: #ebf5ff; border-color: #cbdff5; }
.scene-saved img:not([hidden]) { display: block; width: 100%; height: clamp(75px,9vw,108px); object-fit: cover; border-radius: 10px; margin-bottom: 6px; }
.scene-saved img[hidden], .scene-thread:not(.saved) .scene-saved, .scene-outgoing, .scene-thanks, .scene-typing { display: none; }
.scene-outgoing { color: #fff; background: var(--accent-solid); border-color: var(--accent-solid); }
.scene-outgoing time { color: #eef7ff; }
.scene-thread.featured.sent .scene-outgoing, .scene-thread.featured.answered .scene-thanks { display: block; }
.scene-thread.featured.awaiting .scene-typing { display: flex; align-items: center; gap: 4px; padding: 12px; background: white; border: 1px solid var(--scene-line); border-radius: 13px 13px 13px 4px; }
.scene-typing i { width: 4px; height: 4px; background: #4586ce; border-radius: 50%; animation: scene-thinking .75s ease-in-out infinite alternate; }
.scene-typing i:nth-child(2) { animation-delay: .12s; }
.scene-typing i:nth-child(3) { animation-delay: .24s; }
.scene-compose { padding: 0 clamp(10px,1.5vw,19px) 12px; }
.scene-write { position: relative; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; align-items: center; height: 100%; overflow: hidden; padding: 6px 8px 6px 12px; border: 1px solid #dddae2; border-radius: 14px; background: #fff; box-shadow: 0 2px 8px #31243606; transition: box-shadow .4s, border-color .4s; }
.scene-field { display: grid; align-items: center; min-width: 0; line-height: 1.3; font-size: 1rem; }
.scene-field > span { grid-area: 1/1; }
.scene-placeholder { color: #78717e; }
.scene-rough, .scene-polished { opacity: 0; }
.scene-rough { transition: opacity .35s, filter .4s; }
.scene-write:is([data-state=typing],[data-state=polishing],[data-state=improved]) .scene-placeholder { opacity: 0; }
.scene-write:is([data-state=typing],[data-state=polishing]) .scene-rough { opacity: 1; }
.scene-write[data-state=typing] .scene-rough::after { content: ''; display: inline-block; vertical-align: -.1em; width: 2px; height: 1em; background: var(--accent); animation: scene-caret .85s steps(2,start) infinite; }
.scene-write[data-state=improved] .scene-rough { filter: blur(4px); }
.scene-write[data-state=improved] .scene-polished { opacity: 1; }
.scene-polished > span { display: inline-block; }
.scene-write:is([data-state=polishing],[data-state=improved]) { border-color: #6badf7; box-shadow: 0 0 0 2px #006ce315, 0 0 16px #006ce31e; }
.scene-write:is([data-state=polishing],[data-state=improved])::after { content: ''; position: absolute; inset: -10% -55%; pointer-events: none; background: linear-gradient(110deg,transparent 35%,#69cdff50 45%,#fff9 50%,#8bbfff70 55%,transparent 65%); animation: scene-polish 1s both; }
.scene-tools { display: flex; gap: 6px; }
.scene-improve, .scene-send { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; transition: transform .18s, box-shadow .2s, background-color .24s; }
.scene-improve { color: var(--accent-ink); background: var(--accent-tint); }
.scene-send { color: #77727c; background: #eeedf0; }
.scene-write:is([data-state=typing],[data-state=polishing],[data-state=improved]) .scene-send { color: #fff; background: var(--accent); }
.scene-tools .scene-pressed { transform: scale(.92); box-shadow: 0 0 0 4px #0077ff28; }
.scene-pointer { position: absolute; z-index: 3; left: 0; top: 0; opacity: 0; pointer-events: none; transition: opacity .23s; }
.scene-pointer.visible { opacity: 1; }
.scene-pointer svg { display: block; fill: #302939; stroke: white; stroke-width: 1.6; filter: drop-shadow(0 2px 2px #28173555); transform-origin: 4px 4px; transition: transform .15s; }
.scene-pointer.clicking svg { transform: scale(.82); }
.scene-ripple { position: absolute; top: 0; left: 0; z-index: 2; pointer-events: none; opacity: 0; width: 54px; height: 54px; border-radius: 50%; border: 3px solid var(--accent); background: #0077ff17; box-shadow: inset 0 0 0 1.5px #fff, 0 0 0 1.5px #fff; }
@keyframes scene-caret { 50% { opacity: 0; } }
@keyframes scene-thinking { to { opacity: .46; transform: translateY(-2px); } }
@keyframes scene-polish { 0% { transform: translateX(-55%); opacity: 0; } 30%,65% { opacity: 1; } 100% { transform: translateX(55%); opacity: 0; } }
@keyframes scene-arrive { from { opacity: 0; transform: translateY(11px) scale(.96); } }
@keyframes scene-send-bubble { from { opacity: 0; transform: translateY(27px) scale(.92); } }
@keyframes scene-ink { from { opacity: 0; filter: blur(3px); transform: translateY(4px); } }
@media (prefers-reduced-motion: no-preference) {
  chatur-inbox-scene[data-started]:not([data-complete]) .featured .scene-incoming,
  chatur-inbox-scene[data-started]:not([data-complete]) .featured .scene-person,
  .scene-thread.featured.awaiting .scene-typing,
  chatur-inbox-scene:not([data-complete]) .scene-thread.featured.answered .scene-thanks { transform-origin: left bottom; animation: scene-arrive .55s var(--scene-ease) both; }
  chatur-inbox-scene:not([data-complete]) .scene-thread.featured.sent .scene-outgoing { transform-origin: right bottom; animation: scene-send-bubble .6s var(--scene-ease) both; }
  .scene-write[data-state=improved] .scene-polished > span { animation: scene-ink .47s var(--scene-ease) calc(var(--word) * 28ms) both; }
}
chatur-inbox-scene:not([data-playing]) :is(.scene-typing i,.scene-rough,.scene-write)::after,
chatur-inbox-scene:not([data-playing]) .scene-typing i { animation-play-state: paused; }
@media (min-width:701px) and (max-width:1180px) {
  .scene-thread { grid-template-rows: 3.65rem minmax(0,1fr) 6.3rem; }
}
@media (max-width:700px) {
  .scene-glass { width: 98%; padding: 5px; border-radius: 19px; }
  .scene-glass::before { top: 1px; width: 3px; height: 3px; }
  .scene-window { border-radius: 13px; }
  .scene-bar { padding: 10px 11px; gap: 8px; }
  .scene-title { gap: 6px; }
  .scene-lights { gap: 3px; }
  .scene-lights i { width: 7px; height: 7px; }
  .scene-inbox { grid-template-columns: 1fr; }
  .scene-list { display: flex; container-type: inline-size; padding: 6px; border-right: 0; border-bottom: 1px solid var(--scene-line); overflow: auto hidden; scrollbar-width: none; }
  .scene-slot { display: block; flex: 0 0 auto; width: 0; overflow: hidden; transition: width .56s var(--scene-ease); }
  .scene-slot.ready { width: calc(100% / 3); }
  .scene-slot > div { width: calc(100cqw / 3); }
  .scene-contact { flex-direction: column; text-align: center; justify-content: start; gap: 3px; padding: 5px 3px; }
  .scene-contact time { display: none; }
  .scene-contact-copy { width: 100%; }
  .scene-contact-copy strong { padding-right: 0; font-size: .94rem; }
  .scene-contact .scene-avatar img { width: 31px; height: 31px; }
  .scene-contact .channel-icon { width: 14px; height: 14px; }
  .scene-excerpt { font-size: .8rem; }
  .scene-thread { height: 28.5rem; grid-template-rows: 3.3rem minmax(0,1fr) 6.8rem; }
  .scene-person { padding-inline: 12px; }
  .scene-history { padding: 10px; }
  .scene-bubble { max-width: 92%; }
  .scene-saved { max-width: min(88%,224px); }
}
@media (max-width:370px) {
  .scene-thread { height: 30rem; grid-template-rows: 3.3rem minmax(0,1fr) 7.4rem; }
  .scene-tools { gap: 4px; }
  .scene-send, .scene-improve { width: 32px; height: 32px; }
}
@media (max-width:700px) and (max-height:740px) {
  .scene-bar { padding-block: 7px; }
  .scene-title { display: flex; align-items: center; gap: 9px; }
  .scene-list { padding-block: 3px; }
  .scene-contact { gap: 1px; padding-block: 4px; }
  .scene-contact-copy { line-height: 1.17; }
  .scene-contact .scene-avatar img { width: 28px; height: 28px; }
  .scene-thread { height: clamp(335px,calc(100svh - 229px),430px); grid-template-rows: 40px minmax(0,1fr) 80px; }
  .scene-person .scene-avatar img { width: 29px; height: 29px; }
  .scene-history { gap: 5px; padding-block: 4px; }
  .scene-bubble { max-width: 95%; font-size: .9rem; line-height: 1.2; padding: 5px 8px; }
  .scene-bubble time { margin-top: 2px; font-size: .65rem; }
  .scene-compose { padding: 0 7px 7px; }
  .scene-write { padding: 3px 5px 3px 7px; gap: 5px; }
  .scene-field { font-size: .85rem; line-height: 1.2; }
}
