:root{font-family:Inter,Segoe UI,system-ui,-apple-system,BlinkMacSystemFont,sans-serif;line-height:1.5;font-weight:400;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}body{margin:0;min-width:320px}button,input,select{font-family:inherit}:root{color-scheme:dark;font-family:Inter,Segoe UI,system-ui,-apple-system,BlinkMacSystemFont,sans-serif;--color-background: #0b0f14;--color-surface: #11161d;--color-surface-subtle: #151c24;--color-overlay: rgba(9, 15, 22, .65);--color-accent: #53ffe2;--color-glacier: #8bd3ff;--color-text-primary: #e6edf3;--color-text-secondary: #9fb0c0;--color-divider: #1f2a35;--color-coral: #ff6b6b;--color-accent-soft: rgba(83, 255, 226, .15);--shadow-elevated: 0 18px 70px rgba(6, 12, 18, .45);--font-heading: "Inter", sans-serif;--font-mono: "Courier New", monospace}*,*:before,*:after{box-sizing:border-box}body{margin:0;min-height:100vh;background-image:radial-gradient(1400px 700px at 85% -10%,rgba(139,211,255,.16),transparent),radial-gradient(1200px 600px at 15% 0%,rgba(83,255,226,.12),transparent),linear-gradient(180deg,#060b11e6,#060b11fa);color:var(--color-text-primary)}.app{min-height:100vh}.app__container{max-width:1500px;margin:0 auto;padding:44px 24px 80px;display:flex;flex-direction:column;gap:24px;flex:1;min-height:0;width:100%}.main-actions{display:flex;gap:12px;justify-content:center;margin-bottom:24px}.main-actions .button{min-width:160px;padding:12px 24px;font-size:1rem;font-weight:600}.main-layout{display:flex;gap:24px;align-items:stretch;flex:1;min-height:0}.main-layout__left{flex:0 0 30%;min-width:0}.main-layout__left .panel__grid{grid-template-columns:1fr}.main-layout__right{flex:1;min-width:0;display:flex;flex-direction:column;min-height:0}.app__header{display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;gap:8px;padding-bottom:32px;margin-bottom:24px}.app__header-brand{display:flex;align-items:center;gap:16px}.app__header-brand-link{display:inline-flex;align-items:center;gap:16px;text-decoration:none;transition:opacity .2s ease}.app__header-brand-link:hover{opacity:.8}.app__header-logo{width:48px;height:48px;border-radius:16px;background:radial-gradient(circle at 30% 20%,var(--color-accent),var(--color-background));padding:0;flex-shrink:0}.app__header-logo img{width:100%;height:100%;object-fit:cover;border-radius:16px}.app__header-brand-text{display:flex;flex-direction:column;text-align:left}.app__header-project-name{font-family:var(--font-heading);font-size:1.1rem;font-weight:700;letter-spacing:.06em;color:var(--color-text-primary);margin:0;text-transform:uppercase}.app__header-author{font-size:.875rem;color:var(--color-text-secondary);letter-spacing:.04em;margin:0}.app__header-portfolio-link{display:inline-flex;align-items:center;gap:12px;text-decoration:none;transition:opacity .2s ease}.app__header-portfolio-link:hover{opacity:.8}.app__header-portfolio-link-text{display:flex;flex-direction:column;text-align:right}.app__header-portfolio-link-text>div:first-child{font-size:.875rem;font-weight:500;color:var(--color-text-primary)}.app__header-portfolio-link-text>div:last-child{font-size:.75rem;color:var(--color-text-secondary)}.app__header-portfolio-icon{width:40px;height:40px;border-radius:12px;display:flex;align-items:center;justify-content:center;background:#ffffff14;border:1px solid rgba(255,255,255,.12);flex-shrink:0}.app__header-portfolio-icon svg{width:20px;height:20px;color:var(--color-accent)}.app__header h1{margin:0;font-size:1.1rem;font-weight:700;letter-spacing:-.02em}.app__header-status{display:flex;align-items:flex-start;padding-top:4px}@media(max-width:768px){.app__header{flex-direction:row;align-items:center;gap:12px;padding-bottom:16px;margin-bottom:16px}.app__header-portfolio-link{width:auto;min-width:44px}.app__header-portfolio-link-text{display:none}.app__header-portfolio-icon{width:36px;height:36px}.app__header-portfolio-icon svg{width:18px;height:18px}.app__header-status{width:100%}}.muted{color:#64748b}.small{font-size:.85rem}.status-group{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.status-pill{display:inline-flex;align-items:center;gap:6px;padding:6px 14px;border-radius:999px;font-weight:600;font-size:.875rem;background-color:#ffffff14;color:var(--color-text-secondary);border:1px solid rgba(255,255,255,.08)}.status-pill--connected{color:#17f0c9;border-color:#17f0c959}.status-pill--connecting{color:#ffb74a;border-color:#ffb74a59}.status-pill--disconnected{color:var(--color-text-secondary)}.status-pill--error{color:#ff6b6b;border-color:#ff6b6b59}.status-pill--phase{color:var(--color-glacier);border-color:#8bd3ff59}.banner{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 20px;border-radius:16px;border:1px solid #fecaca}.banner--error{background-color:#fee2e2;color:#7f1d1d}.banner button{background:#7f1d1d;color:#fff;border:none;border-radius:10px;padding:8px 16px;font-weight:600;cursor:pointer;transition:transform .2s ease,box-shadow .2s ease}.banner button:hover{transform:translateY(-1px);box-shadow:0 8px 16px #7f1d1d4d}.banner button:focus-visible{outline:3px solid rgba(127,29,29,.4);outline-offset:2px}.panel{background-color:var(--color-surface);border:1px solid var(--color-divider);border-radius:22px;padding:28px 32px;box-shadow:var(--shadow-elevated);display:flex;flex-direction:column;gap:24px}.panel__header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap}.panel__header h2{margin:0;font-size:1.3rem;font-weight:700;color:var(--color-text-primary)}.panel__grid{display:grid;gap:24px;grid-template-columns:repeat(auto-fit,minmax(260px,1fr))}.tabs{display:flex;flex-direction:column;gap:16px;flex:1;min-height:0}.tabs__list{display:flex;gap:8px;border-bottom:1px solid var(--color-divider)}.tabs__tab{background:transparent;color:var(--color-text-secondary);border:1px solid transparent;border-bottom:2px solid transparent;padding:10px 14px}.tabs__tab.is-active{color:var(--color-text-primary);border-bottom-color:var(--color-accent)}.back-to-wizard-button{background:transparent;color:var(--color-accent);border:1px solid rgba(83,255,226,.3);padding:6px 14px;cursor:pointer;font-size:.875rem;font-weight:600;border-radius:999px;transition:all .2s ease;white-space:nowrap}.back-to-wizard-button:hover{background:var(--color-accent-soft);border-color:#53ffe280;color:var(--color-accent)}.tabs__panel{padding-top:4px;display:flex;flex-direction:column;min-height:0;flex:1}.live-view{display:flex;flex-direction:column;flex:1;min-height:0}.live-view__main{display:flex;gap:24px;flex:1;min-height:0;align-items:stretch}.live-view__world{flex:0 0 65%;display:flex;flex-direction:column;gap:8px;min-width:0;min-height:0}.live-view__world-image-wrapper{position:relative;width:100%}.live-view__world-image-wrapper:fullscreen{display:flex;align-items:center;justify-content:center;background:#000;width:100vw;height:100vh;padding:0}.live-view__world-image-wrapper:fullscreen img{width:100%;height:100%;max-height:none;max-width:none;object-fit:contain;border-radius:0;border:none;box-shadow:none}.live-view__world-image-wrapper:fullscreen .live-view__fullscreen-btn,.live-view__world-image-wrapper:fullscreen .live-view__download-btn,.live-view__world-image-wrapper:fullscreen .live-view__image-nav,.live-view__world-image-wrapper:fullscreen .live-view__image-counter{z-index:20}.live-view__world img{width:100%;max-height:50vh;object-fit:cover;border-radius:16px;border:1px solid var(--color-divider);box-shadow:0 8px 24px #0000004d}.live-view__character-avatar-overlay{position:absolute;top:12px;right:12px;width:80px;height:80px;border-radius:50%;border:3px solid var(--color-surface);box-shadow:0 4px 12px #0006;overflow:hidden;display:none}.live-view__character-avatar-mini,.actions__row--generate-mobile{display:none}.live-view__character-avatar-overlay img{width:100%;height:100%;object-fit:cover;border-radius:50%;border:none;box-shadow:none;max-height:none}.live-view__image-nav{position:absolute;top:50%;transform:translateY(-50%);background:#00000080;color:#fff;border:2px solid rgba(255,255,255,.3);border-radius:50%;width:44px;height:44px;display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:1.2rem;transition:all .2s ease;z-index:10;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}.live-view__image-nav:hover{background:#000000b3;border-color:#ffffff80;transform:translateY(-50%) scale(1.1)}.live-view__image-nav--prev{left:12px}.live-view__image-nav--next{right:12px}.live-view__image-counter{position:absolute;bottom:12px;left:50%;transform:translate(-50%);background:#0009;color:#fff;padding:6px 12px;border-radius:20px;font-size:.875rem;font-weight:600;z-index:10;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);border:1px solid rgba(255,255,255,.2)}.live-view__fullscreen-btn{position:absolute;top:12px;right:12px;background:#00000080;color:#fff;border:2px solid rgba(255,255,255,.3);border-radius:50%;width:44px;height:44px;display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:1.2rem;transition:all .2s ease;z-index:10;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}.live-view__fullscreen-btn:hover{background:#000000b3;border-color:#ffffff80;transform:scale(1.1)}.live-view__download-btn{position:absolute;bottom:12px;right:12px;background:#00000080;color:#fff;border:2px solid rgba(255,255,255,.3);border-radius:50%;width:44px;height:44px;display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:1.2rem;transition:all .2s ease;z-index:10;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}.live-view__download-btn:hover{background:#000000b3;border-color:#ffffff80;transform:scale(1.1)}.live-view__right{flex:0 0 35%;display:flex;flex-direction:column;gap:12px;min-width:0;min-height:0}.live-view__portrait{display:flex;flex-direction:column;gap:8px;align-items:center;flex-shrink:0;width:100%}.live-view__portrait img{width:100%;max-width:250px;max-height:250px;aspect-ratio:1 / 1;border-radius:16px;border:1px solid var(--color-divider);background:var(--color-surface-subtle);box-shadow:0 8px 24px #0000004d;object-fit:cover}.live-view__name{font-weight:700;font-size:1rem;color:var(--color-text-primary);text-align:center;margin-bottom:0}.live-view__name--world,.live-view__name--character{font-size:1.1rem}.live-view__controls{display:flex;gap:8px;justify-content:center;flex-shrink:0;padding:8px 0}.live-view__controls--mobile{display:none}.live-view__controls--desktop{display:flex;flex-direction:column;gap:12px;width:100%;align-items:center}.live-view__controls--desktop .main-actions{width:100%;max-width:250px;justify-content:center}.live-view__transcript{flex:1;min-height:200px;max-height:400px;overflow-y:auto;margin-top:12px}.live-view__world .live-view__transcript{margin-top:12px}.live-view__character-section-mobile{display:none}@media(max-width:768px){.live-view__main{flex-direction:column;gap:0;height:100%;min-height:calc(100vh - 120px)}.live-view__world{flex:none;width:100%;display:flex;flex-direction:column}.live-view__name--world{display:none}.live-view__world-image-wrapper{width:100%;position:relative}.live-view__world img{width:100%;max-height:35vh;object-fit:cover;display:block}.live-view__character-avatar-mini{position:absolute;top:8px;left:8px;width:10%;height:10%;min-width:40px;min-height:40px;border-radius:8px;border:2px solid rgba(255,255,255,.8);overflow:hidden;box-shadow:0 2px 8px #0006;z-index:10}.live-view__character-avatar-mini img{width:100%;height:100%;object-fit:cover}.live-view__character-section-mobile{display:flex;flex-direction:column;gap:12px;padding:16px;background:var(--color-surface-subtle);border-top:1px solid var(--color-divider);border-bottom:1px solid var(--color-divider)}.live-view__character-section-mobile--collapsed{padding:8px 16px}.live-view__character-section-mobile--collapsed .live-view__character-top-row{display:none}.live-view__character-info-toggle{width:100%;padding:10px 16px;background:var(--color-surface);border:1px solid var(--color-divider);border-radius:8px;color:var(--color-text-primary);font-weight:500;cursor:pointer;transition:background .2s}.live-view__character-info-toggle:hover{background:var(--color-surface-subtle)}.live-view__character-top-row{display:flex;gap:12px;align-items:center}.live-view__character-avatar-container{flex:0 0 50%;display:flex;align-items:center;justify-content:center}.live-view__character-avatar-mobile{width:100%;max-width:150px;aspect-ratio:1 / 1;border-radius:12px;border:2px solid var(--color-divider);overflow:hidden;box-shadow:0 4px 12px #0000004d}.live-view__character-avatar-mobile img{width:100%;height:100%;object-fit:cover}.live-view__character-name-container{flex:0 0 50%;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:8px}.live-view__character-name-mobile{font-weight:700;font-size:1.1rem;color:var(--color-text-primary);text-align:left;width:100%}.character-state-simple-mobile{display:flex;flex-direction:column;gap:8px;width:100%}.character-state-row-mobile{display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding:8px 0;border-bottom:1px solid var(--color-divider)}.character-state-row-mobile:last-child{border-bottom:none}.character-state-simple-label-mobile{font-size:.66rem;color:var(--color-text-secondary);text-transform:uppercase;letter-spacing:.05em}.character-state-simple-label-mobile--voice{margin-right:8px}.character-state-simple-value-mobile{font-size:.71rem;font-weight:600;color:var(--color-text-primary)}.live-view__transcript{flex:1;min-height:0;max-height:50vh;overflow-y:auto;padding:8px 16px;margin:0}.live-view__right,.live-view__character-avatar-overlay{display:none}.live-view__character-avatar-mini{display:block}.actions__row--generate-mobile{display:flex;width:100%;justify-content:center}.live-view__controls--mobile{display:flex;position:static;padding:4px 16px;margin:0}.live-view__controls--mobile .main-actions{flex-direction:row;gap:12px;justify-content:center;width:100%;margin:0}.live-view__controls--mobile .button{flex:1;max-width:200px;font-size:.9rem;padding:10px 16px}.live-view__controls--desktop,.live-view__portrait{display:none}}.card{background:var(--color-surface);border:1px solid var(--color-divider);border-radius:16px;overflow:hidden;box-shadow:var(--shadow-elevated)}.card__media{height:140px;background:var(--color-surface-subtle)}.card__media--square{height:140px}.card__media--world{height:auto;aspect-ratio:1 / 1;background:var(--color-surface-subtle)}.card__media img{width:100%;height:100%;object-fit:cover}.card__media--world img{object-fit:cover}.card__body{padding:14px}.card__actions{padding:14px;display:flex;justify-content:flex-end}.world-card--horizontal{display:flex;gap:0;overflow:hidden}.world-card__image{flex:0 0 55%;max-height:500px;aspect-ratio:1 / 1;background:var(--color-surface-subtle);overflow:hidden}.world-card__image img{width:100%;height:100%;object-fit:cover}.world-card__content{flex:0 0 35%;display:flex;flex-direction:column;justify-content:space-between;padding:20px;min-width:0}.world-card__body{flex:1;min-height:80px;display:flex;flex-direction:column;max-height:300px;overflow-y:auto;overflow-x:hidden}.world-card__body h3{margin:0 0 12px;font-size:1.5rem;font-weight:700;color:var(--color-text-primary)}.world-card__body p{margin:0;line-height:1.6;color:var(--color-text-secondary);flex:1}.world-card__actions{margin-top:20px;display:flex;justify-content:flex-end}.character-card--horizontal{display:flex;gap:0;overflow:hidden}.character-card__image{flex:0 0 50%;max-height:500px;aspect-ratio:1 / 1;background:var(--color-surface-subtle);overflow:hidden}.character-card__image img{width:100%;height:100%;object-fit:cover}.character-card__content{flex:1 1 40%;display:flex;flex-direction:column;padding:20px;min-width:0;box-sizing:border-box;height:500px;max-height:500px}.modal .character-card__content{height:auto;max-height:none;min-height:200px}.character-card__body{flex:1;width:100%;box-sizing:border-box;word-break:normal;overflow-wrap:break-word;-webkit-hyphens:none;hyphens:none;max-height:300px;overflow-y:auto;overflow-x:hidden}.character-card__body h3{margin:0 0 12px;font-size:1.5rem;font-weight:700;color:var(--color-text-primary)}.character-card__body p{margin:0 0 16px;line-height:1.6;color:var(--color-text-secondary);font-size:1.1rem!important;width:100%;box-sizing:border-box;word-break:normal;overflow-wrap:break-word;-webkit-hyphens:none;hyphens:none}.character-card__body p:last-child{margin-bottom:0}.character-card__detail{margin-top:16px;width:100%;box-sizing:border-box}.character-card__detail:first-of-type{margin-top:20px}.character-card__detail p{margin:8px 0 0;font-size:1.1rem!important;width:100%;box-sizing:border-box;word-break:normal;overflow-wrap:break-word;-webkit-hyphens:none;hyphens:none}.character-card__label{display:block;font-size:1.1rem;margin-bottom:4px;width:100%;box-sizing:border-box}.character-card__tags{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px;width:100%}.character-card__tag{display:inline-block;padding:6px 12px;border-radius:16px;font-size:.9rem;font-weight:500;text-transform:capitalize;white-space:nowrap}.character-card__tag--mood{background-color:#e0f2fe;color:#0369a1;border:1px solid #bae6fd}.character-card__tag--gesture{background-color:#fef3c7;color:#92400e;border:1px solid #fde68a}.character-card__details-section{margin-top:16px}.character-card__details-toggle{display:none;background:transparent;border:1px solid var(--color-divider);border-radius:8px;padding:8px 12px;width:100%;cursor:pointer;font-weight:600;color:var(--color-text-primary);align-items:center;justify-content:space-between;transition:all .2s ease}.character-card__details-toggle:hover{background:var(--color-surface-subtle);border-color:var(--color-accent)}.character-card__details-chevron{flex-shrink:0;margin-left:8px}.character-card__details{display:block;overflow:hidden}@media(max-width:720px){.character-card__details-toggle{display:flex}.character-card__details{max-height:0;opacity:0;transition:max-height .3s ease,opacity .3s ease;overflow:hidden}.character-card__details--expanded{max-height:2000px;opacity:1;margin-top:12px}}.character-card__actions{margin-top:20px;display:flex;justify-content:flex-end}.carousel{display:grid;gap:12px;touch-action:pan-y pinch-zoom;user-select:none;-webkit-user-select:none}.carousel__viewport{touch-action:pan-x pan-y}.carousel__controls{display:flex;align-items:center;gap:8px;justify-content:center;margin-top:16px;margin-bottom:8px}.carousel__viewport{position:relative}.carousel__empty{text-align:center;padding:32px}.modal{position:fixed;inset:0;display:grid;place-items:center;z-index:1000}.modal__backdrop{position:absolute;inset:0;background:#0009;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}.modal__dialog{position:relative;width:75vw;max-width:1200px;background:var(--color-surface);border:1px solid var(--color-divider);border-radius:16px;padding:16px;box-shadow:var(--shadow-elevated);display:flex;flex-direction:column;max-height:90vh}.modal__header{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px;flex-shrink:0}.modal__body{display:grid;gap:12px;overflow-y:auto;overflow-x:hidden;min-height:0;flex:1}.modal__footer{display:flex;justify-content:flex-end;gap:8px;margin-top:8px;flex-shrink:0}.create-modal__container{display:grid;grid-template-columns:1fr 1fr;gap:24px;align-items:start}.create-modal__settings{display:flex;flex-direction:column;gap:16px}.create-modal__result{position:sticky;top:0;max-height:calc(90vh - 100px);overflow-y:auto}.world-card--vertical,.character-card--vertical{display:flex;flex-direction:column}.world-card--vertical .world-card__image,.character-card--vertical .character-card__image{width:100%;aspect-ratio:1 / 1;max-height:300px;flex:0 0 auto}.world-card--vertical .world-card__content,.character-card--vertical .character-card__content{flex:1;padding:20px;height:auto;max-height:none}.json-editor__toolbar{display:flex;gap:8px;align-items:center;margin-bottom:8px}.json-editor__textarea{width:100%;background:var(--color-surface-subtle);border:1px solid var(--color-divider);color:var(--color-text-primary);border-radius:8px;padding:10px}.badge{display:inline-flex;align-items:center;gap:.35rem;border-radius:999px;padding:.35rem .6rem;font-size:.75rem;background:#ffffff14;color:var(--color-text-secondary);border:1px solid rgba(255,255,255,.08)}.badge--success{color:#17f0c9;border-color:#17f0c959}.badge--error{color:#ff6b6b;border-color:#ff6b6b59}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.spinner{border:2px solid rgba(255,255,255,.2);border-top-color:var(--color-text-primary);border-radius:50%;animation:spin .8s linear infinite}.panel__section{display:flex;flex-direction:column;gap:16px}.button-group{display:flex;flex-wrap:wrap;gap:10px}.button{border:1px solid rgba(255,255,255,.08);background:#ffffff0a;color:var(--color-text-primary);font-weight:600;padding:10px 18px;border-radius:12px;cursor:pointer;transition:all .2s ease;box-shadow:inset 0 0 0 1px #ffffff0a}.button:hover:not(:disabled){transform:translateY(-1px)}.button:disabled{cursor:not-allowed;opacity:.55}.button--active{background:linear-gradient(135deg,#4f46e5,#6366f1);color:#fff;border-color:transparent;box-shadow:0 15px 35px #4f46e559}.button--primary{background:linear-gradient(120deg,var(--color-accent) 0%,var(--color-glacier) 100%);color:#082025;border:none;box-shadow:0 12px 30px #53ffe229}.button--primary.button--danger{background:linear-gradient(120deg,#dc3545,#c82333);color:#fff;box-shadow:0 12px 30px #dc35454d}.button--primary:hover:not(:disabled){box-shadow:0 18px 34px #4f46e573;transform:translateY(-1px)}.button--primary:disabled{background:#cbd5f5;color:#475569;box-shadow:none}.button--create{background:#ffb74a26;color:#ffb74a;border:1px solid rgba(255,183,74,.3);box-shadow:0 4px 12px #ffb74a1a}.button--create:hover:not(:disabled){background:#ffb74a38;border-color:#ffb74a66;box-shadow:0 6px 16px #ffb74a26}.toggle{display:flex;gap:14px;align-items:flex-start;padding:12px 14px;border-radius:16px;border:1px solid var(--color-divider);background:var(--color-surface-subtle)}.toggle input{margin-top:4px;width:20px;height:20px;accent-color:#6366f1;cursor:pointer}.toggle span{display:block}.toggle strong{display:block;font-size:.96rem;color:var(--color-text-primary)}.toggle small{display:block;color:#64748b;margin-top:4px;font-size:.8rem}.form-control{display:flex;flex-direction:column;gap:8px}.form-control span{font-weight:600;color:var(--color-text-primary)}select,input[type=range]{width:100%;font-family:inherit}select{border:1px solid var(--color-divider);background:var(--color-surface);padding:10px 14px;font-size:1rem;border-radius:12px;transition:border-color .2s ease,box-shadow .2s ease;color:var(--color-text-primary)}select:focus-visible{outline:none;box-shadow:0 0 0 2px #53ffe240;border-color:#53ffe273}.voice-select{position:relative;width:100%}.voice-select.is-disabled{opacity:.6;pointer-events:none}.voice-select__button{width:100%;text-align:left;border:1px solid var(--color-divider);background:var(--color-surface);padding:10px 14px;font-size:1rem;border-radius:12px;transition:border-color .2s ease,box-shadow .2s ease;color:var(--color-text-primary);display:flex;align-items:center;justify-content:space-between;gap:12px}.voice-select__button:focus-visible{outline:none;box-shadow:0 0 0 2px #53ffe240;border-color:#53ffe273}.voice-select__caret{width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid var(--color-text-secondary);transition:transform .2s ease}.voice-select.is-open .voice-select__caret{transform:rotate(180deg)}.voice-select__list{position:absolute;top:calc(100% + 6px);left:0;right:0;max-height:240px;overflow-y:auto;background:var(--color-surface);border:1px solid var(--color-divider);border-radius:12px;box-shadow:0 12px 24px #00000059;padding:6px 0;z-index:20}.voice-select__option{padding:8px 14px;cursor:pointer;color:var(--color-text-primary)}.voice-select__option.is-selected{font-weight:600;color:var(--color-accent)}.voice-select__option.is-highlighted{background:#53ffe214}.voice-select__option.is-empty{color:var(--color-text-secondary);cursor:default}input[type=range]{accent-color:#6366f1}.actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:24px}.actions__row{display:flex;flex-wrap:wrap;gap:12px}.button--carousel-nav,.carousel__position--mobile{display:none}.wizard-step{display:flex;flex-direction:column;gap:24px;width:100%}.wizard-step h2{margin:0;font-size:1.5rem;font-weight:700;color:var(--color-text-primary)}.start-step__preview{display:flex;gap:16px;width:100%;margin:24px 0}.start-step__preview-item{display:flex;flex-direction:column;align-items:center;gap:12px;flex:1;min-width:0}.start-step__preview-item--world,.start-step__preview-item--character{flex:0 0 50%}.start-step__preview-label{font-size:.875rem;font-weight:600;color:var(--color-text-secondary);text-transform:uppercase;letter-spacing:.05em}.start-step__preview-image{width:100%;aspect-ratio:1.55 / 1;object-fit:cover;border-radius:16px;border:2px solid var(--color-divider);box-shadow:0 8px 24px #0000004d}.start-step__preview-name{font-weight:600;color:var(--color-text-primary);text-align:center;font-size:1rem}.start-step__preview-voice{font-size:.875rem;text-align:center;color:var(--color-text-secondary);margin-top:-4px}@media(max-width:720px){.start-step__preview{gap:12px}}.conversation{display:flex;flex-direction:column;gap:16px;max-height:420px;overflow-y:auto;padding-right:4px}.conversation-row{display:flex;flex-direction:column;gap:8px;padding:16px 18px;border-radius:16px;border:1px solid var(--color-divider);background:var(--color-surface-subtle);transition:transform .15s ease}.conversation-row--assistant{border-left:4px solid var(--color-glacier)}.conversation-row--user{border-left:4px solid var(--color-accent);align-self:flex-end}.conversation-row--partial{border-style:dashed;opacity:.88}.conversation-meta{display:flex;gap:10px;align-items:center;font-size:.82rem;color:#475569}.conversation-role{font-weight:700;letter-spacing:.04em;text-transform:uppercase}.conversation-time{font-variant-numeric:tabular-nums}.conversation p{margin:0;line-height:1.55;color:var(--color-text-primary)}.conversation::-webkit-scrollbar{width:8px}.conversation::-webkit-scrollbar-thumb{background:#94a3b84d;border-radius:999px}.conversation::-webkit-scrollbar-thumb:hover{background:#475569cc}@media(max-width:1024px){.main-layout__left{flex:0 0 35%}.world-card__image{flex:0 0 50%;max-height:400px}.world-card__content{flex:0 0 40%}.character-card__image{flex:0 0 50%;max-height:400px}.character-card__content{flex:0 0 40%;height:400px;max-height:400px}}@media(max-width:720px){.app__container{padding:32px 18px 60px}.main-layout{flex-direction:column}.main-layout__left,.main-layout__right{flex:none}.panel{padding:24px}.app__header h1{font-size:1.9rem}.actions{flex-direction:column}.main-actions{flex-direction:column;align-items:center}.main-actions .button{width:100%;max-width:300px}.world-card--horizontal{flex-direction:column}.world-card__image{width:100%;max-width:100%;aspect-ratio:1 / 1;max-height:300px}.world-card__content{padding:20px}.world-card__body{max-height:200px}.world-card__body h3{font-size:1.3rem}.character-card--horizontal{flex-direction:column}.character-card__image{width:100%;max-width:100%;aspect-ratio:1 / 1;max-height:300px}.character-card__content{padding:20px;height:auto;max-height:none}.character-card__body{max-height:200px}.character-card__body h3{font-size:1.3rem}.character-card__details{display:block}.wizard-step{min-height:0;max-height:calc(100vh - 120px);overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;padding-bottom:100px}.wizard-step h2{font-size:1.3rem;margin-bottom:8px}.wizard-step .actions{position:fixed;bottom:0;left:0;right:0;background:var(--color-background);border-top:1px solid var(--color-divider);padding:12px 18px;margin-top:16px;margin-bottom:0;z-index:100;box-shadow:0 -4px 12px #0000001a;flex-direction:column}.wizard-step .actions__row{width:100%}.wizard-step .actions .button{width:100%;font-size:.9rem;padding:10px 16px}.button--carousel-nav,.carousel__position--mobile{display:flex;align-items:center}.button--carousel-nav{flex:0 0 auto;min-width:40px;max-width:50px;width:40px;padding:10px 8px;font-size:1rem}.carousel__position--mobile{margin:0 4px;font-size:.85rem;flex:0 0 auto;min-width:auto;white-space:nowrap}.actions__row--mobile-nav{display:flex;flex-wrap:nowrap;gap:4px;justify-content:center;overflow:hidden}.actions__row--mobile-nav .button{flex-shrink:0}.carousel__controls{display:none}.wizard-step .carousel__viewport{margin-bottom:60px}.modal__dialog{max-height:calc(100vh - 40px);width:calc(100vw - 36px);padding:16px}.modal__dialog{width:92vw}.create-modal__container{grid-template-columns:1fr;gap:16px}.create-modal__result{position:static;max-height:none}.modal__body{-webkit-overflow-scrolling:touch;padding-bottom:8px}.modal__footer{flex-direction:column;gap:8px;padding-top:12px;border-top:1px solid var(--color-divider);margin-top:12px}.modal__footer .button{width:100%}}.debug-info{display:flex;gap:.5rem;align-items:center;flex-wrap:wrap;font-size:.8rem}.debug-panel{margin-top:1rem;border:1px solid var(--color-divider)}.debug-content{display:flex;flex-direction:column;gap:1.5rem}.debug-section{border:1px solid var(--color-divider);border-radius:4px;padding:1rem}.stats-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:1rem}.stat-item{display:flex;justify-content:space-between;padding:.5rem;background:var(--color-surface);border-radius:4px}.stat-label{font-weight:500;color:var(--color-text-secondary)}.stat-value{font-weight:600;color:var(--color-text-primary)}.memories-list,.conversations-list{max-height:300px;overflow-y:auto}.memory-item,.session-item{border:1px solid var(--color-divider);border-radius:4px;padding:.75rem;margin-bottom:.5rem;background:var(--color-surface)}.memory-header,.session-header{display:flex;justify-content:space-between;font-size:.875rem;color:var(--color-text-secondary);margin-bottom:.5rem}.memory-type{background:#8bd3ff33;color:var(--color-glacier);padding:.25rem .5rem;border-radius:3px;font-size:.75rem}.summary-badge{background:#53ffe233;color:var(--color-accent);padding:.25rem .5rem;border-radius:3px;font-size:.75rem;margin-left:.5rem}.memory-text{font-size:.875rem;line-height:1.4;color:var(--color-text-primary)}.session-info{display:flex;gap:1rem;font-size:.875rem;color:var(--color-text-secondary)}.session-id{font-family:Courier New,monospace;font-size:.75rem}.toggle-prompt{background:var(--color-surface-subtle);border:1px solid var(--color-divider);border-radius:3px;padding:.25rem .5rem;font-size:.75rem;cursor:pointer;margin-left:.5rem;transition:background-color .2s;position:relative;z-index:10;display:inline-block;color:var(--color-text-primary)}.toggle-prompt:hover{background:var(--color-surface);border-color:var(--color-glacier)}.toggle-prompt:active{background:var(--color-surface-subtle);transform:scale(.98)}.prompt-details{margin-top:1rem;padding:1rem;background:var(--color-surface-subtle);border-radius:4px;border-left:3px solid var(--color-glacier)}.prompt-details h4{margin:0 0 .5rem;font-size:.875rem;color:var(--color-text-primary)}.prompt-content{background:var(--color-surface-subtle);border:1px solid var(--color-divider);border-radius:3px;padding:1rem;font-family:Courier New,monospace;font-size:.875rem;white-space:pre-wrap;max-height:500px;overflow-y:auto;margin:0;word-break:break-word;overflow-wrap:break-word;color:var(--color-text-primary)}.response-metadata{margin-top:.5rem;color:var(--color-text-secondary);font-size:.75rem}.prompts-list{display:flex;flex-direction:column;gap:12px}.prompt-item{border:1px solid var(--color-divider);border-radius:6px;padding:12px;background:var(--color-surface)}.prompt-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px;gap:8px}.prompt-role{font-size:12px;font-weight:600;color:var(--color-text-primary);background:#ffffff14;padding:2px 6px;border-radius:4px}.prompt-time{font-size:11px;color:var(--color-text-secondary)}.prompt-model{font-size:11px;color:var(--color-accent);background:#53ffe226;padding:2px 6px;border-radius:4px}.prompt-response{font-size:13px;line-height:1.4;color:var(--color-text-primary);margin-bottom:8px}.prompt-details summary{font-size:12px;font-weight:600;color:#6366f1;cursor:pointer;padding:4px 0}.prompt-details summary:hover{color:#4f46e5}.prompt-content{font-size:11px;line-height:1.4;color:#374151;background:#f8fafc;border:1px solid #e2e8f0;border-radius:4px;padding:8px;margin:8px 0;white-space:pre-wrap;max-height:300px;overflow-y:auto}.prompt-metadata{margin-top:8px;padding:4px 8px;background:#f1f5f9;border-radius:4px}.prompt-metadata small{font-size:10px;color:#64748b}.conversation-layout{display:flex;gap:16px;align-items:flex-start}.conversation-panel{flex:1;min-width:0}.character-state-panel{flex:0 0 300px;min-width:0}.character-state-item{margin-bottom:16px;padding:12px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px}.character-state-meta{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.character-state-time{font-size:11px;color:#64748b;font-weight:500}.character-state-content{display:flex;flex-direction:column;gap:8px}.character-state-field{display:flex;align-items:center;gap:8px}.character-state-label{font-size:12px;font-weight:600;color:#475569;min-width:60px}.character-state-value{font-size:12px;color:#0f172a}.character-state-mood{padding:2px 8px;border-radius:12px;font-weight:500;text-transform:capitalize}.character-state-mood--neutral{background:#f1f5f9;color:#475569}.character-state-mood--happy{background:#dcfce7;color:#166534}.character-state-mood--sad{background:#fef3c7;color:#92400e}.character-state-mood--angry{background:#fee2e2;color:#991b1b}.character-state-mood--surprised{background:#dbeafe;color:#1e40af}.character-state-mood--curious{background:#e0e7ff;color:#3730a3}.character-state-mood--determined{background:#f3e8ff;color:#7c3aed}.character-state-mood--protective{background:#ecfdf5;color:#065f46}.character-state-mood--tactical{background:#f0f9ff;color:#0c4a6e}.character-state-mood--focused{background:#fefce8;color:#a16207}.character-state-mood--sarcastic{background:#fef2f2;color:#be123c}.character-state-mood--condescending{background:#f1f5f9;color:#334155}.character-state-mood--amused{background:#f0fdf4;color:#166534}.character-state-mood--witty{background:#fefce8;color:#a16207}.character-state-mood--observational{background:#f0f9ff;color:#0c4a6e}.character-state-mood--thoughtful{background:#f8fafc;color:#475569}.character-state-intensity{display:flex;align-items:center;gap:8px;flex:1}.character-state-intensity-bar{height:6px;background:linear-gradient(90deg,#e2e8f0,#3b82f6);border-radius:3px;transition:width .3s ease}.character-state-intensity-value{font-size:11px;color:#64748b;font-weight:500;min-width:24px}.debug-logs-panel{margin-top:24px}.debug-logs{max-height:300px;overflow-y:auto;background:var(--color-surface-subtle);border:1px solid var(--color-divider);border-radius:6px;padding:12px}.debug-logs-content{display:flex;flex-direction:column;gap:4px}.debug-log-entry{font-family:Monaco,Menlo,Ubuntu Mono,monospace;font-size:12px;line-height:1.4;color:var(--color-text-primary);padding:4px 8px;background:var(--color-surface);border-radius:4px;border-left:3px solid var(--color-glacier)}.debug-panel{margin-top:24px}.debug-actions{display:flex;gap:8px}.debug-content{display:flex;flex-direction:column;gap:24px}.debug-section{border:1px solid var(--color-divider);border-radius:8px;padding:16px;background:var(--color-surface-subtle)}.debug-section h3{margin:0 0 16px;font-size:16px;font-weight:600;color:var(--color-text-primary)}.stats-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px}.stat-item{display:flex;justify-content:space-between;align-items:center;padding:8px 12px;background:var(--color-surface);border-radius:6px;border:1px solid var(--color-divider)}.stat-label{font-size:14px;color:var(--color-text-secondary)}.stat-value{font-size:14px;font-weight:600;color:var(--color-text-primary)}.memories-list,.prompts-list{display:flex;flex-direction:column;gap:12px;max-height:400px;overflow-y:auto}.memory-item,.prompt-item{background:var(--color-surface);border:1px solid var(--color-divider);border-radius:6px;padding:12px}.memory-header,.prompt-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px;font-size:12px;color:var(--color-text-secondary)}.memory-type{background:#8bd3ff33;color:var(--color-glacier);padding:2px 6px;border-radius:4px;font-weight:500}.prompt-role{background:#ffffff14;color:var(--color-text-secondary);padding:2px 6px;border-radius:4px;font-weight:500}.prompt-model{background:#53ffe226;color:var(--color-accent);padding:2px 6px;border-radius:4px;font-weight:500}.memory-text,.prompt-response{font-size:14px;line-height:1.5;color:var(--color-text-primary);margin-bottom:8px}.summary-badge{background:#53ffe233;color:var(--color-accent);padding:2px 6px;border-radius:4px;font-size:11px;font-weight:500}.prompt-details{margin-top:8px}.prompt-details summary{cursor:pointer;font-size:12px;color:var(--color-text-secondary);margin-bottom:8px}.prompt-content{background:var(--color-surface-subtle);border:1px solid var(--color-divider);border-radius:4px;padding:12px;font-family:Monaco,Menlo,Ubuntu Mono,monospace;font-size:12px;line-height:1.4;color:var(--color-text-primary);white-space:pre-wrap;overflow-x:auto;max-height:200px;overflow-y:auto}.prompt-metadata{margin-top:8px;font-size:11px;color:var(--color-text-secondary)}.personas-table{overflow-x:auto}.personas-table table{width:100%;border-collapse:collapse;background:var(--color-surface);border-radius:6px;overflow:hidden;border:1px solid var(--color-divider)}.personas-table th,.personas-table td{padding:12px;text-align:left;border-bottom:1px solid var(--color-divider)}.personas-table th{background:var(--color-surface-subtle);font-weight:600;font-size:14px;color:var(--color-text-primary)}.personas-table td{font-size:14px;color:var(--color-text-secondary)}.personas-table .monospace{font-family:Monaco,Menlo,Ubuntu Mono,monospace;font-size:12px;color:var(--color-text-secondary)}.personas-table tbody tr:hover{background:var(--color-surface-subtle)}.conversation-content{display:flex;flex-direction:column;gap:12px}.character-state-simple{margin-top:8px;display:flex;flex-direction:column;gap:6px;width:100%;align-items:center}.character-state-row{display:flex;align-items:baseline;gap:8px;width:100%;justify-content:flex-start;max-width:250px}.character-state-simple-label{color:var(--color-text-secondary);font-weight:600;min-width:72px}.character-state-simple-label--voice{margin-right:8px}.character-state-simple-value{color:var(--color-text-primary)}.main-layout__left--collapsed{flex:0 0 60px;min-width:60px}.main-layout__left--expanded{flex:0 0 30%;min-width:0}.panel__header-content{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%}.panel__header-content h2{margin:0;font-size:1.3rem;font-weight:700;color:#1e293b}.button--small{padding:6px 12px;font-size:.8rem;border-radius:8px}.personality-info{margin-top:8px;padding:8px;background:var(--color-surface-subtle);border:1px solid var(--color-divider);border-radius:6px}.personality-info small{display:block;color:var(--color-text-secondary);font-size:.8rem;line-height:1.4;margin-bottom:8px}.conversation-layout{display:block}.conversation-panel{width:100%}.character-state-panel{display:none}.main-layout__left--collapsed .panel{padding:20px 16px;text-align:center}.main-layout__left--collapsed .panel__header-content h2{font-size:1rem;writing-mode:vertical-rl;text-orientation:mixed;transform:rotate(180deg);white-space:nowrap}.main-layout__left--collapsed .panel__header-content .button{writing-mode:horizontal-tb;text-orientation:mixed;transform:none;padding:8px 12px;font-size:.75rem}.main-layout__left{transition:flex-basis .3s ease,min-width .3s ease}.main-layout__left .panel{transition:padding .3s ease}
