:root{--primary-color:#9c4844;--bubble-bg-user:hsla(0,0%,100%,.9);--bubble-bg-char:rgba(0,0,0,.5);--text-primary:#fff;--text-secondary:hsla(0,0%,100%,.7);--safe-area-top-env:env(safe-area-inset-top,0px);--safe-area-bottom-env:env(safe-area-inset-bottom,0px);--scale-factor:1}*{box-sizing:border-box;margin:0;padding:0}img{max-width:100%;height:auto}.chat-container{--safe-area-top:var(--safe-area-top-override,var(--safe-area-top-env));--safe-area-bottom:var(
    --safe-area-bottom-override,var(--safe-area-bottom-env)
  );position:relative;display:flex;flex-direction:column;width:100%;min-width:100%;height:100vh;height:100dvh;background:transparent;overflow:hidden;overscroll-behavior:none;touch-action:none;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none;min-height:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.background-image{background-image:var(--chat-bg-image);background-size:cover;background-position:50%;z-index:0}.background-image,.background-overlay{position:fixed;top:0;left:0;width:100vw;height:var(--initial-viewport-height,100vh);pointer-events:none}.background-overlay{background:rgba(0,0,0,.7);-webkit-backdrop-filter:blur(25px);backdrop-filter:blur(25px);z-index:1}.chat-header{justify-content:space-between;padding:0 12px 8px;padding-top:calc(var(--safe-area-top) + 8px);min-height:44px;flex-shrink:0;position:relative;z-index:2}.chat-header,.chat-header-left{display:flex;align-items:center}.chat-header-left{gap:0;flex:1;min-width:0}.chat-header-right{gap:8px}.back-button,.chat-header-right{display:flex;align-items:center;flex-shrink:0}.back-button{justify-content:center;background:transparent;border:none;cursor:pointer;padding:0;-webkit-tap-highlight-color:transparent}.back-button,.back-button svg{width:32px;height:32px}.character-info{display:flex;align-items:center;gap:4px;height:32px;max-width:160px;background:rgba(0,0,0,.2);border-radius:16px;padding:4px 8px 4px 4px;cursor:pointer}.character-avatar{width:24px;height:24px;border-radius:12px;-o-object-fit:cover;object-fit:cover;flex-shrink:0}.character-name{color:#fff;font-size:12px;font-weight:400;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex-shrink:1;min-width:0}.model-button{padding-right:16px;background:rgba(0,0,0,.2);border-radius:16px;max-width:97px;cursor:pointer;border:none;-webkit-tap-highlight-color:transparent}.model-button,.model-button-icon{display:flex;align-items:center;height:32px}.model-button-icon{width:32px;justify-content:center}.model-button-icon svg{width:32px;height:32px}.model-button-text{color:#fff;font-size:12px;font-weight:400;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex-shrink:1}.setting-button{display:flex;align-items:center;justify-content:center;background:transparent;border-radius:16px;border:none;cursor:pointer;-webkit-tap-highlight-color:transparent}.setting-button,.setting-button svg{width:32px;height:32px}.chat-list-container{display:flex;flex-direction:column;flex:1;width:100%;-webkit-overflow-scrolling:touch;touch-action:pan-y;pointer-events:auto;overscroll-behavior:contain;position:relative;z-index:1;min-height:0}.message-item-wrapper{width:100%}.message-row{display:flex;flex-direction:column;width:100%}.message-inner-row{display:flex;flex-direction:row;align-items:center;gap:1px;width:100%}.message-row.user .message-inner-row{justify-content:flex-end}.message-row.character .message-inner-row{justify-content:flex-start}.message-failed-button{border:none;background:transparent;padding:0 0 0 8px;height:18px;display:flex;align-items:center;justify-content:center;cursor:pointer;-webkit-tap-highlight-color:transparent}.message-failed-button svg,.operation-btn svg{display:block}.last-msg-operations{padding-top:6px;padding-left:12px;padding-right:12px;display:flex;flex-direction:row;align-items:center;gap:16px}.operation-btn{border:none;background:transparent;padding:0;display:flex;justify-content:center;cursor:pointer;-webkit-tap-highlight-color:transparent}.message-row.virtual,.operation-btn{align-items:center}.virtual-content{max-width:100%;width:100%;align-self:center;padding:12px 16px 12px 12px;border-radius:12px;font-size:12px;line-height:16px;text-align:left;color:hsla(0,0%,100%,.7)}.message-gap{height:20px}.message-full-container{max-width:100%;min-width:0;padding:0 16px}.message-full-container.char-msg-content{color:var(--text-primary);width:100%}.message-full-container.user-msg-content{color:rgba(0,0,0,.8)}@media (min-width:864px){.message-full-container.user-msg-content{width:100%;align-items:flex-end}.char-message-bubble,.user-message-bubble{max-width:70%}}.message-content{font-size:14px;line-height:1.5;display:flex;flex-direction:column;gap:20px}.message-content.virtual-content{gap:1px}.char-message-bubble{border-radius:10px;border-top-left-radius:2px;background:var(--bubble-bg-char)}.char-message-bubble,.user-message-bubble{width:-moz-fit-content;width:fit-content;padding:12px 14px;font-size:14px;font-weight:400;line-height:18px}.user-message-bubble{border-radius:10px;border-top-right-radius:2px;background:var(--bubble-bg-user)}.narration-segment{text-shadow:0 4px 20px #000;font-size:14px;font-weight:400;line-height:20px}.message-content iframe{border:none;display:block;background:transparent}.loading-more{display:flex;justify-content:center;align-items:center;padding:16px 0}.loading-more.loading-header{position:sticky;top:0;z-index:10}.loading-spinner{width:24px;height:24px;border:2px solid hsla(0,0%,100%,.3);border-top-color:#fff;border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(1turn)}}.chat-bar{padding:8px 12px 0;padding-bottom:calc(var(--safe-area-bottom) + 8px);flex-shrink:0;position:relative;z-index:2}.chat-bar-top{justify-content:space-between;margin-bottom:8px}.chat-bar-top,.role-card-button{display:flex;align-items:center;height:32px}.role-card-button{background:rgba(0,0,0,.2);border-radius:16px;padding-right:16px;padding-top:8px;padding-bottom:8px;min-width:74px;max-width:96px;border:none;cursor:pointer;-webkit-tap-highlight-color:transparent}.role-card-icon{display:flex;align-items:center;justify-content:center}.role-card-icon,.role-card-icon svg{width:32px;height:32px}.role-card-text{color:#fff;font-size:12px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex-shrink:1;min-width:0}.input-container{display:flex;align-items:center;background:hsla(0,0%,100%,.1);-webkit-backdrop-filter:blur(15px);backdrop-filter:blur(15px)}.input-container.multiline{align-items:flex-end}.input-field{flex:1;background:transparent;border:none;color:#fff;outline:none;resize:none;font-family:inherit}.input-field::-moz-placeholder{color:hsla(0,0%,100%,.7)}.input-field::placeholder{color:hsla(0,0%,100%,.7)}.input-buttons{display:flex;align-items:center}.send-button{width:32px;height:32px}.asterisk-button,.send-button{display:flex;align-items:center;justify-content:center;background:transparent;border:none;cursor:pointer;padding:0;-webkit-tap-highlight-color:transparent}.asterisk-button svg,.send-button svg{display:block}@keyframes fade-in{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.message-row.new-message{animation:fade-in .2s ease-out}.chat-list-container::-webkit-scrollbar{width:4px}.chat-list-container::-webkit-scrollbar-track{background:transparent}.chat-list-container::-webkit-scrollbar-thumb{background:hsla(0,0%,100%,.3);border-radius:2px}.message-pending{opacity:.7}.streaming-pending{display:inline}.typing-cursor{display:inline-block;width:2px;height:16px;background-color:currentcolor;margin-left:2px;vertical-align:text-bottom;animation:cursor-blink .8s step-end infinite}@keyframes cursor-blink{0%,to{opacity:1}50%{opacity:0}}.loading-dots{display:flex;flex-direction:row;align-items:center;justify-content:space-between;width:calc(var(--scale-factor, 1) * 34px);height:20px}.loading-dot{width:calc(var(--scale-factor, 1) * 7px);height:calc(var(--scale-factor, 1) * 7px);background-color:#fff;border-radius:50%;animation:dot-fade 1.2s ease-in-out infinite}.waiting-for-stream .loading-dots{display:flex;flex-direction:row;align-items:center;justify-content:space-between;width:34px;height:20px}.waiting-for-stream .loading-dot{width:7px;height:7px;background-color:#fff;border-radius:50%;animation:dot-fade 1.2s ease-in-out infinite}.waiting-for-stream .loading-dot:first-child{animation-delay:0s}.waiting-for-stream .loading-dot:nth-child(2){animation-delay:.2s}.waiting-for-stream .loading-dot:nth-child(3){animation-delay:.4s}@keyframes dot-fade{0%,to{opacity:1}50%{opacity:.2}}.top-gradient{top:0;height:120px;background:linear-gradient(180deg,rgba(0,0,0,.7) 0,transparent);z-index:1;opacity:1}.bottom-overlay,.top-gradient{position:absolute;left:0;right:0;pointer-events:none}.bottom-overlay{bottom:0;height:calc(var(--safe-area-bottom) + 250px);background:linear-gradient(to top,var(--primary-color-90) 0,var(--primary-color-90) var(--safe-area-bottom),var(--primary-color-0) calc(var(--safe-area-bottom) + 250px));z-index:0}.chat-bar,.chat-header{pointer-events:auto}button{-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.asterisk-button,.back-button,.character-info,.model-button,.role-card-button,.send-button,.setting-button{transition:opacity .1s ease,transform .1s ease}.asterisk-button:active,.back-button:active,.character-info:active,.model-button:active,.role-card-button:active,.send-button:active,.setting-button:active{opacity:.7;transform:scale(.95)}.chat-container .character-info,.chat-container .model-button,.chat-container .role-card-button{background:rgba(0,0,0,.2)}.chat-container .asterisk-button,.chat-container .back-button,.chat-container .send-button,.chat-container .setting-button{background:transparent}.chat-container .input-container{background:hsla(0,0%,100%,.1)}