header{padding:16px 20px 5px}h1{font-size:25px;color:#244c73}.subtitle{font-size:12px}footer{padding:4px 16px 12px}#reply-card{border:1px solid #d3e5f5;box-shadow:0 7px 25px #315f8210;padding:15px 17px 5px;background:#ffffffee;border-radius:23px}#reply{font-size:16px;line-height:1.65;max-height:3.3em}#reply-card.expanded #reply{max-height:28dvh}#chat{margin-top:12px;padding:7px 8px 7px 18px;border:1px solid #d4e6f5;box-shadow:0 6px 20px #315f820d}#message{height:44px}#send{height:46px;flex-basis:54px;background:linear-gradient(135deg,#8bd1ff,#539ce0);font-weight:600}.preview-note{font-size:11px;color:#7a91a6;text-align:center;margin:8px 0 0}.summary{font-size:11px;margin-bottom:5px}#avatar-choice{display:block;width:100%;font:inherit;min-height:46px;margin-top:8px;border:1px solid #bfd5e8;border-radius:13px;background:white;color:#294b70;padding:10px}#replay[hidden]{display:none}label[for=avatar-choice]{font-size:13px;color:#627d96}@media(orientation:landscape) and (max-height:600px){footer{padding:4px 12px}.preview-note{margin-top:4px}#reply-card.expanded #reply{max-height:35dvh}}
/* Restore the approved dark-tech interface; character art and expressions remain classic 2D. */
body{color:#e7f3ff;background:#07182d}.app{background:radial-gradient(ellipse at 50% 48%,#102d4b 0%,#07182d 65%)}h1{color:#eef8ff}h1::after{content:' ✧';color:#6cd4ff}.subtitle{color:#9bbbd3}.menu{background:#17354d;border:1px solid #395f7b;color:#edf8ff}#stage{background:transparent}#reply-card{color:#edf7ff;border:1px solid #356080;background:linear-gradient(135deg,#173a57ee,#102a44ee);box-shadow:0 8px 25px #0003}#chat{background:#10283e;border:1px solid #345e80}#message{color:#edf7ff}#message::placeholder{color:#8caec6}#send{color:#08213c;background:linear-gradient(135deg,#81d7ff,#368de1)}.summary,.preview-note{color:#8badc8}.reply-actions button{color:#abcce3}dialog{background:#10263e;color:#e5f3ff;border:1px solid #3a6789}dialog::backdrop{background:#0008}.close{background:#23435d;color:#fff}h3,.detail,label[for=avatar-choice]{color:#a3c3dc}.row button{background:#1a3b57;color:#e6f5ff}.row button.active{background:#246b9e}#avatar-choice{background:#16374f;color:#eaf7ff;border-color:#447597}

/* Transparent reply region; input field remains readable and unchanged. */
#reply-card{background:transparent;border:1px solid rgba(112,197,242,.22);box-shadow:none}#reply{color:#edf7ff;text-shadow:0 1px 3px rgba(0,0,0,.5)}

/* Compact latest-reply subtitle; expansion affects presentation only. */
#reply-card{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px;padding:3px 10px 3px 15px;border-radius:18px}
#reply{min-width:0;max-height:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#reply-card.expanded{align-items:start}
#reply-card.expanded #reply{white-space:pre-wrap;max-height:calc(33dvh - 8px);overflow:auto;text-overflow:clip}
.reply-actions{flex-shrink:0}#chat{margin-top:8px}

/* Soft starlight stays behind the character and outside the reply region. */
.app{background:radial-gradient(ellipse at 50% 42%,#173e60 0%,#0c2742 40%,#07182d 78%)}
h1{text-shadow:0 0 18px #74d8ff40}.menu{box-shadow:inset 0 0 14px #75d6ff12,0 0 16px #55caff16}
#stage::before,#stage::after{content:"";position:absolute;inset:0;pointer-events:none;background-repeat:no-repeat;animation:starlight 5.5s ease-in-out infinite alternate}
#stage::before{background-image:radial-gradient(circle,#edfcff 0 1px,#61cfff55 2px,transparent 6px),radial-gradient(circle,#d9f8ff 0 1px,transparent 4px),radial-gradient(circle,#d9f8ff 0 1px,transparent 5px),radial-gradient(circle,#d9f8ff 0 1px,transparent 4px);background-size:14px 14px,10px 10px,12px 12px,10px 10px;background-position:13% 19%,85% 32%,18% 70%,79% 82%}
#stage::after{background-image:radial-gradient(ellipse,#dffaff 0 6%,#65d6ff66 12%,transparent 65%),radial-gradient(ellipse,#dffaff 0 6%,#65d6ff66 12%,transparent 65%);background-size:20px 4px,4px 20px;background-position:87% 12%,85.2% 11%;animation-delay:-3s}
#avatar{position:relative;z-index:1}#reply-card{border-color:#70c5f248}#chat{border-color:#5daed56b;box-shadow:0 0 18px #32baff10}#send{box-shadow:0 0 13px #54c9ff40}
@keyframes starlight{from{opacity:.3}to{opacity:.9}}
@media(prefers-reduced-motion:reduce){#stage::before,#stage::after{animation:none;opacity:.55}}

/* Mobile chat controls and drawers. */
.app{height:var(--visible-height,100dvh)}
.conversation-tools{display:flex;justify-content:flex-end;gap:8px;align-items:center;min-height:32px}.conversation-tools button{background:transparent;color:#a9dbf5;font-size:12px;padding:4px 8px;min-height:32px}.conversation-tools [hidden]{display:none!important}#cancel{margin:0;color:#ffd6cb}
#history{display:none;max-height:65dvh}#history[open]{display:flex;flex-direction:column}#history-list{overflow:auto;min-height:0;overscroll-behavior:contain}.history-turn{border-bottom:1px solid #6ab3dc30;padding:12px 0}.history-turn p{white-space:pre-wrap;overflow-wrap:anywhere;margin:6px 0;line-height:1.6}.history-user{color:#a6d7f6}.history-answer{color:#f0f8ff}
#loading{position:absolute;z-index:2;inset:40% 12% auto;text-align:center;padding:18px;background:#102d4be8;border:1px solid #67c4ee55;border-radius:18px}#loading[hidden]{display:none}#load-progress{display:block;width:100%;margin:12px 0;accent-color:#67d9ff}#load-text{font-size:12px;color:#a9d7ef}#load-retry,.secondary{background:#204563;color:#e6f7ff;border-radius:12px;padding:10px;margin-top:10px}#disconnect{width:100%}#access{background:#071b2d;color:#edf8ff;border-color:#41728b}#connect{background:#2c78ad;color:white}#volume{display:block;width:100%;margin:14px 0 20px;accent-color:#6fd8ff}.setting{display:flex;gap:10px;align-items:center;min-height:44px;font-size:14px}.setting input{width:18px;height:18px;accent-color:#6fd8ff}
body.keyboard-open header{padding-top:5px}body.keyboard-open h1{font-size:19px}body.keyboard-open .preview-note,body.keyboard-open .summary{display:none}body.keyboard-open footer{padding-bottom:5px}body.keyboard-open #reply-card.expanded #reply{max-height:min(22dvh,100px)}
body.no-starlight #stage::before,body.no-starlight #stage::after{display:none}body.page-hidden #stage::before,body.page-hidden #stage::after,body.power-save #stage::before,body.power-save #stage::after{animation-play-state:paused}

#reply-card[hidden]{display:none}

/* Compact text composer with an explicit hold-to-talk state. */
#chat{padding:3px 6px 3px 14px;border-radius:23px;position:relative}#message{height:36px;font-size:15px}#send{height:38px;min-height:38px;flex-basis:48px;font-size:15px}#voice-hint{font-size:10px;line-height:1.4;margin-top:5px}#voice-state{position:fixed;z-index:5;left:8%;right:8%;bottom:130px;border:1px solid #70daf5;padding:18px;border-radius:18px;background:#123854f5;color:#eefaff;text-align:center;pointer-events:none}#voice-state[hidden]{display:none}#chat.recording{border-color:#76ebff;box-shadow:0 0 18px #44ddff40}#chat.recording #message{color:#a5f4ff}

/* Everyday settings only; account fields are folded away. */
.settings-group{border-top:1px solid #70c5f226;padding:15px 0}.settings-group h3,.settings-group summary{font-size:15px;font-weight:600;color:#e5f6ff;margin:0 0 14px}.settings-group summary{cursor:pointer;min-height:28px;margin-bottom:0}.settings-group[open] summary{margin-bottom:12px}.settings-group label,.setting-label{font-size:14px;color:#bdd9eb}.setting-label{margin-bottom:8px}.account-actions{display:flex;gap:10px}.account-actions .secondary{width:auto!important;flex:1}.settings-group #install-app{width:100%;margin-top:0}.settings-group .row{margin-bottom:10px}.settings-group .row button{flex:1}#panel .panel-head{margin-bottom:14px}#login-fields[hidden]{display:none}
