*{box-sizing:border-box}body{margin:0;background:#f9f6ee;color:#262321;font:15px/1.6 Arial,sans-serif}.preview-banner{background:#2d2523;color:white;text-align:center;padding:8px 16px;font-size:12px}.preview-banner strong{color:#e85258;margin-right:12px}.preview-header{display:flex;justify-content:space-between;align-items:center;padding:18px 5%;border-bottom:1px solid #e2d8c9}.brand{font-size:28px;letter-spacing:-1px;text-decoration:none;color:#252221;font-weight:650}.brand span{color:#e85258}.brand small{letter-spacing:0;font-size:12px;margin-left:16px;font-weight:normal}button{font:inherit;cursor:pointer;border:1px solid #e85258;color:#e85258;background:white;border-radius:9px;padding:10px 14px}#chat{max-width:752px;margin:24px auto 220px;padding:0 16px}.message{margin:22px 0}.message.user{margin-left:25%;text-align:right;background:#ece4d8;border-radius:16px;padding:12px}.text{white-space:pre-wrap}.label{font-size:12px;font-weight:bold;color:#7e6554}.composer{position:fixed;bottom:18px;left:50%;transform:translateX(-50%);width:min(720px,calc(100% - 32px));display:flex;align-items:center;gap:12px;padding:10px 12px;border:1px solid #e85258;border-radius:16px;background:white;box-shadow:0 4px 30px #29130d20}.composer textarea{border:0;outline:none;resize:none;flex:1;font:inherit;min-width:0;height:44px;min-height:44px;padding:10px 0;line-height:24px;overflow-y:auto}.composer button{display:flex;align-items:center;justify-content:center;flex:0 0 44px;width:44px;height:44px;padding:0;background:#e85258;color:white;font-size:25px;line-height:1}.demo-choices{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0}.preview-editor{padding:20px}.preview-editor textarea{display:block;width:100%;min-height:130px;padding:15px;border:1px solid #e85258;border-radius:8px;font:inherit}.preview-editor h2{font-size:22px}.preview-editor button{margin:14px 8px 0 0}@media(max-width:600px){.preview-header{padding:12px 16px}.brand small{display:block;margin-left:0}.brand{font-size:23px}.preview-banner{font-size:11px}.preview-header button{font-size:12px}#chat{margin-top:14px}}
[hidden]{display:none!important}video{max-width:100%;border-radius:12px}
.studio-header-actions{display:flex;align-items:center;gap:10px}.studio-header-actions button{display:flex;align-items:center;justify-content:center;min-height:42px}.studio-account{display:flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;background:#e85258;color:white;font-size:12px;font-weight:600;letter-spacing:.03em}button:disabled{opacity:.5;cursor:wait}button:focus-visible,a:focus-visible{outline:3px solid #224bab;outline-offset:3px}.studio-session-check .studio-header-actions,.studio-session-check #form{visibility:hidden}.studio-session-check #chat>:not(.session-loading){visibility:hidden}.session-loading{color:#7e6554}.studio-modal,#studio-login{color:#262321;background:#fffcf6;border:1px solid #e85258;border-radius:18px;padding:24px;max-height:85dvh;width:min(760px,calc(100% - 32px));overflow:auto}.studio-modal::backdrop,#studio-login::backdrop{background:#29232199}.studio-modal-header{display:flex;align-items:center;justify-content:space-between;gap:16px}.studio-modal h2{font-size:22px;margin:0 0 14px}.studio-modal-header button{font-size:25px;line-height:1;padding:8px 12px}.studio-chat-row{display:flex;align-items:center;justify-content:space-between;gap:12px;border-top:1px solid #e2d8c9;padding:14px 0}.studio-chat-link{color:#e85258;text-decoration:none;font-weight:bold}.studio-chat-link:hover{text-decoration:underline}.studio-modal pre{white-space:pre-wrap;font:inherit;overflow-wrap:anywhere}.studio-script-edit{width:100%;height:50vh;font:inherit;border:1px solid #e85258;border-radius:10px;padding:12px}.studio-modal p[role=alert]{color:#e85258}#studio-login{width:min(430px,calc(100% - 32px));padding:28px}#studio-login h1{font-size:23px;line-height:1.3}#studio-login p{font-size:14px}#studio-login label{display:block;margin:14px 0;font-size:13px;font-weight:bold}#studio-login input{display:block;width:100%;border:1px solid #d4c3b3;padding:12px;border-radius:8px;font:inherit;background:white;margin-top:5px}#studio-login button{width:100%;background:#e85258;color:white}#studio-login-message{color:#e85258;min-height:1em}.studio-editor{max-height:90dvh}.studio-editor header{gap:12px;min-height:48px}
@media(max-width:600px){.studio-header-actions{gap:7px}.studio-header-actions button{padding:8px 10px}.studio-account{width:30px;height:30px}.studio-modal,#studio-login{padding:18px}.preview-banner strong{margin-right:6px}.composer{bottom:max(12px,env(safe-area-inset-bottom));padding:10px 12px}.composer textarea{font-size:16px}.studio-editor{padding:10px}.studio-editor iframe{height:calc(100% - 60px)}}

/* Entry stays covered until authentication and the requested view are ready. */
.studio-session-check .preview-header,.studio-session-check .preview-banner,.studio-session-check #chat,.studio-session-check #form,.studio-entry-loading .preview-header,.studio-entry-loading .preview-banner,.studio-entry-loading #chat,.studio-entry-loading #form{visibility:hidden}
/* Original /balveer task-overlay dimensions, typography and colours. */
.studio-entry{position:fixed;inset:0;z-index:10000;display:grid;place-items:center;padding:24px;background:rgba(0,0,0,.58);backdrop-filter:blur(8px);font-family:"Quicksand",ui-rounded,"Avenir Next","Nunito Sans",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-weight:500;line-height:normal}
.studio-entry::before{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(rgba(0,0,0,.58),rgba(0,0,0,.58)),url('/chat/assets/entry-balveer-background.jpg') center/cover no-repeat;filter:blur(8px);transform:scale(1.04);pointer-events:none}
.studio-entry-card{position:relative;width:min(460px,100%);border:2px solid rgba(255,253,248,.94);outline:2px solid rgba(185,145,85,.9);outline-offset:-8px;border-radius:8px;background:rgba(20,18,17,.94);color:#fffdf8;padding:24px;text-align:center;box-shadow:0 28px 90px rgba(0,0,0,.42)}
.studio-entry-card img{width:min(220px,72vw);height:160px;object-fit:contain;display:block;margin:0 auto 14px}
.studio-entry-card strong{display:block;font-size:1.05rem;font-weight:700;color:#fffdf8}
.studio-entry-card p{display:block;margin:8px 0 0;color:rgba(255,253,248,.74);font-size:.84rem;line-height:1.4}
.studio-entry-card .studio-entry-close{position:absolute;top:14px;right:14px;width:36px;height:36px;display:grid;place-items:center;padding:0;border-radius:999px;background:rgba(255,253,248,.14);border:1px solid rgba(255,253,248,.35);box-shadow:none;color:#fffdf8;font-size:1.25rem;line-height:1}
#studio-entry-retry{margin-top:18px;background:#ffffff14;color:#fffdf8;border-color:#b99155}
.studio-entry-loading body{overflow:hidden}

/* Keep world exploration accessible without leaving the current episode. */
.studio-worldmap-link{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:42px;padding:10px 14px;border:1px solid #e85258;border-radius:9px;color:#e85258;background:#fff;text-decoration:none;white-space:nowrap}.studio-worldmap-link:hover{background:#fff0ed}.studio-worldmap-link svg{flex:none}.preview-header{gap:14px;flex-wrap:wrap}
@media(max-width:600px){.studio-worldmap-link{font-size:12px;padding:8px 10px}.studio-header-actions{flex-wrap:wrap}.preview-header>.studio-header-actions{margin-left:auto}}

/* Exact user-supplied transparent Anim8e artwork. */
.preview-header>.brand{display:flex;align-items:center;gap:16px;flex-shrink:0}.studio-brand-logo{display:block;width:144px;height:48px;object-fit:contain}.preview-header>.brand small{margin-left:0}#studio-login .studio-brand-logo{width:156px;height:52px}@media(max-width:600px){.preview-header>.brand{gap:10px}.studio-brand-logo{width:120px;height:40px}.preview-header>.brand small{display:inline}}

/* Retired library UI may still be present in an older cached page. */
.ep-pack-launch,.ep-pack-dialog{display:none!important}

/* Compact header actions: history and compose, with accessible names. */
.studio-header-actions .studio-icon-button{width:44px;height:44px;min-height:44px;flex:0 0 44px;padding:0;display:inline-flex;align-items:center;justify-content:center}.studio-icon-button svg{display:block;flex:none}

/* Parilok scenery frames a quiet, high-contrast reading area. */
body{min-height:100dvh;background-color:#f9f6ee;background-image:linear-gradient(90deg,rgba(249,246,238,.28) 0%,rgba(249,246,238,.76) 20%,rgba(249,246,238,.94) 34%,rgba(249,246,238,.96) 50%,rgba(249,246,238,.94) 66%,rgba(249,246,238,.76) 80%,rgba(249,246,238,.28) 100%),url('/chat/assets/parilok-chat-background-20261004.jpg');background-size:cover;background-position:center;background-repeat:no-repeat;background-attachment:fixed}
.preview-header{background:rgba(249,246,238,.4);backdrop-filter:blur(12px)}
#chat{position:relative;border-radius:20px;background:rgba(249,246,238,.68);padding-top:1px;padding-bottom:1px}
.composer{background:rgba(255,255,255,.98);box-shadow:0 6px 30px rgba(62,43,23,.16)}
.composer button{box-sizing:border-box;border:0;border-radius:12px;display:grid;place-items:center;width:44px;height:44px;min-width:44px;flex:0 0 44px;padding:0;line-height:1;color:#fff;background:#e85258}
.composer button svg{display:block;width:22px;height:22px;flex:none}
.composer button:hover:not(:disabled){background:#e85258}
.composer button[data-api-busy]{min-width:44px}
.composer button[data-api-busy]::after{display:none}
.composer button[data-api-busy]::before{left:14px;top:14px;width:16px;height:16px;color:#fff}
@media(max-width:700px){body{background-image:linear-gradient(rgba(249,246,238,.9),rgba(249,246,238,.9)),url('/chat/assets/parilok-chat-background-20261004.jpg')}#chat{background:rgba(249,246,238,.65)}}

/* Keep the studio subtitle directly below the logo at every screen size. */
.preview-header>.brand{flex-direction:column;align-items:center;gap:2px;line-height:1}
.preview-header>.brand small{display:block;margin:0;font-size:12px;line-height:18px;letter-spacing:0;white-space:nowrap}

/* Compact assistant identity in the conversation. */
#chat .label .studio-reply-logo{display:block;width:80px;height:28px;object-fit:contain;object-position:left center;margin:0 0 5px}

/* User supplied transparent World Map artwork as the navigation button. */
.preview-header .studio-worldmap-link{padding:0;border:0;background:transparent;min-height:44px;line-height:0;border-radius:8px;flex-shrink:0}
.preview-header .studio-worldmap-link:hover{background:rgba(255,232,191,.35)}
.preview-header .studio-worldmap-link:focus-visible{outline:2px solid #e85258;outline-offset:3px}
.studio-worldmap-art{display:block;width:216px;height:72px;object-fit:contain}
@media(max-width:600px){.studio-worldmap-art{width:156px;height:52px}.preview-header .studio-worldmap-link{padding:0}}

.demo-choices>button[hidden]{display:none!important}
.studio-episode-expand{padding:6px 0;border:0;background:transparent;color:#e85258;font-size:13px;text-decoration:underline;text-underline-offset:3px}.studio-episode-expand:hover{color:#e85258}.studio-episode-expand:focus-visible{outline:2px solid #e85258;outline-offset:4px}

.studio-chat-history .studio-chat-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 0}
.studio-chat-info{min-width:0;flex:1}.studio-chat-info .studio-chat-link{display:block;overflow-wrap:anywhere}
.studio-chat-meta,.studio-chat-meta div{font-family:'Poppins',sans-serif!important;font-weight:400!important;font-size:11px;line-height:1.7;color:#796b60}.studio-chat-meta{margin-top:5px}
.studio-chat-actions{display:flex;gap:8px;flex-shrink:0}.studio-chat-actions button{font-size:12px;padding:8px 10px}.studio-delete-confirm{background:#e85258;color:white}
.studio-chat-history .studio-modal-header{position:sticky;top:0;z-index:1;background:#fffdf8;padding-bottom:12px}
@media(max-width:520px){.studio-chat-history .studio-chat-row{align-items:flex-start;flex-direction:column;gap:10px}.studio-chat-actions{align-self:flex-end}}

/* Keep the subtitle under the logo and the timeline shortcut beside it. */
.studio-brand-navigation{display:flex;align-items:center;gap:24px;flex-shrink:0}
.studio-brand-navigation .studio-brand-stack{display:flex;flex-direction:column;align-items:center;gap:2px;line-height:1}
.studio-brand-navigation .studio-brand-stack small{display:block;margin:0;font-size:12px;line-height:18px;letter-spacing:.04em;white-space:nowrap}
#studio-open-timeline{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:44px;padding:10px 16px;border:0;border-radius:13px;background:#e85258;color:#fff;line-height:1.3;white-space:nowrap;font-size:13px;font-weight:700!important}
#studio-open-timeline span{font-weight:700!important}
#studio-open-timeline svg{display:block;flex:none}
#studio-open-timeline .studio-timeline-chevron{margin-left:3px}
#studio-open-timeline:hover{background:#e85258}
#studio-open-timeline:focus-visible{outline:2px solid #e85258;outline-offset:3px}
@media(max-width:600px){.studio-brand-navigation{gap:16px}#studio-open-timeline{padding:10px 12px;gap:8px;font-size:12px}.studio-brand-navigation .studio-brand-stack small{font-size:11px}}

/* Assistant replies use a readable bubble and a circular brand avatar. */
#chat>.message:not(.user){position:relative;margin:20px 0 20px 54px;padding:16px 20px;background:rgba(255,253,249,.97);border:1px solid #eaded2;border-radius:6px 22px 22px 22px;box-shadow:0 3px 14px #422c1610;min-width:0;overflow-wrap:anywhere}
#chat>.message:not(.user)>.label{position:absolute;left:-54px;top:0;width:42px;height:42px;display:flex;align-items:center;justify-content:center;border:1px solid #ebd9cc;border-radius:50%;background:#fffdf9;box-shadow:0 2px 8px #422c1610}
#chat>.message:not(.user)>.label .studio-reply-logo{width:34px;height:22px;margin:0;object-fit:contain;object-position:center}
#chat>.message:not(.user)>.text{line-height:1.75}
#chat>.message:not(.user) .demo-choices{margin-bottom:10px}
#chat>.message.studio-error:not(.user){border-color:#e85258;background:#fff7f5}
@media(max-width:600px){#chat>.message:not(.user){margin-left:44px;padding:14px 16px;border-radius:6px 18px 18px 18px}#chat>.message:not(.user)>.label{left:-44px;width:34px;height:34px}#chat>.message:not(.user)>.label .studio-reply-logo{width:28px;height:19px}}

/* Equal navigation control dimensions; artwork whites blend into the glass navbar. */
.preview-header #studio-open-timeline,.preview-header .studio-worldmap-link{width:184px;height:44px;min-height:44px;flex:0 0 184px;box-sizing:border-box}
.preview-header .studio-worldmap-link{padding:0;background:transparent;border:0;border-radius:13px}
.preview-header .studio-worldmap-art{display:block;width:100%;height:100%;object-fit:fill;mix-blend-mode:normal}
.preview-header .studio-worldmap-link:hover{background:transparent;filter:brightness(.96)}
@media(max-width:600px){.preview-header #studio-open-timeline,.preview-header .studio-worldmap-link{width:168px;flex-basis:168px}}

/* Explore World navigation artwork: preserve aspect ratio and readable label. */
.preview-header .studio-worldmap-link{width:300px;flex-basis:300px;height:44px}
.preview-header .studio-worldmap-art{object-fit:contain}
@media(max-width:600px){.preview-header .studio-worldmap-link{width:270px;flex-basis:270px}}

/* World Map uses the same live Poppins label treatment as Open Timeline. */
.preview-header .studio-worldmap-link.studio-worldmap-text{width:auto;flex:0 0 auto;min-width:184px;height:44px;padding:10px 16px;gap:10px;border:0;border-radius:13px;background:#e85258;color:#fff;font-family:"Poppins",sans-serif;font-size:13px;font-weight:700!important;line-height:1.3;white-space:nowrap;text-decoration:none}
.preview-header .studio-worldmap-text span{font-weight:700!important}
.preview-header .studio-worldmap-text:hover{background:#e85258;filter:none}
@media(max-width:600px){.preview-header .studio-worldmap-link.studio-worldmap-text{min-width:168px;padding:10px 12px;gap:8px;font-size:12px}}

/* Center all content within the sign-in dialog. */
#studio-login-form{text-align:center}
#studio-login .brand{display:flex;justify-content:center}
#studio-login .studio-brand-logo{margin-inline:auto}
#studio-login label,#studio-login input,#studio-login-message{text-align:center}
