.character-widget{background:var(--home-surface);color:var(--home-text);border:1px solid var(--home-line);border-radius:14px;max-width:100%;margin:12px 0;font-size:14px;overflow:hidden}.character-widget[data-theme=accent]{background:var(--home-accent-soft);border-color:color-mix(in srgb,var(--home-accent) 40%,var(--home-line))}.character-widget[data-theme=paper]{color:#38352e;background:#f4f0e6;border-color:#d9d1bf}.character-widget-heading{text-align:start;width:100%;color:inherit;overflow-wrap:anywhere;background:0 0;border:0;justify-content:space-between;align-items:center;gap:12px;margin:0;padding:14px 18px;font-size:14px;font-weight:650;display:flex}.character-widget button.character-widget-heading{cursor:pointer;min-height:46px}.character-widget-fields{grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:16px;margin:0;padding:0 18px 16px;display:grid}.character-widget-field{min-width:0}.character-widget-field dt{opacity:.7;overflow-wrap:anywhere;margin-bottom:5px;font-size:12px}.character-widget-field dd{overflow-wrap:anywhere;margin:0;font-weight:550;animation:.18s ease-out widget-value-in}.character-widget meter{width:100%;height:6px;accent-color:var(--home-accent);margin-top:8px;display:block}.widget-library-page{width:min(100%,1040px);margin:auto;padding:32px 28px 100px}.widget-library-page h1{margin:26px 0 8px;font-size:28px}.widget-help,.widget-library p{color:var(--home-muted);font-size:14px;line-height:1.6}.widget-library-toolbar{flex-wrap:wrap;justify-content:space-between;gap:12px;margin:24px 0;display:flex}.widget-library-toolbar .ui-select-trigger{width:180px}.widget-library-row{border-bottom:1px solid var(--home-line);justify-content:space-between;align-items:center;gap:20px;padding:24px 0;display:flex}.widget-library-row h2{overflow-wrap:anywhere;margin:0;font-size:18px}.widget-library-row p{margin:6px 0 0}.widget-library-actions{flex-wrap:wrap;gap:8px;display:flex}.widget-empty{text-align:center;padding:48px 0}.widget-empty h2{font-size:20px}.widget-library-modal{width:min(860px,100vw - 32px)}.widget-library-modal>.widget-library{max-height:70dvh;padding:0 24px 24px;overflow:auto}.widget-editor-modal{flex-direction:column;width:min(1060px,100vw - 32px);max-height:calc(100dvh - 32px);padding:0;display:flex}.widget-editor-tools{border-bottom:1px solid var(--home-line);justify-content:space-between;padding:12px 24px;display:flex}.widget-editor-tools>.ui-select-trigger{width:150px}.widget-mobile-tabs{display:none}.widget-editor-body{grid-template-columns:minmax(0,1fr) minmax(0,.8fr);min-height:0;display:grid;overflow:auto}.widget-editor-form{min-width:0;padding:24px}.widget-editor-form fieldset{border:0;min-width:0;margin:0;padding:0}.widget-editor-form label{flex-direction:column;gap:7px;margin-bottom:16px;font-size:14px;display:flex}.widget-editor-form input,.widget-editor-form textarea{background:var(--home-bg);width:100%;min-width:0;color:var(--home-text);border:1px solid var(--home-line);font:inherit;resize:vertical;border-radius:8px;padding:11px 12px;font-size:16px}.widget-editor-form small{color:var(--home-muted);font-size:12px}.widget-form-row{grid-template-columns:1fr 1fr;gap:12px;display:grid}.widget-field-editor{border-top:1px solid var(--home-line);margin:12px 0}.widget-field-editor summary{cursor:pointer;overflow-wrap:anywhere;padding:18px 0;font-weight:600}.widget-field-editor>div>.ui-select-trigger{width:100%;margin-bottom:16px}.widget-number-row{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;display:grid}.widget-field-actions{justify-content:flex-end;gap:8px;margin:8px 0 18px;display:flex}.widget-editor-preview{border-left:1px solid var(--home-line);background:var(--home-bg);min-width:0;padding:24px}.widget-editor-preview>p{color:var(--home-muted);margin-top:0;font-size:13px}.widget-editor-preview>.character-widget{position:sticky;top:16px}.widget-editor-footer{border-top:1px solid var(--home-line);flex-wrap:wrap;flex-shrink:0;justify-content:flex-end;gap:10px;padding:16px 24px;display:flex}.widget-editor-footer p{width:100%;color:var(--home-muted);margin:0;font-size:13px}.studio-widget-section{border-top:1px solid var(--home-line);margin-top:32px;padding-top:24px}.studio-widget-section>header{flex-wrap:wrap;justify-content:space-between;align-items:flex-start;gap:16px;display:flex}.studio-widget-section h3{margin:0 0 8px;font-size:18px}.studio-widget-section header p{color:var(--home-muted);margin:0 0 16px;font-size:14px}.episode-shell .character-widget{width:min(100%,var(--reading-width,780px));flex-shrink:0;margin:12px auto 20px}@keyframes widget-value-in{0%{opacity:.5}to{opacity:1}}@media (max-width:700px){.widget-library-page{padding:24px 18px 100px}.widget-library-row{flex-direction:column;align-items:flex-start;gap:12px}.widget-library-row .ui-button{min-height:42px}.widget-editor-modal{border-radius:0;width:100%;max-width:100%;height:100dvh;max-height:100dvh;margin:0}.widget-editor-tools{padding:10px 16px}.widget-mobile-tabs{gap:6px;display:flex}.widget-mobile-tabs [aria-pressed=true]{background:var(--home-accent-soft);color:var(--home-accent-text)}.widget-editor-body{flex:1;display:block}.widget-editor-body[data-view=edit] .widget-editor-preview,.widget-editor-body[data-view=preview] .widget-editor-form{display:none}.widget-editor-form,.widget-editor-preview{padding:20px 16px}.widget-editor-preview{border:0;min-height:100%}.widget-editor-footer{padding:12px 16px calc(12px + env(safe-area-inset-bottom))}.widget-library-modal{width:calc(100vw - 16px)}.widget-library-modal>.widget-library{padding:0 16px 20px}.widget-number-row label{font-size:12px}.widget-number-row input{padding:10px 7px}}@media (prefers-reduced-motion:reduce){.character-widget-field dd{animation:none}}.character-widget{padding:0}.widget-editor-modal>.ui-modal-header{flex-shrink:0;min-height:64px;margin:0;padding:18px 24px}.widget-editor-modal>.ui-modal-header .ui-modal-close{flex-shrink:0;position:static}.widget-editor-modal>.ui-modal-header h1{margin:0;font-size:20px}.widget-editor-modal{border-color:var(--home-line)}@media (max-width:700px){.widget-editor-modal>.ui-modal-header{padding:14px 16px}.widget-editor-modal{border:0}}.widget-editor-form label{text-align:start}.studio-widget-section{max-width:none;margin-inline:0;padding-bottom:0}.widget-maker{border-bottom:1px solid var(--home-line);flex-shrink:0;margin:0;padding:12px 24px}.widget-maker-content{overscroll-behavior:contain;gap:12px;max-height:50dvh;padding-top:12px;display:grid;overflow:auto}.widget-maker-content>label{gap:8px;font-weight:600;display:grid}.widget-maker-content textarea{border:1px solid var(--home-line);background:var(--home-bg);width:100%;min-height:88px;color:var(--home-text);font:inherit;resize:vertical;border-radius:10px;padding:12px}.widget-maker-actions{flex-wrap:wrap;gap:8px;display:flex}.widget-maker-result{gap:10px;display:grid}.widget-maker-result h3{margin:0;font-size:15px}.widget-maker-result details{font-size:13px;line-height:1.7}.widget-maker-result summary{cursor:pointer}.widget-maker [role=alert]{color:var(--home-text);font-size:13px;line-height:1.6}.widget-maker [role=status]{font-size:13px;line-height:1.6}@media (max-width:600px){.widget-maker{padding:12px 16px}.widget-maker-content{max-height:45dvh}.widget-maker-actions>.ui-button{flex:1}}.widget-maker{width:100%;min-width:0;max-width:none}.widget-maker:has(.widget-maker-content){flex-direction:column;flex:1;min-height:0;display:flex}.widget-maker-content{flex:1;align-content:start;min-height:0;max-height:none;padding-bottom:8px}:is(.widget-editor-modal:has(.widget-maker-content) .widget-editor-body,.widget-editor-modal:has(.widget-maker-content) .widget-editor-footer,.widget-editor-modal:has(.widget-maker-content) .widget-mobile-tabs){display:none}.widget-maker-actions{background:var(--home-surface);z-index:1;padding:12px 0;position:sticky;bottom:-8px}.widget-maker-content>label{font-size:14px}.widget-maker-content textarea{font-size:16px;font-weight:400}.widget-maker>.ui-button{flex-shrink:0;align-self:flex-start}.chat-sheet-widget{width:min(680px,100vw - 32px)}.chat-sheet-widget .chat-sheet-body{align-content:start;gap:18px;display:grid}.chat-sheet-widget .widget-help{margin:0}.player-widget-creator summary{cursor:pointer;font-size:14px}.player-widget-mode{gap:8px;font-size:14px;display:grid}.player-widget-mode .ui-select-trigger{width:100%}.player-widget-preview .character-widget{margin:0}.chat-sheet-widget .chat-sheet-footer{justify-content:flex-end;gap:8px;display:flex}@media (max-width:700px){.chat-sheet-widget{width:100%;max-width:100%}.chat-sheet-widget .widget-library-actions>.ui-button{flex:1;min-height:44px}}.chat-sheet.chat-sheet-widget.ui-modal{width:min(680px,100vw - 32px);height:auto;min-height:0;max-height:calc(100dvh - 32px);margin:auto}.chat-sheet-widget .chat-sheet-body{flex:0 auto}.chat-sheet-widget .chat-sheet-footer{padding-bottom:20px}@media (max-width:700px){.chat-sheet.chat-sheet-widget.ui-modal{width:100%;max-height:calc(100dvh - 16px);margin:auto auto 0}.chat-sheet-widget .chat-sheet-footer{padding-bottom:calc(16px + env(safe-area-inset-bottom))}}.chat-sheet.chat-sheet-widget.ui-modal{height:fit-content}@media (max-width:700px){.chat-sheet-widget .widget-library-actions{grid-template-columns:repeat(2,minmax(0,1fr));display:grid}.chat-sheet-widget .widget-library-actions>.ui-button:first-child{grid-column:1/-1}}.character-widget{--widget-text:var(--home-text);--widget-muted:var(--home-muted);--widget-surface:var(--home-surface);--widget-accent:var(--home-accent);--widget-line:var(--home-line)}.character-widget[data-theme=paper]{--widget-text:#38352e;--widget-muted:#6d6659;--widget-surface:#f4f0e6;--widget-line:#d9d1bf;--widget-accent:#66529a}.widget-template-display{color:var(--widget-text);overflow-wrap:anywhere;white-space:normal;padding:0 18px 18px;line-height:1.6;overflow:hidden}.widget-template-display *{box-sizing:border-box;min-width:0;max-width:100%}.widget-template-display :where(div,section,article,p,h3,h4,ul,ol,li){width:auto;max-width:100%;color:inherit;font:inherit;background:0 0;border:0;margin:0;padding:0}.widget-template-display :where(ul,ol){padding-inline-start:20px}.widget-template-display :where(h3,h4,strong){font-weight:650}.widget-template-display small{font-size:.85em}.widget-template-display hr{border:0;border-top:1px solid var(--widget-line);margin:8px 0}.widget-template-display .widget-template-value{white-space:pre-wrap;animation:.18s ease-out widget-value-in}.widget-template-editor{border-top:1px solid var(--home-line);margin-top:24px;padding-top:16px}.widget-template-editor>summary{cursor:pointer;padding:4px 0;font-weight:600}.widget-template-editor>summary small{margin-inline-start:8px;font-weight:400}.widget-template-editor>label{margin-top:16px}.widget-template-editor textarea{min-height:180px;font-family:ui-monospace,SFMono-Regular,monospace;font-size:13px;line-height:1.6}.widget-template-insert{gap:10px;display:grid}.widget-template-insert>.ui-select-trigger{width:100%}.widget-template-insert>div{flex-wrap:wrap;gap:8px;display:flex}.widget-template-editor [role=alert]{color:var(--home-text);overflow-wrap:anywhere;font-size:13px;line-height:1.6}.widget-template-help{color:var(--home-muted);margin-top:18px;font-size:13px;line-height:1.6}.widget-template-help summary{cursor:pointer}.widget-template-help code{white-space:normal;overflow-wrap:anywhere;font-size:12px}@media (max-width:700px){.widget-template-editor textarea{font-size:16px}.widget-template-insert .ui-button{min-height:44px}}@media (prefers-reduced-motion:reduce){.widget-template-display .widget-template-value{white-space:pre-wrap;animation:none}}.conversation-widgets{width:min(100%,var(--reading-width,780px));gap:8px;margin:16px auto 12px;padding:0;display:grid}.episode-shell .conversation-widget{border-radius:12px;width:100%;margin:0}.conversation-widget-trigger{text-align:start;width:100%;min-height:76px;color:inherit;cursor:pointer;font:inherit;background:0 0;border:0;gap:7px;padding:12px 40px 12px 16px;display:grid;position:relative}.conversation-widget-label{align-items:baseline;gap:10px;min-width:0;font-size:12px;line-height:1.4;display:flex}.conversation-widget-label strong{flex-shrink:0;font-weight:650}.conversation-widget-label>span{white-space:nowrap;text-overflow:ellipsis;opacity:.65;overflow:hidden}.conversation-widget-summary{text-overflow:ellipsis;white-space:nowrap;min-width:0;font-size:13px;line-height:1.5;display:block;overflow:hidden}.conversation-widget-chevron{inset-inline-end:15px;opacity:.7;transition:transform .16s;position:absolute;top:29px}.conversation-widget-trigger[aria-expanded=true] .conversation-widget-chevron{transform:rotate(180deg)}.conversation-widget-trigger:focus-visible,.conversation-widget-manage:focus-visible{outline:2px solid var(--home-accent);outline-offset:-3px}.conversation-widget-trigger:hover{background:color-mix(in srgb,currentColor 4%,transparent)}.conversation-widget-origin{opacity:.7;margin:0;padding:0 16px 16px;font-size:12px;line-height:1.6}.conversation-widget-manage{border:1px solid var(--home-line);min-height:44px;color:inherit;font:inherit;cursor:pointer;background:0 0;border-radius:8px;margin:4px 12px 10px;padding:8px 12px;font-size:13px;display:block}.conversation-widget-manage:disabled{opacity:.5;cursor:default}@media (prefers-reduced-motion:reduce){.conversation-widget-chevron{transition:none}}
