/* Lucy v1.85.5: Give the square attachment button and Hold to Talk the same responsive height. */
/* Lucy v1.85.4: Keep the prompt at its original width and place the paperclip in the talk row. */
/* Lucy v1.85.1: Use the system attachment picker and keep the compact composer chip. */
/* Lucy v1.85.0: Add a compact attachment control, readiness chip and camera picker to the conversation. */
/* Lucy v1.81.0: A conversational 3D companion with generated spatial scenery. Add requested and optional self-prompted image_gen backgrounds, retain the latest image on this device, and report generation and storage outcomes accurately. */
/* Lucy v1.36.0: Render the Start arrow as a crisp SVG and retain compact mobile controls. Save all interface assets as UTF-8. */
/* Lucy v1.2.0 — Compact phone layout, a luminous character container, and accessible conversation controls. */
:root{color-scheme:dark;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#edf1f6;background:#11151c;--muted:#8b99ab;--accent:#d7f3a9;--line:#ffffff14}*{box-sizing:border-box}body{margin:0;min-height:100svh;background:radial-gradient(ellipse at 60% 20%,#212d38 0,transparent 65%),#11151c}button,input,textarea{font:inherit}button,a,input,label,summary{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{cursor:default;opacity:.42}button{color:inherit}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,summary:focus-visible{outline:2px solid var(--accent);outline-offset:4px}button svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}[hidden]{display:none!important}.svg-defs{position:absolute;width:0;height:0}.app{height:100dvh;max-width:600px;min-height:460px;margin:auto;padding:calc(14px + env(safe-area-inset-top)) 18px calc(14px + env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:8px}header{display:flex;align-items:flex-start;justify-content:space-between;flex-shrink:0;height:55px;padding:0 2px}h1{font-size:30px;font-weight:550;letter-spacing:-1.3px;margin:0 0 1px;display:flex;align-items:center;gap:9px}.title-dot{width:7px;height:7px;border-radius:50%;background:var(--accent)}header a{color:#a2afbe;text-decoration:none;font-size:11px!important}header a:hover{color:var(--accent)}.header-right{display:flex;align-items:center;gap:12px;padding-top:4px}.icon-button{border:1px solid var(--line);background:#ffffff06;display:flex;justify-content:center;align-items:center;width:40px;height:40px;border-radius:50%;flex-shrink:0}.icon-button svg{width:21px;height:21px}.mic-state{display:flex;gap:6px;align-items:center}.mic-state b{font-size:9px;font-weight:500;letter-spacing:1.1px;color:var(--muted)}.mic-state>span{width:5px;height:5px;border-radius:50%;background:#6c7785}.mic-state.live>span{background:var(--accent);box-shadow:0 0 8px #d7f3a944}.mic-state.live b{color:var(--accent)}.frame{position:relative;flex:1;min-height:180px;overflow:hidden;border:1px solid #aac2d025;border-radius:24px;background:radial-gradient(ellipse at 50% 35%,#334858 0,#22313f 50%,#19232e 100%);box-shadow:0 18px 50px #0003,inset 0 1px #ffffff12}.frame-heading{position:absolute;z-index:1;top:18px;left:19px;right:19px;display:flex;justify-content:space-between;pointer-events:none}.eyebrow{font-size:9px;letter-spacing:1.8px;font-weight:600;color:#9daebc}.world-dot{width:5px;height:5px;background:#aec1c6;border-radius:50%;box-shadow:0 0 14px #d7f3a977}#stage{position:absolute;inset:0;touch-action:none}#stage canvas{display:block;width:100%;height:100%;touch-action:none}.frame-controls{position:absolute;bottom:15px;left:15px;right:15px;display:flex;justify-content:space-between;align-items:center;gap:10px;pointer-events:none}.frame-controls>*{pointer-events:auto}.small-button{display:inline-flex;align-items:center;justify-content:center;gap:7px;border:1px solid #ffffff24;background:#101923aa;border-radius:11px;padding:10px 13px;font-size:12px;min-height:38px;backdrop-filter:blur(12px)}.small-button svg{width:15px;height:15px}.rotate-toggle{display:flex;align-items:center;gap:8px;padding:9px 12px;font-size:12px;border-radius:11px;border:1px solid #ffffff24;background:#101923aa;backdrop-filter:blur(12px);user-select:none;min-height:38px}.rotate-toggle input{width:15px;height:15px;accent-color:var(--accent);margin:0}.model-loading{position:absolute;left:15px;right:15px;top:43%;display:flex;align-items:center;justify-content:center;gap:9px;color:#c9d6df;font-size:12px;text-align:center}.model-retry{position:absolute;left:50%;top:55%;transform:translateX(-50%)}.spinner{display:inline-block;width:14px;height:14px;border:1.5px solid #afc0cc44;border-top-color:var(--accent);border-radius:50%;animation:spin .8s linear infinite;flex-shrink:0}@keyframes spin{to{transform:rotate(360deg)}}.welcome{position:absolute;inset:0;z-index:3;display:flex;align-items:flex-end;padding:16px;background:linear-gradient(transparent 10%,#111b2355 35%,#111b23f5 100%)}.welcome-card{width:100%;padding:21px 15px 12px;text-align:center}.welcome h2{font-size:28px;font-weight:500;letter-spacing:-.9px;margin:13px 0 8px}.welcome p{font-size:13px;color:#b4c1cc;line-height:1.6;max-width:250px;margin:0 auto 19px}.primary{width:100%;display:flex;justify-content:space-between;align-items:center;background:var(--accent);border:0;border-radius:12px;padding:15px 18px;color:#27321d;font-size:14px;font-weight:650;box-shadow:0 6px 25px #0003}.primary svg{width:21px;height:21px;flex-shrink:0}.welcome small{display:block;font-size:10px;color:#a6b4c0;margin-top:10px}.conversation{flex-shrink:0;padding:0 3px;min-height:0}.reply-heading{display:flex;align-items:center;justify-content:space-between;min-height:23px;margin-bottom:2px}.reply-heading .eyebrow{color:var(--accent)}#reply{font-size:14px;line-height:1.5;max-height:98px;overflow:auto;white-space:pre-wrap;overscroll-behavior:contain}#status{font-size:10px;color:var(--muted);display:flex;align-items:center;gap:7px;margin:8px 0 0;min-height:16px}#status.error{color:#ffb6ac}#status .spinner{height:11px;width:11px}.text-button{border:0;background:transparent;color:#bdd69e;display:inline-flex;align-items:center;gap:5px;font-size:11px;padding:4px 0;min-height:28px}.text-button svg{height:13px;width:13px}.composer{--talk-height:57px;display:flex;flex-wrap:wrap;gap:9px;flex-shrink:0}.input-wrap{position:relative;flex:1;min-width:0}.input-wrap input{width:100%;border:1px solid var(--line);background:#ffffff05;color:#edf1f6;border-radius:12px;padding:14px 39px 14px 14px;font-size:16px;min-height:49px}.input-wrap input::placeholder{font-size:13px;color:#8190a1}.clear-field{position:absolute;right:7px;top:9px;width:30px;height:30px;border:0;background:transparent;display:flex;align-items:center;justify-content:center;color:#96a6b6}.clear-field svg{width:16px;height:16px}.talk{width:100%;height:var(--talk-height);border:1px solid #d7f3a94d;border-radius:14px;background:linear-gradient(135deg,#29362d,#222e2c);box-shadow:0 5px 18px #0002;display:flex;align-items:center;justify-content:center;touch-action:none;user-select:none;-webkit-user-select:none;transition:background .12s,border-color .12s}.talk img{height:42px;max-width:100%;pointer-events:none;user-select:none;-webkit-user-drag:none}.talk.recording{background:#3c292d;border-color:#e9a8a6}.talk.cancelling{background:#57303a;border-color:#ffb6ac}.keyboard-dismiss{align-self:center;width:40px;height:40px}dialog{width:calc(100% - 28px);max-width:470px;max-height:90dvh;border:1px solid #ffffff25;border-radius:24px;background:#1b232d;color:#edf1f6;padding:24px;box-shadow:0 25px 100px #0008}dialog::backdrop{background:#080e14b8;backdrop-filter:blur(8px)}.dialog-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:24px}h2{font-size:25px;font-weight:500;letter-spacing:-.5px;margin:5px 0 0}dialog label{display:block;font-size:13px;margin-bottom:10px}.personality-wrap{position:relative}textarea{display:block;width:100%;border:1px solid #ffffff20;border-radius:12px;color:inherit;background:#111820;padding:13px 36px 13px 13px;line-height:1.5;font-size:16px;resize:vertical;min-height:140px}.settings-row{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:6px}#saved{font-size:10px;color:var(--muted)}.settings-section{padding:22px 0;border-block:1px solid var(--line);margin:19px 0;display:flex;flex-direction:column;gap:11px}h3{font-size:13px;font-weight:500;margin:0}.settings-section p,details p{font-size:12px;line-height:1.65;color:#a4b3c2;margin:5px 0 0}.settings-section button{align-self:flex-start}summary{font-size:12px;color:#b8c6d1;cursor:pointer}details p{margin-top:13px}dialog footer{display:flex;justify-content:space-between;border-top:1px solid var(--line);margin-top:23px;padding-top:16px;font-size:11px;color:var(--muted)}@media(min-width:650px){.app{padding-top:22px;padding-bottom:20px;max-width:540px}.frame{border-radius:28px}}@media(max-height:680px){.app{gap:8px;padding-top:10px;padding-bottom:10px}header{height:53px}.conversation{min-height:0}#reply{max-height:60px}.composer{--talk-height:49px}.welcome-card{padding:12px 5px 3px}.welcome h2{font-size:24px;margin:8px 0}.welcome p{margin-bottom:12px}.welcome .eyebrow{font-size:8px}.frame-heading{top:13px}.frame-controls{bottom:10px}}


/* v1.2.0: Give reclaimed label and spacing height to the character frame. */
#stop{float:right;margin-left:10px;min-height:22px;padding:0}#status{margin-top:4px}

/* v1.2.0: Saved facing preference in the compact settings drawer. */
.facing-setting{gap:2px}.facing-setting label{display:flex;align-items:center;gap:10px;margin:0;min-height:30px}.facing-setting input{width:17px;height:17px;accent-color:var(--accent);margin:0}.facing-setting p{margin:0}

/* v1.2.0: Optional gesture sounds stay inside Settings. */
#idleSoundState{display:flex;align-items:center;gap:7px}details a{color:var(--accent)}

/* v1.4.0: Reply length, loading and Stop never resize the character frame or input area. */
#reply{height:63px;min-height:63px;max-height:63px;line-height:21px;overflow-y:auto;overflow-wrap:anywhere;scrollbar-width:thin}
.conversation-tools{height:22px;display:flex;gap:10px;align-items:center;margin-top:2px}
.conversation-tools #status{margin:0;min-height:0;max-height:22px;line-height:11px;overflow-y:auto;flex:1;min-width:0}
.conversation-tools .text-button{flex-shrink:0;min-height:22px;padding:0;margin:0}
.conversation-tools #replay{margin-left:auto}.conversation-tools #stop{float:none;margin-left:auto}
#initiativeState{color:#e3d4a7}

/* Lucy v1.9.0: Compact avatar/voice settings and a full-screen file drop target. */
.avatar-settings,.voice-settings{border-bottom:1px solid var(--line,#303742);padding:10px 0;margin-bottom:12px}.avatar-settings h3{margin:0 0 6px}.avatar-buttons,.voice-row{display:flex;gap:9px;align-items:center;flex-wrap:wrap;margin:8px 0}.voice-row label{margin:0}.voice-row select{flex:1;min-width:90px;max-width:210px;background:#202632;color:#f2f4f7;border:1px solid #485365;border-radius:10px;padding:9px;font:inherit}#characterStatus,#voiceStatus{font-size:12px;color:#aebbc9;margin:6px 0;overflow-wrap:anywhere}#characterStatus.error{color:#ffb2aa}#characterName{font-size:14px;overflow-wrap:anywhere}#dropCharacter{position:fixed;inset:0;z-index:99999;display:grid;place-items:center;background:#101923e8;pointer-events:none;border:4px dashed #a8d4c9;padding:20px;color:#e3fff8;text-align:center;font-size:24px}#dropCharacter small{display:block;font-size:14px;margin-top:14px}[hidden]{display:none!important}

/* Lucy v1.81.0: Place saved scenery under the transparent 3D canvas and keep progress legible on small screens. */
.scene-background{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center;pointer-events:none}
#stage{z-index:1}.frame-controls{z-index:2}.model-loading,.model-retry{z-index:2}
.background-status{position:absolute;z-index:2;left:12px;right:12px;top:10px;margin:0;padding:8px 10px;display:flex;align-items:center;gap:8px;border:1px solid #ffffff24;border-radius:11px;background:#101923cc;backdrop-filter:blur(12px);color:#e6efeb;font-size:11px;line-height:1.35;pointer-events:none}.background-status.error{color:#ffb6ac}#backgroundDetail{overflow-wrap:anywhere}

.attachment-button{width:var(--talk-height);height:var(--talk-height);align-self:center;color:var(--accent);border-radius:12px}
.attachment-chip{flex:0 0 100%;min-width:0;display:flex;align-items:center;gap:9px;padding:4px 7px 4px 10px;border:1px solid var(--line);border-radius:11px;background:#ffffff06}
.attachment-info{flex:1;min-width:0;display:grid;gap:2px}
.attachment-info strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:550}
#attachmentStatus{font-size:11px;color:var(--muted)}
#attachmentStatus.error{color:#ffb6ac}
#removeAttachment{width:34px;height:34px}
#removeAttachment svg{width:16px;height:16px}

.talk-row{display:flex;align-items:center;gap:9px;flex:0 0 100%;min-width:0}
.talk-row .talk{flex:1;min-width:0}
