/* 设计稿1.0 — 已确认的视觉规范 */
:root{--paper:#FFFFFF;--white:#FFFFFF;--ink:#333333;--muted:#333333;--line:#000000;--orange:#EC8E1B;--orange-dark:#333333;--soft:#f5f5f5;--green:#0098E4;--red:#D43020;--radius:12px;--design-shadow:4px 4px 0 0 #000000;font-size:16px;font-family:Poppins,'PingFang SC','Microsoft YaHei',sans-serif;color:var(--ink);background:#FFFFFF}
body{background:#fff;color:#333}h1,.hero h1,.step-heading h1,.referral-page h1{font-size:32px;line-height:1.35;font-weight:600;letter-spacing:0}h2,.creation-section-heading h2{font-size:24px;line-height:1.4;font-weight:600}h3{font-size:18px;line-height:1.5;font-weight:600}p{line-height:1.75}.micro,.eyebrow,small{font-size:12px}.brand{font-family:Poppins,'PingFang SC',sans-serif;font-size:28px;font-weight:750;letter-spacing:-1px}.brand>span{font-size:12px}.eyebrow,.sidebar-label{display:none}
.prototype-ribbon{background:#fff;color:#333;border:0;font-size:12px;padding:12px 32px;flex-wrap:wrap}.prototype-ribbon button,.prototype-ribbon a,.prototype-ribbon b{color:#333;font-size:12px}.app-header{background:#fff;border-bottom:0;padding-inline:32px;gap:24px}.app-header nav{font-size:14px}.app-header nav a.active{color:#333;text-decoration:underline;text-decoration-color:#EC8E1B;text-decoration-thickness:3px;text-underline-offset:8px}
.button,.button.primary,.button.dark,.button.white,.button.danger,.icon-button,.ink-button,.header-auth,.tag,.style-card,.page-count-card,.layout-card,.story-ideas-trigger,.story-idea-card{border:3px solid #000;border-radius:8px;box-shadow:var(--design-shadow);color:#333;background:#fff;transition:background .15s,transform .1s,box-shadow .1s}
.button{min-height:44px;padding:10px 18px;font-size:14px;font-weight:600;line-height:1.5}.button.small{font-size:12px;min-height:36px}.button.large{font-size:16px;min-height:52px}.button.primary{background:#EC8E1B;color:#fff}.button.dark{background:#333;color:#fff}.button.danger{background:#D43020;color:#fff}.button:hover,.tag:hover,.icon-button:hover,.story-idea-card:hover{background:#f5f5f5;transform:none}.button.primary:hover{background:#EC8E1B;color:#fff}.button.danger:hover{background:#D43020;color:#fff}.button:active:not(:disabled),.icon-button:active:not(:disabled){transform:translate(4px,4px);box-shadow:none}.button:disabled{background:#eee;color:#777;opacity:1;box-shadow:none}
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]),textarea,select{border:3px solid #000;border-radius:8px;box-shadow:var(--design-shadow);background:#fff;color:#333;min-height:44px;font-size:16px;padding:12px 14px}input[type=checkbox],input[type=radio]{accent-color:#EC8E1B;width:18px;height:18px}.check-label,.field-label-row,label{font-size:14px}.field-error,.cast-inline-error{color:#D43020;font-size:12px}
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid #0098E4;outline-offset:6px}::selection{background:#0098E433}
.style-card,.page-count-card,.layout-card{border-radius:12px;overflow:hidden}.style-card.selected,.style-card[aria-pressed=true],.page-count-card.selected,.layout-card.selected,.tag.selected,.ai-role-styles .selected{background:#EC8E1B!important;color:#fff!important;border:3px solid #000!important;box-shadow:var(--design-shadow)!important}.style-card.selected :is(b,small,p),.style-card[aria-pressed=true] :is(b,small,p){color:#fff}.style-body{padding:20px}.style-body b{font-size:18px}.style-body small,.style-body p{font-size:14px}.selected-tick{background:#EC8E1B;color:#fff;border:2px solid #000}.sample-tag{background:#fff;color:#333}.style-selection-grid{gap:24px;padding-right:4px;padding-bottom:4px}.style-selection-summary{border:0;color:#333;font-size:14px}
.card,.sidebar-book,.creation-intro,.creation-settings-summary,.story-settings,.referral-hero,.referral-fill-card,.referral-feature{background:#fff;border:0;box-shadow:none}.card{border-radius:12px}.creation-section{margin-top:48px}.creation-section-heading{margin-bottom:24px}.creation-section-heading>span{background:#EC8E1B;color:#fff}.creation-section-heading p{font-size:14px;color:#333}.creation-submit{background:#fff;border:3px solid #000;border-radius:12px;box-shadow:var(--design-shadow);padding:20px 24px;gap:24px}.creation-submit strong{font-size:18px}.creation-submit small{font-size:12px}.creation-submit .button{font-size:14px}.creation-settings-summary>summary{border:0}.creation-settings-summary>summary strong{font-size:18px}
.workflow-sidebar{background:#fff;border:0}.sidebar-book{border:0}.sidebar-book strong{font-size:18px}.sidebar-book small,.sidebar-foot,.step-item small{font-size:12px;color:#333}.step-item b{font-size:14px}.step-circle{border-color:#000;color:#333;background:#fff}.step-item.done .step-circle{background:#0098E4;color:#fff}.step-item.active .step-circle{background:#EC8E1B;color:#fff}.step-item{border:0}.step-item.active{background:#EC8E1B;color:#fff}.step-item.active :is(b,small){color:#fff}
.notice{border:0;background:#EC8E1B18;color:#333;border-radius:8px;font-size:14px}.notice.success{background:#0098E418;color:#333;border:0}.notice.error{background:#D4302018;color:#D43020;border:0}.pill{border:0;background:#f5f5f5;color:#333;font-size:12px}.pill.orange{background:#EC8E1B;color:#fff}.pill.green{background:#0098E4;color:#fff}.pill.red{background:#D43020;color:#fff}.text-link{color:#333;font-size:14px}
dialog{background:#fff;border:3px solid #000;border-radius:16px;box-shadow:var(--design-shadow)}dialog::backdrop{background:#0006}.dialog-title{font-size:24px}.dialog-actions{gap:16px;border-top:0}.dialog-summary{background:#f5f5f5;border:0}.dialog-summary>div{border:0}.story-ideas-popover{background:#fff;border:3px solid #000;box-shadow:var(--design-shadow)}.story-ideas-trigger,.story-ideas-trigger:hover,.story-ideas-trigger[aria-expanded=true]{background:#fff;color:#333;border-color:#000}.story-idea-card p{color:#333;font-size:14px}.story-idea-card>span{color:#333}.story-idea-confirm{background:#EC8E1B18;border:0}.manual-character-photo,.ai-character-preview{border:3px dashed #000;background:#fff;color:#333}.signed-out-card{border:0;background:#fff}.signed-out-icon{background:#EC8E1B;color:#fff}.header-auth.is-guest{border:3px solid #000;background:#fff}.sidebar-save>.saved-project:disabled,.mobile-save-work>.saved-project:disabled{background:#0098E418;color:#333;border:3px solid #000}
.referral-stats,.referral-records article,.referral-account-bottom,.manual-character-note{border:0}.referral-person{background:#fff;border:3px solid #000;box-shadow:var(--design-shadow)}.referral-feature-icon,.referral-steps li>span{background:#0098E4;color:#fff}.referral-id-box{background:#fff;border:3px solid #000;box-shadow:var(--design-shadow)}
@media(min-width:1200px){.hero,.workspace-shell,.referral-page{max-width:1264px;margin-inline:auto}.workspace-shell{padding-inline:32px;gap:24px}}
@media(min-width:768px) and (max-width:1199px){.app-header{padding-inline:24px}.workspace-shell{gap:24px}}
@media(max-width:767px){h1,.hero h1,.step-heading h1,.referral-page h1{font-size:28px}.app-header{padding-inline:16px;gap:12px}.prototype-ribbon{padding:8px 16px}.prototype-ribbon>span{flex-wrap:wrap}.creation-section{margin-top:32px}.creation-section-heading h2{font-size:24px}.creation-submit{padding:12px;gap:12px}.creation-submit strong{font-size:14px}.creation-submit small{font-size:12px;max-width:150px}.creation-submit .button{font-size:14px;min-height:44px;padding:10px 12px}.style-selection-grid{gap:16px}.style-body{padding:12px}.style-body b{font-size:18px}.style-body small,.style-body p{font-size:12px}.dialog-actions{flex-wrap:wrap}.brand{font-size:24px}.header-auth.is-guest>span{font-size:12px}.studio-main{padding-bottom:32px}}
.add-cast,.add-cast.first-person,.cast-card,.character-shelf-card,.language-picker-trigger{border:3px solid #000;background:#fff;color:#333;border-radius:12px;box-shadow:var(--design-shadow)}.add-cast:hover{background:#EC8E1B;color:#fff}.add-cast :is(strong,span,.ph){color:inherit}.sidebar-save,.sidebar-foot{border-top:0}.studio-main .step-heading h1{font-size:32px;line-height:1.35}.studio-main .step-heading p{font-size:16px}.step-nav .step-circle{border-color:#000}.step-nav .step-item b{color:#333}
@media(max-width:767px){.studio-main .step-heading h1{font-size:28px}}

/* Full-width creation and image-led style choices. */
.workspace-shell.single-page-workflow{display:block;max-width:1264px;margin-inline:auto;padding:40px 32px}.single-page-workflow .studio-main{width:100%;min-width:0;padding:0}.single-page-workflow .style-selection-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:24px}.single-page-workflow .style-card{position:relative;padding:0;aspect-ratio:1;display:block}.single-page-workflow .style-card>img{width:100%;height:100%;aspect-ratio:auto;object-fit:cover}.single-page-workflow .style-body{position:absolute;left:12px;bottom:12px;padding:0;background:none}.single-page-workflow .style-body b{display:inline-block;background:#FFFFFF;color:#000000!important;padding:2px 4px;font-size:18px;line-height:1.5}.single-page-workflow .mobile-save-work{display:block;border:0;max-width:240px;margin:32px 0 0;padding:0}.single-page-workflow .mobile-save-work>.button{font-size:14px}.single-page-workflow .mobile-save-work>.save-action-note{text-align:left}.style-card .selected-tick{z-index:2}
@media(max-width:767px){.workspace-shell.single-page-workflow{padding:24px 16px}.single-page-workflow .style-selection-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.single-page-workflow .style-body{left:8px;bottom:8px}.single-page-workflow .style-body b{font-size:14px}}

/* Style selection: tilt on hover, brand frame and label when selected. */
.single-page-workflow .style-card{transition:transform .18s ease,box-shadow .18s ease,outline-color .18s ease;transform-origin:center;outline:none}
.single-page-workflow .style-card.selected,.single-page-workflow .style-card[aria-pressed=true]{border-color:var(--orange)!important;transform:rotate(-1.5deg);box-shadow:6px 6px 0 #000!important}
.single-page-workflow .style-card.selected .style-body b,.single-page-workflow .style-card[aria-pressed=true] .style-body b{background:var(--orange);color:var(--on-brand,#fff)!important}
@media(hover:hover){.single-page-workflow .style-card:hover{transform:translateY(-4px) rotate(-2deg);box-shadow:8px 8px 0 #000!important;border-color:var(--orange)!important}.single-page-workflow .style-card:nth-child(even):hover{transform:translateY(-4px) rotate(2deg)}}
.single-page-workflow .style-card:focus-visible{outline:3px solid #0098E4;outline-offset:6px}
.single-page-workflow .style-card:active{transform:translate(2px,2px) rotate(0);box-shadow:2px 2px 0 #000!important}
@media(prefers-reduced-motion:reduce){.single-page-workflow .style-card{transition:none}.single-page-workflow .style-card:hover,.single-page-workflow .style-card.selected,.single-page-workflow .style-card[aria-pressed=true]{transform:none}}
/* Character forms: square upload area, three columns, stacked fields. */
.single-page-workflow .cast-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;align-items:stretch}.single-page-workflow .cast-card{min-width:0;padding:20px;display:flex;flex-direction:column;gap:20px}.single-page-workflow .cast-header{margin:0;min-height:36px}.single-page-workflow .cast-header [hidden]{display:none}.single-page-workflow .person-fields{display:grid;grid-template-columns:minmax(0,1fr);gap:20px;margin:0}.single-page-workflow .cast-card .check-label{margin:0;padding:4px 0}.single-page-workflow .cast-photo.cast-upload{position:relative;display:block;width:100%;height:auto;min-height:0;aspect-ratio:1/1;margin:0;padding:0;border:3px solid #000;border-radius:8px;background:#fff;overflow:hidden;cursor:pointer;color:#333}.cast-photo.cast-upload>img{display:block;width:100%;height:100%;object-fit:cover;aspect-ratio:1/1}.cast-upload>input[type=file]{position:absolute;inset:0;width:100%;height:100%;opacity:0;margin:0;padding:0;cursor:pointer;z-index:2}.photo-placeholder{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px}.photo-placeholder>.ph{font-size:32px}.photo-placeholder strong{font-size:14px}.photo-replace{position:absolute;right:12px;bottom:12px;width:40px;height:40px;background:#fff;border:3px solid #000;box-shadow:4px 4px 0 #000;border-radius:8px;display:grid;place-items:center;font-size:22px}.cast-photo.cast-upload:hover,.cast-photo.cast-upload:focus-within{border-color:var(--orange)}.single-page-workflow .cast-grid>.add-cast{width:auto;min-width:0;min-height:240px;height:auto}.cast-card .person-fields input:hover,.cast-card .person-fields input:focus,.cast-card .person-fields input:focus-visible,.cast-card .person-fields select:hover,.cast-card .person-fields select:focus,.cast-card .person-fields select:focus-visible{border-color:var(--orange);outline:none}.cast-card .person-fields select{appearance:none;-webkit-appearance:none;padding-right:48px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath d='m5 7 5 5 5-5' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 16px center;background-size:20px 20px}
@media(max-width:767px){.single-page-workflow .cast-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.single-page-workflow .cast-card{padding:16px}}
@media(max-width:520px){.single-page-workflow .cast-grid{grid-template-columns:minmax(0,1fr)}}
.cast-photo.cast-upload>.photo-placeholder{position:absolute;inset:0;width:100%;height:100%;padding:0;border-radius:0;background:transparent;font-size:14px}.cast-photo.cast-upload .ph{color:#333}.cast-photo.cast-upload>.photo-replace{right:12px;bottom:12px;width:40px;height:40px;padding:0;background:#fff;border-radius:8px;font-size:22px}.cast-photo.cast-upload>.photo-replace .ph{font-size:22px}
/* Compact fixed photo slots; details are completed in the modal. */
.single-page-workflow .cast-grid.compact-cast-grid{grid-template-columns:repeat(3,minmax(0,1fr));max-width:720px;gap:24px;align-items:start}.cast-slot{min-width:0}.single-page-workflow .cast-slot .cast-upload{box-shadow:4px 4px 0 #000}.cast-slot-footer{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:12px;min-height:40px}.cast-slot-footer>strong{font-size:14px;overflow-wrap:anywhere;min-width:0}.cast-slot-actions{display:flex;gap:10px;flex-shrink:0}.cast-slot-actions .icon-button{width:36px;height:36px;font-size:18px}.cast-dialog-fields{display:grid;gap:20px;margin:24px 0}.cast-dialog-fields input:focus,.cast-dialog-fields select:focus{outline:none;border-color:var(--orange)}.cast-dialog-fields select{appearance:none;padding-right:48px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Cpath d='m5 7 5 5 5-5' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 16px center}.cast-slot .photo-placeholder strong{font-size:14px}
@media(max-width:520px){.single-page-workflow .cast-grid.compact-cast-grid{gap:12px}.cast-slot .photo-placeholder strong{font-size:11px}.cast-slot .photo-placeholder{gap:6px}.cast-slot .photo-placeholder>.ph{font-size:24px}.cast-slot-footer{flex-direction:column;align-items:flex-start}.cast-slot-actions{gap:8px}.cast-slot-actions .icon-button{width:36px;height:36px}.cast-slot-footer>strong{font-size:12px}}
/* Compact story composer replaces the separate submit bar. */
body:has(.story-compose-actions) .single-page-workflow{padding-bottom:250px}.single-page-workflow .creation-section:first-child{margin-top:0}.story-entry-card:has(.story-compose-actions){position:fixed;z-index:20;bottom:20px;left:50%;transform:translateX(-50%);width:calc(100% - 64px);max-width:1200px;background:#fff;padding:12px 0 0;margin:0;border:0;border-radius:12px}.story-entry-card .field-label-row{margin-bottom:8px}.story-entry-card .story-compose>.story-area{height:150px;min-height:150px;max-height:150px;resize:none;padding:14px 16px 70px;line-height:1.6}.story-entry-card .story-compose-toolbar{bottom:16px;left:16px}.story-compose-actions{position:absolute;right:16px;bottom:16px;display:flex;align-items:center;gap:12px;z-index:4}.story-compose-actions small{font-size:12px;white-space:nowrap}.story-compose-actions .button{white-space:nowrap}.story-entry-card .story-ideas-popover{max-height:min(420px,55dvh)}.story-entry-card .story-ideas-popover.opens-below{top:auto;bottom:calc(100% + 12px)}#creation-story .advanced-settings{margin-top:0}#creation-story .form-main{display:flex;flex-direction:column;gap:16px}#creation-story .advanced-settings{order:-1}
@media(max-width:767px){.story-entry-card:has(.story-compose-actions){width:calc(100% - 32px);bottom:12px}.story-entry-card .story-compose>.story-area{height:160px;min-height:160px;max-height:160px;padding:12px 12px 78px;font-size:14px}.story-compose-actions{right:10px;bottom:12px;gap:6px}.story-compose-actions .button{padding:8px 10px;font-size:12px;min-height:40px}.story-compose-actions small{font-size:10px}.story-entry-card .story-compose-toolbar{left:10px;bottom:12px}.story-entry-card .story-ideas-trigger{padding:8px;font-size:11px}.story-entry-card .story-ideas-trigger .ph{display:none}.story-entry-card .field-label-row{gap:8px}.story-input-meta{gap:8px}.story-entry-card .story-hint-trigger{font-size:11px}.story-entry-card #story-count{font-size:11px}}

/* Simplified section headings and image overlays. */
.creation-section-heading{display:block}.creation-title-row{display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%}.creation-title-row h2{margin:0}.creation-title-row>.text-link{flex-shrink:0}.creation-section-heading>p{margin-top:12px;font-size:14px}#creation-cast>.form-layout>.card{padding:0}
.cast-slot{position:relative}.cast-slot-footer{position:absolute;inset:0;margin:0;pointer-events:none;display:block;min-height:0}.cast-slot-footer>strong{position:absolute;bottom:12px;left:12px;max-width:calc(100% - 24px);background:#fff;color:#000;padding:2px 4px;font-size:15px;line-height:1.5;pointer-events:none}.cast-slot-actions{display:contents}.cast-slot-actions>.icon-button{position:absolute;top:12px;z-index:3;pointer-events:auto;background:#fff}.cast-slot-actions>[data-action^="replace-cast:"]{right:12px}.cast-slot-actions>[data-action^="remove-person:"]{left:12px}
.single-page-workflow .style-selection-grid{grid-template-columns:repeat(5,minmax(0,1fr))}.single-page-workflow .style-body b{font-size:15px}
@media(max-width:767px){.single-page-workflow .style-selection-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.creation-title-row{gap:8px}.creation-title-row>.text-link{font-size:12px}.cast-slot-actions>.icon-button{top:7px;width:30px;height:30px;font-size:15px;box-shadow:2px 2px 0 #000}.cast-slot-actions>[data-action^="replace-cast:"]{right:7px}.cast-slot-actions>[data-action^="remove-person:"]{left:7px}.cast-slot-footer>strong{left:7px;bottom:7px;max-width:calc(100% - 14px);font-size:12px}}

/* Compact persistent navigation. */
.app-header{position:sticky;top:0;z-index:30;height:72px;min-height:72px;background:#fff;align-items:center;box-sizing:border-box}.app-header .button,.app-header .header-auth,.app-header .header-auth.is-guest,.app-header .ink-button{height:36px;min-height:36px;border-width:2px;border-radius:8px;padding:6px 12px;box-shadow:3px 3px 0 #000;font-size:12px;font-weight:500;line-height:1.4}.app-header .button .ph,.app-header .header-auth .ph{font-size:18px}.app-header .header-actions{gap:12px}.creation-section{scroll-margin-top:88px}#workspace{min-height:calc(100vh - 72px)}
@media(max-width:767px){.app-header{height:72px;min-height:72px;flex-wrap:nowrap}.app-header .button,.app-header .header-auth,.app-header .header-auth.is-guest,.app-header .ink-button{padding:6px 8px}.app-header .header-actions{gap:8px}}

@media(max-width:620px){.app-header .header-actions>.vip-button{font-size:0;width:36px;min-width:36px;padding:6px;gap:0}.app-header .header-actions>.vip-button .ph{font-size:18px}.app-header .brand{font-size:22px}.app-header{gap:8px}}

.cast-name-label{position:absolute;bottom:12px;left:12px;max-width:calc(100% - 24px);display:flex;align-items:center;gap:4px;background:#fff;color:#000;padding:2px 4px;z-index:3;pointer-events:auto}.cast-name-label strong{font-size:15px;line-height:1.5;overflow-wrap:anywhere;min-width:0}.cast-edit-name{display:grid;place-items:center;flex-shrink:0;width:28px;height:28px;padding:0;background:#fff;color:#000;border:0;border-radius:4px;font-size:18px}.cast-edit-name:hover{background:var(--orange)}.cast-edit-name:focus-visible{outline:2px solid #000;outline-offset:1px}
@media(max-width:767px){.cast-name-label{left:7px;bottom:7px;max-width:calc(100% - 14px);gap:2px}.cast-name-label strong{font-size:12px}.cast-edit-name{width:24px;height:28px;font-size:16px}}
/* Photo-upload hover/selection retains the black edge with a wider brand ring. */
.single-page-workflow .cast-photo.cast-upload:hover,
.single-page-workflow .cast-photo.cast-upload:focus-within,
.single-page-workflow .cast-slot.filled .cast-photo.cast-upload{border-color:#000;outline:4px solid var(--orange);outline-offset:0}
/* Character photos keep a black edge without the yellow ring. */
.single-page-workflow .cast-photo.cast-upload:hover,
.single-page-workflow .cast-photo.cast-upload:focus-within,
.single-page-workflow .cast-slot.filled .cast-photo.cast-upload{border-color:#000;outline:none}
.single-page-workflow .cast-photo.cast-upload:has(input:focus-visible){outline:2px dashed #000;outline-offset:5px}

/* Circular 160px character portraits with controls below. */
.single-page-workflow .cast-grid.compact-cast-grid{grid-template-columns:repeat(3,160px);gap:32px;max-width:none;justify-content:start}.cast-slot{width:160px}.single-page-workflow .cast-slot .cast-photo.cast-upload{width:160px;height:160px;aspect-ratio:1;border-radius:50%;overflow:hidden}.cast-slot .cast-photo.cast-upload>img{border-radius:50%;width:100%;height:100%;object-fit:cover}.cast-slot-footer{position:static;display:flex;flex-direction:column;align-items:center;gap:4px;margin:12px 0 0;pointer-events:auto}.cast-name-label{position:static;display:flex;justify-content:center;align-items:center;max-width:100%;padding:0 4px;gap:4px;background:transparent}.cast-name-label strong{font-size:15px;text-align:center}.cast-slot-actions{display:contents}.cast-slot .cast-replace-link{position:static;display:inline-flex;align-items:center;justify-content:center;gap:5px;padding:4px 8px;min-height:28px;border:0;box-shadow:none;background:transparent;color:#333;font-size:12px;font-weight:400;cursor:pointer}.cast-replace-link .ph{font-size:14px}.cast-replace-link:hover{text-decoration:underline;text-underline-offset:3px}.cast-slot-actions>.icon-button[data-action^="remove-person:"]{top:0;right:0;left:auto;width:30px;height:30px;border:2px solid #000;border-radius:50%;padding:0;background:#fff;box-shadow:2px 2px 0 #000;font-size:18px;z-index:4}.cast-slot .photo-placeholder strong{font-size:12px}.cast-slot .photo-placeholder>.ph{font-size:28px}
@media(max-width:620px){.single-page-workflow .cast-grid.compact-cast-grid{grid-template-columns:repeat(2,160px);gap:24px 20px}.cast-name-label strong{font-size:15px}}
@media(max-width:359px){.single-page-workflow .cast-grid.compact-cast-grid{grid-template-columns:160px}}
/* Portrait label and editing controls. */
.cast-slot-actions>.icon-button[data-action^="remove-person:"]{left:auto;right:0;top:0}.cast-slot-footer{margin-top:0;gap:8px}.cast-name-label{position:relative;transform:translateY(-50%);background:#fff;border:2px solid #000;border-radius:6px;padding:3px 8px;min-height:32px;max-width:150px;margin-bottom:-16px;z-index:4}.cast-edit-name{width:22px;height:24px;background:transparent;border-radius:0}.cast-slot .cast-replace-link{background:#000;color:#fff;border-radius:5px;min-height:28px;padding:4px 10px}.cast-slot .cast-replace-link:hover{background:#333;text-decoration:none}
dialog:has(.portrait-crop){width:560px;max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);overflow:auto}.portrait-crop{max-width:320px;margin:20px auto}.portrait-crop-stage{width:220px;height:220px;max-width:100%;margin:auto;border:3px solid #000;border-radius:50%;overflow:hidden;background:#eee}.portrait-crop canvas{display:block;width:100%;height:100%;touch-action:none;cursor:grab}.portrait-crop canvas:active{cursor:grabbing}.portrait-crop>p{font-size:12px;margin:10px 0;text-align:center}.portrait-crop label{font-size:12px}.portrait-crop input[type=range]{width:100%;box-shadow:none;border:0;padding:0;accent-color:#333}.crop-position{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:10px 0}.portrait-crop .text-link{font-size:12px}.portrait-crop+ .cast-dialog-fields{margin-top:16px}

.story-entry-card:has(.story-compose-actions){padding-top:0}.story-entry-card #story-input::placeholder{color:#888;opacity:1}

/* Name and circular replacement control centered on the 160px image, excluding shadow. */
.cast-slot-footer{width:160px;align-items:center}.cast-name-label{box-sizing:border-box;align-self:center;justify-content:center;margin-inline:0;gap:6px;max-width:160px;padding:4px 6px 4px 8px}.cast-name-label strong{flex:0 1 auto;overflow-wrap:anywhere}.cast-slot .cast-name-label>.cast-replace-link{display:grid;place-items:center;width:26px;height:26px;min-width:26px;min-height:26px;flex:0 0 26px;padding:0;border:0;border-radius:50%;background:#000;color:#fff;box-shadow:none}.cast-name-label>.cast-replace-link .ph{font-size:15px}.cast-slot .cast-name-label>.cast-replace-link:hover{background:#333;text-decoration:none}

/* Separate name box and replacement button, with a 2px gap. */
.cast-name-label{border:0;background:transparent;padding:0;gap:2px;border-radius:0;min-height:32px}
.cast-name-label>strong{display:block;background:#fff;border:2px solid #000;border-radius:6px;padding:4px 8px;min-height:32px;line-height:20px}

.cast-slot .cast-name-label>.cast-replace-link,.cast-slot .cast-name-label>.cast-replace-link:hover{background:#fff;color:#000;border:2px solid #000}.cast-slot-actions>[data-action^="remove-person:"]{color:#000}

.cast-name-label>.cast-name-button{display:block;flex:0 1 auto;min-width:0;background:#fff;color:#000;border:2px solid #000;border-radius:6px;padding:4px 8px;min-height:32px;font-size:15px;font-weight:600;line-height:20px;text-align:center;overflow-wrap:anywhere;cursor:pointer}.cast-name-button:hover{background:var(--orange)}.cast-name-button:focus-visible{outline:2px solid #000;outline-offset:3px}
/* Square crop preview with a circular keep-area and dark discarded corners. */
.portrait-crop-stage{position:relative;width:280px;height:auto;aspect-ratio:1;max-width:100%;border:3px solid #000;border-radius:8px;overflow:hidden}.portrait-crop-mask{position:absolute;inset:0;pointer-events:none;border-radius:50%;box-shadow:0 0 0 200px #0009;border:2px solid #fff}.portrait-crop canvas{width:100%;height:100%;border-radius:0}.portrait-crop canvas:focus-visible{outline:0}.portrait-crop-stage:focus-within{outline:2px solid #333;outline-offset:3px}

.single-page-workflow button.cast-photo.cast-upload:focus-visible{outline:2px dashed #000;outline-offset:5px}

/* Shared shadow feedback for raised interactive controls. */
html body :is(.button, .icon-button, .ink-button, .header-auth, button.tag, .style-card, .page-count-card, .layout-card, .story-ideas-trigger, .story-idea-card, .add-cast, .language-picker-trigger, .cast-photo.cast-upload, input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]), textarea, select):not(:disabled):not([aria-disabled="true"]){box-shadow:2px 2px 0 #000!important;transition:background .15s,transform .18s ease,box-shadow .18s ease}
@media(hover:hover){html body :is(.button, .icon-button, .ink-button, .header-auth, button.tag, .style-card, .page-count-card, .layout-card, .story-ideas-trigger, .story-idea-card, .add-cast, .language-picker-trigger, .cast-photo.cast-upload, input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]), textarea, select):not(:disabled):not([aria-disabled="true"]):hover{box-shadow:4px 4px 0 #000!important}}

.portrait-crop-mask{inset:46px;box-shadow:0 0 0 300px rgb(0 0 0 / 80%);transition:box-shadow .15s}.portrait-crop-stage.is-adjusting .portrait-crop-mask{box-shadow:0 0 0 300px rgb(0 0 0 / 40%)}

/* Composer quick settings share the same controls and persisted values. */
.story-compose-toolbar{display:flex;align-items:center;gap:10px}
.story-setting-trigger{width:36px;height:36px;flex:0 0 36px;color:#000}
.story-settings-popover{position:fixed;inset:auto;margin:0;width:260px;max-width:calc(100vw - 24px);padding:18px;border:2px solid #000;border-radius:12px;background:#fff;color:#333;box-shadow:4px 4px 0 #000}
.story-settings-popover h3{font-size:15px;margin:0 0 14px}.quick-setting-options{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.quick-setting-options .button{padding:6px}
/* Match icon weight across font icons and stroked SVG controls. */
.ph::before{-webkit-text-stroke:.055em currentColor}
button svg [stroke]{stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
@media(max-width:620px){.story-entry-card .story-compose>.story-area{height:200px;min-height:200px;max-height:200px;padding-bottom:112px}.story-entry-card .story-compose-toolbar{bottom:64px;gap:10px}.story-compose-actions{bottom:12px}.story-settings-popover{width:250px}}
@media(max-width:620px){.single-page-workflow .cast-grid.compact-cast-grid{column-gap:20px}.app-header nav{display:none}}

/* Modal backdrop and scroll containment. */
html:has(dialog[open]),body:has(dialog[open]){overflow:hidden;overscroll-behavior:none}
dialog{overscroll-behavior:contain}dialog::backdrop{background:rgb(0 0 0 / 70%)}
.portrait-replace-row{display:flex;justify-content:center;margin-top:12px}

/* Visible values in the composer replace the expanded settings section. */
.story-setting-trigger{display:inline-flex;align-items:center;justify-content:center;gap:7px;width:auto;flex:0 1 auto;padding:6px 10px;font-size:12px;white-space:nowrap}
.story-setting-trigger>.ph{font-size:16px;flex-shrink:0}.story-setting-trigger>.ph-caret-down{font-size:10px}.setting-value{max-width:140px;overflow:hidden;text-overflow:ellipsis}
.creation-total{margin:0;gap:16px;flex-wrap:wrap}.creation-total>strong{font-size:14px}.creation-total>span{white-space:nowrap}
@media(min-width:621px) and (max-width:800px){.story-entry-card .story-compose>.story-area{height:200px;min-height:200px;max-height:200px;padding-bottom:112px}.story-entry-card .story-compose-toolbar{bottom:68px}.story-compose-actions{bottom:12px}}
@media(max-width:620px){.story-entry-card .story-compose-toolbar{right:10px;flex-wrap:wrap;gap:8px;bottom:64px}.story-setting-trigger{padding:5px 7px;gap:5px;height:34px}.setting-value{max-width:100px}.story-entry-card .story-compose>.story-area{height:240px;min-height:240px;max-height:240px;padding-bottom:154px}body:has(.story-compose-actions) .single-page-workflow{padding-bottom:290px}}
/* The final summary stops against the dock with an 8px overlap. */
#creation-story{margin-top:120px}#story-error:empty{display:none}
body:has(.story-compose-actions) .single-page-workflow{padding-bottom:162px}
html body .story-compose-toolbar :is(.story-setting-trigger,.story-ideas-trigger):not(:disabled):not([aria-disabled="true"]){border:0;box-shadow:none!important;background:transparent;border-radius:0}
html body .story-compose-toolbar .story-ideas-trigger{background:linear-gradient(110deg,#075ee8,#008e9c)!important;background-clip:text!important;-webkit-background-clip:text!important;color:transparent!important;font-weight:700}
html body .story-compose-toolbar .story-setting-trigger:hover{color:#007b95;background:transparent}
@media(min-width:621px) and (max-width:800px){body:has(.story-compose-actions) .single-page-workflow{padding-bottom:212px}}
@media(max-width:620px){body:has(.story-compose-actions) .single-page-workflow{padding-bottom:244px}}
#workspace .story-compose-toolbar :is(.story-setting-trigger,.story-ideas-trigger),#workspace .story-compose-toolbar :is(.story-setting-trigger,.story-ideas-trigger):hover{box-shadow:none!important;border:0}

#story-input:focus,#story-input:focus-visible{outline:none;border-color:#000}
#workspace .story-compose-toolbar :is(.story-setting-trigger,.story-ideas-trigger){border-radius:8px;transition:background-color .15s}
#workspace .story-compose-toolbar .story-ideas-trigger{background:none!important;color:#b5a000!important;background-clip:border-box!important;-webkit-background-clip:border-box!important}
.inspiration-ink{display:inline-flex;align-items:center;gap:6px;background:linear-gradient(110deg,#ff7900 0%,#23b84a 48%,#008cff 100%);background-clip:text;-webkit-background-clip:text;color:transparent}
@media(hover:hover){#workspace .story-compose-toolbar .story-setting-trigger:hover{background:#f3f3f3;color:#333}#workspace .story-compose-toolbar .story-ideas-trigger:hover{background:#f4f8df!important}}
.portrait-crop-stage .portrait-replace-row{position:absolute;right:10px;bottom:10px;margin:0;z-index:2}.portrait-replace-row .icon-button{width:32px;height:32px;min-height:32px;padding:0;border-width:2px;border-radius:50%;background:#fff;color:#000}
.cast-dialog-fields{grid-template-columns:minmax(0,1fr) 150px;column-gap:16px}.cast-dialog-fields>label{min-width:0}.cast-dialog-fields>.check-label{grid-column:1/-1}
@media(max-width:480px){.cast-dialog-fields{grid-template-columns:minmax(0,1fr) 112px;column-gap:12px}.cast-dialog-fields select{padding-left:10px;padding-right:28px;background-position:right 8px center;font-size:14px}}
.cast-slot-footer{margin-top:12px;min-height:0}.cast-name-label{position:static;transform:none;margin:0;padding:0;min-height:0;border:0;background:transparent}.cast-name-label>.cast-name-button{padding:0;border:0;border-radius:0;min-height:0;line-height:22px;background:transparent;box-shadow:none}.cast-name-label>.cast-name-button:hover{background:transparent;text-decoration:underline;text-underline-offset:3px}
/* Language menu follows the current white / black / yellow control system. */

.story-entry-card:has(.story-compose-actions)::after{content:"";position:absolute;top:100%;left:50%;transform:translateX(-50%);width:100vw;height:24px;background:#fff;pointer-events:auto;z-index:-1}
.story-expand{position:absolute;top:10px;right:12px;width:32px;height:32px;display:grid;place-items:center;padding:0;border:0;border-radius:8px;color:#333;background:#fff;font-size:18px;z-index:4}.story-expand:hover{background:#f3f3f3}
.story-entry-card .story-compose>.story-area{padding-right:52px}
.story-entry-card.is-expanded .story-compose>.story-area{height:min(60dvh,480px);min-height:min(60dvh,480px);max-height:min(60dvh,480px)}
body:has(.story-entry-card.is-expanded) .single-page-workflow{padding-bottom:calc(min(60dvh,480px) + 12px)}
@media(max-width:620px){body:has(.story-entry-card.is-expanded) .single-page-workflow{padding-bottom:calc(min(60dvh,480px) + 4px)}}
/* Style cards alone use the stronger selected/hover treatment. */
#creation-style .style-card:is(.selected,[aria-pressed=true]){border-color:var(--orange)!important;outline:4px solid #000;outline-offset:0;box-shadow:6px 6px 0 4px #000!important}
@media(hover:hover){#creation-style .style-card:hover{border-color:var(--orange)!important;outline:4px solid #000;outline-offset:0;box-shadow:6px 6px 0 4px #000!important}}
/* Shared 1040px effective content width, excluding responsive gutters. */
:root{--content-width:1040px;--page-gutter:32px}
#workspace :is(.workspace-shell.single-page-workflow,.hero,.home-section,.library-wrap,.checkout-box){width:calc(100% - var(--page-gutter)*2);max-width:var(--content-width);margin-inline:auto;padding-inline:0}
.app-header{padding-inline:max(var(--page-gutter),calc((100% - var(--content-width))/2))}
.story-entry-card:has(.story-compose-actions){width:calc(100% - var(--page-gutter)*2);max-width:var(--content-width)}
@media(min-width:768px) and (max-width:1100px){:root{--page-gutter:24px}.single-page-workflow .style-selection-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:20px}.app-header{gap:16px}.app-header>nav{gap:14px;font-size:13px}.app-header .brand{font-size:24px}.app-header .header-actions{gap:8px}.app-header .button,.app-header .header-auth{padding-inline:8px}}
@media(max-width:767px){:root{--page-gutter:16px}.single-page-workflow .style-selection-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.app-header>nav{display:none}.app-header .header-actions{margin-left:auto}}

#workspace .story-compose-toolbar :is(.story-setting-trigger,.story-ideas-trigger){font-size:14px}

.story-setting-trigger::after{content:"";display:block;width:0;height:0;border-left:4px solid transparent;border-right:4px solid transparent;border-top:5px solid #888;flex-shrink:0;margin-left:2px}

.cast-library-inline{display:inline;padding:2px 4px;border:0;border-radius:4px;background:transparent;color:inherit;font:inherit;font-weight:600;text-decoration:underline;text-underline-offset:4px;cursor:pointer}.cast-library-inline:hover{background:#f3f3f3}.cast-library-inline:focus-visible{outline:2px solid #333;outline-offset:2px}

.cast-source-options{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:24px}.cast-source-options .button{min-height:64px}@media(max-width:420px){.cast-source-options{grid-template-columns:1fr}}

/* Personal center banners */
#workspace .account-page .account-banner{background:#000;color:#fff;border:3px solid #000;border-radius:16px;padding:32px 36px;box-shadow:4px 4px 0 #000}
.account-banner .account-identity{display:flex;align-items:center;flex-wrap:wrap;gap:16px;font-size:14px}.account-banner .account-identity>span:first-child{display:flex;align-items:center;gap:8px}.account-banner .account-identity .ph{font-size:24px}.account-banner .account-logout{margin-left:auto}
.account-banner-main{display:flex;align-items:center;justify-content:space-between;gap:24px;margin:28px 0 20px}.account-banner .balance-large{font-family:Poppins,sans-serif;font-size:64px;line-height:1.1;font-weight:600;margin:0;white-space:nowrap}.account-banner .balance-large small{font-size:14px;font-weight:400;color:#ccc;margin-left:8px}.account-banner-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:12px}.account-banner>p{margin:8px 0;font-size:14px;color:#ccc}.account-banner .review-controls{border-color:#444;color:#aaa;margin-top:24px;font-size:12px}.account-banner .review-controls .micro{color:#aaa}
#workspace .account-page .account-referral{background:#0098e4;color:#fff;border:3px solid #000;border-radius:16px;padding:32px 36px;box-shadow:4px 4px 0 #000;margin-top:28px}.account-referral .referral-feature h2{font-size:28px;line-height:1.4;color:#fff}.account-referral .referral-feature p,.account-referral .micro{color:#fff;font-size:14px}.account-referral .referral-feature-icon{background:#fff;color:#0098e4;border-radius:12px}.account-referral .referral-account-bottom{border-top:1px solid #ffffff55;padding-top:24px;margin-top:24px}.account-referral .referral-account-bottom strong{color:#fff;font-size:20px}.account-page .account-orders{margin:48px 0 24px;padding-top:20px;border-top:1px solid #ddd;color:#888;font-size:12px}.account-orders h2{font-size:14px;font-weight:600;margin:0 0 8px}.account-orders p,.account-orders .micro{font-size:12px;color:#888}.account-orders .button{font-size:12px;min-height:32px;padding:4px 8px}.account-page .ledger{display:block;overflow:auto}
@media(max-width:767px){#workspace .account-page :is(.account-banner,.account-referral){padding:24px 20px}.account-banner-main{align-items:flex-start;flex-direction:column}.account-banner-actions{justify-content:flex-start}.account-banner .balance-large{font-size:48px}.account-banner .account-identity{gap:12px}.account-banner .account-logout{margin-left:0}.account-referral .referral-feature{flex-wrap:wrap}.account-referral .referral-feature h2{font-size:24px}.account-referral .referral-account-bottom{gap:20px}.account-referral .referral-account-bottom>div{flex-wrap:wrap}}

html body .app-header nav a.active{font-weight:700;color:#000;text-decoration-color:#000}
#workspace .character-empty-actions .button .ph,#workspace .character-add-tile .button .ph{font-size:20px;color:#000;line-height:1;margin:0}.character-add-tile{display:flex;flex-direction:column;justify-content:center;gap:16px;padding:24px;border:2px dashed #ccc;border-radius:12px}
#cast-source-popover{position:fixed;inset:auto;margin:0;width:180px;padding:8px;background:#fff;border:3px solid #000;border-radius:12px;box-shadow:4px 4px 0 #000}#cast-source-popover:popover-open{display:flex;flex-direction:column;gap:4px}#cast-source-popover .button{font-size:14px;justify-content:flex-start;text-align:start;border:0;box-shadow:none!important;width:100%;padding:12px;min-height:44px}#cast-source-popover .button:hover{background:#f3f3f3}
.manual-upload-placeholder{width:280px;height:280px;max-width:100%;margin:0 auto 24px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;border:3px solid #000;border-radius:8px;cursor:pointer}.manual-upload-placeholder .ph{font-size:32px}.manual-character-modal .cast-dialog-fields{margin-top:24px}

html body .app-header .header-auth{width:36px;height:36px;min-width:36px;min-height:36px;padding:0;border:2px solid #000;border-radius:50%;overflow:hidden;display:inline-flex;align-items:center;justify-content:center;background:#f3f3f3;flex:0 0 36px}.app-header .header-auth img{width:100%;height:100%;object-fit:cover}.app-header .header-auth .ph{font-size:24px;color:#333}

.membership-group{display:inline-flex;align-items:center;border-radius:8px;background:#fff9ce;padding:0 6px;flex-shrink:0}.app-header .membership-group :is(.vip-button,.ink-button){border:0;background:transparent;box-shadow:none!important;min-height:36px;padding:6px 10px;font-size:14px}.membership-group .membership-ink,.membership-group .ink-button>*{background:linear-gradient(110deg,#d0b900,#36bd24);background-clip:text;-webkit-background-clip:text;color:transparent}.membership-ink{display:inline-flex;align-items:center;gap:6px}.app-header .membership-group .ink-button:not([hidden]){position:relative;margin-left:4px}.membership-group .ink-button::before{content:"";position:absolute;left:-3px;top:9px;bottom:9px;width:1px;background:#dcd8b8}.app-header .membership-group .button:hover,.app-header .membership-group .ink-button:hover{background:#fff3a6;transform:none}
#cast-source-popover{overflow:visible}#cast-source-popover::before{content:"";position:absolute;width:12px;height:12px;background:#fff;transform:rotate(45deg);pointer-events:none}#cast-source-popover[data-side=right]::before{left:-9px;top:calc(var(--tip) - 6px);border-left:3px solid #000;border-bottom:3px solid #000}#cast-source-popover[data-side=bottom]::before{top:-9px;left:calc(var(--tip) - 6px);border-left:3px solid #000;border-top:3px solid #000}
@media(max-width:620px){.app-header .membership-group{padding:0 2px}.app-header .membership-group .vip-button{font-size:12px;padding:4px 6px}.app-header .membership-group .ink-button{padding:4px 6px;font-size:12px}.membership-group .membership-ink{gap:4px}.app-header .membership-group .ph{font-size:16px}.app-header .brand{font-size:20px}}

#creation-cast .creation-section-heading>p{color:#888;font-weight:400}

#creation-cast .cast-grid.compact-cast-grid{gap:24px}

html body .app-header .membership-group{background:color-mix(in srgb,var(--brand,#EEF200) 12%,transparent);box-shadow:none!important}
html body .app-header .membership-group :is(.vip-button,.ink-button):not(:disabled):not([aria-disabled="true"]),html body .app-header .membership-group :is(.vip-button,.ink-button):not(:disabled):not([aria-disabled="true"]):hover{box-shadow:none!important}
.app-header .membership-group .ink-button:not([hidden]){margin-left:0}.membership-group .ink-button::before{display:none}.membership-group:has(.ink-button:not([hidden])) .vip-button{position:relative;margin-left:4px}.membership-group:has(.ink-button:not([hidden])) .vip-button::before{content:"";position:absolute;left:-3px;top:9px;bottom:9px;width:1px;background:#dcd8b8}

#header-membership button,#header-membership button:hover,#header-membership button:active,#header-membership button:focus{box-shadow:none!important}

#workspace .creation-total>span>b{color:var(--brand,#EEF200);text-shadow:none;-webkit-text-stroke:4px #000;paint-order:stroke fill}

#header-membership .membership-ink,#header-membership .ink-button>*{background:none;color:#f02683;-webkit-text-fill-color:#f02683}#header-membership .membership-symbol{width:18px;height:18px;flex-shrink:0;overflow:visible}

html body .app-header #header-membership{background:rgb(240 38 131 / 12%)}
#header-membership .membership-ink,#header-membership #balance{font-weight:700;background:linear-gradient(110deg,#ff418b,#ce16a5);background-clip:text;-webkit-background-clip:text;color:transparent;-webkit-text-fill-color:transparent}
#header-membership .membership-symbol{color:#f02683;-webkit-text-fill-color:#f02683;background:none}
#header-membership .vip-button::before{background:rgb(240 38 131 / 20%)}
html body .app-header #header-membership button:hover{background-color:rgb(240 38 131 / 8%)}

html body .app-header #header-membership{border:0;cursor:pointer;font:inherit;min-height:36px;transition:background-color .15s}html body .app-header #header-membership:hover{background:rgb(240 38 131 / 20%);box-shadow:none!important}#header-membership:focus-visible{outline:2px solid #f02683;outline-offset:3px}html body .app-header #header-membership>:is(.vip-button,.ink-button){display:inline-flex;align-items:center;gap:6px;pointer-events:none;border:0;box-shadow:none!important;background:transparent;transform:none}html body .app-header #header-membership>.ink-button[hidden]{display:none}

#account-popover{position:fixed;inset:auto;margin:0;width:min(320px,calc(100vw - 24px));padding:12px;background:#fff;color:#333;border:3px solid #000;border-radius:12px;box-shadow:4px 4px 0 #000;max-height:calc(100dvh - 100px);overflow:auto}.account-menu-heading{display:flex;justify-content:space-between;align-items:center;padding:10px 12px 16px;font-size:18px}.account-menu-vip{color:#f02683;font-size:14px;display:flex;align-items:center;gap:6px}.account-menu-row{display:flex;align-items:center;gap:12px;border:0;background:none;border-radius:8px;padding:14px 12px;width:100%;text-align:left;font:inherit;font-size:14px;cursor:pointer;color:#333}.account-menu-row>span{flex:1}.account-menu-row .ph{font-size:18px}.account-menu-row:hover,.account-menu-id button:hover{background:#f3f3f3}.account-menu-row small{display:block;font-size:12px;color:#888;margin-top:6px;font-variant-numeric:tabular-nums}.account-menu-row:disabled{opacity:.55;cursor:default}.account-menu-id{display:flex;align-items:center;justify-content:space-between;padding:16px 12px;border-block:1px solid #eee;margin:8px 0}.account-menu-id small{display:block;color:#888;font-size:12px;margin-bottom:4px}.account-menu-id strong{font-size:14px}.account-menu-id button{border:0;background:none;padding:8px;border-radius:6px;cursor:pointer}.account-menu-logout{border-top:1px solid #eee;border-radius:0;margin-top:8px;color:#888}

.membership-page-heading{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:40px}.membership-page-heading h1{font-size:40px;margin:16px 0 12px;line-height:1.25}.membership-page-heading p{color:#888}.membership-page-badge{display:inline-flex;gap:8px;align-items:center;background:#f026831f;color:#f02683;border-radius:8px;padding:8px 14px;font-weight:700}.membership-content{max-width:900px;margin:auto}.membership-page .vip-paywall-intro{text-align:left;margin-bottom:32px}.membership-page .vip-paywall-intro>i{display:none}.membership-page .vip-paywall-intro h3{font-size:24px}.membership-page .vip-paywall-intro p{font-size:14px;color:#666;max-width:none}.membership-page .vip-plan-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}.membership-page .vip-plan-option{background:#fff;border:3px solid #000;border-radius:12px;box-shadow:3px 3px 0 #000;padding:28px;text-align:left;color:#333}.membership-page .vip-plan-option.selected{background:var(--brand,#EEF200);border-color:#000}.membership-page .vip-plan-option strong{display:block;font-size:40px;margin:24px 0}.membership-page .vip-plan-option strong small{font-size:14px}.membership-page .vip-plan-option:hover{box-shadow:5px 5px 0 #000}.membership-page .dialog-summary{background:#f5f5f5;padding:24px;border-radius:12px;margin-top:32px}.membership-page-actions{display:flex;justify-content:flex-end;gap:16px;margin:28px 0}.membership-page .vip-renewal-copy,.membership-page .micro{font-size:12px;color:#888;line-height:1.8}.membership-page .annual-upgrade-options{grid-template-columns:1fr}.membership-page .review-controls{margin-top:24px}
@media(max-width:620px){.membership-page-heading{align-items:flex-start;gap:12px}.membership-page-heading h1{font-size:28px}.membership-page .vip-plan-options{grid-template-columns:1fr}.membership-page .vip-plan-option{padding:24px}.membership-page-actions{flex-wrap:wrap}}

#workspace :is(.project-grid,.character-shelf-grid)>.empty-state{background:transparent;border:0;box-shadow:none;border-radius:0;padding:64px 24px;min-height:360px}#workspace :is(.project-grid,.character-shelf-grid)>.empty-state>.ph{font-size:48px;color:#999;margin-bottom:20px}#workspace :is(.project-grid,.character-shelf-grid)>.empty-state h2{font-size:24px;margin:0 0 12px}#workspace :is(.project-grid,.character-shelf-grid)>.empty-state p{color:#888;font-size:14px}.empty-state-actions,.character-empty-actions{display:flex;justify-content:center;gap:16px;flex-wrap:wrap;margin-top:28px}.empty-state-actions .button .ph{font-size:20px!important;color:#000!important;margin:0!important}

.membership-page .membership-content{max-width:none}.membership-intro-row{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:16px}.membership-intro-row h1{font-size:24px;line-height:1.4;margin:0}.membership-intro-row .button{flex-shrink:0}@media(max-width:480px){.membership-intro-row{gap:12px}.membership-intro-row h1{font-size:22px}}

#account-popover .account-menu-id{justify-content:flex-start;align-items:flex-start;gap:12px;font-size:14px}#account-popover .account-menu-id>.ph{font-size:18px;line-height:21px}#account-popover .account-menu-id-content>span{display:block;line-height:21px}#account-popover .account-menu-id-value{display:flex;align-items:center;gap:6px;margin-top:6px}#account-popover .account-menu-id-value button{display:inline-flex;align-items:center;justify-content:center;padding:4px;color:#333}#account-popover .account-menu-id-value button .ph{font-size:14px;color:#999}#account-popover .account-menu-referral{align-items:flex-start;line-height:21px}#account-popover .account-menu-referral>.ph{line-height:21px}#account-popover .account-menu-logout{color:#333}

#creation-style{margin-top:80px}

#account-popover .account-menu-row,#account-popover .account-menu-id-content>span{font-size:14px;font-weight:600}#account-popover .account-menu-id-value strong{color:#888;font-size:12px;font-weight:400}#account-popover .account-menu-row small{font-size:12px;font-weight:400;color:#888}

.outlined-credits{vertical-align:middle;overflow:visible;-webkit-text-stroke:0;text-shadow:none}.outlined-credits text{font-family:Poppins,"PingFang SC",sans-serif;-webkit-text-stroke:0}

@media(min-width:901px){.app-header{column-gap:0}.app-header>nav{margin-left:36px;margin-right:0;flex:0 0 auto}.app-header>.header-actions{margin-left:auto}}


/* Temporary review links; remove together with reviewShortcuts when reviews finish. */
.single-page-workflow{position:relative}.review-shortcuts{position:absolute;right:0;top:8px;display:flex;gap:16px;font-size:12px;color:#888}.review-shortcuts a:hover{color:#333;text-decoration:underline}.review-shortcuts a:focus-visible{outline:2px solid #000;outline-offset:4px}
.cover-free-label{display:inline-block;vertical-align:middle;padding:2px 6px;margin-left:4px;border-radius:4px;background:var(--brand,#EEF200);color:#333;font-size:12px;line-height:1.5;font-weight:600}

/* Character shelf: image actions and identity labels. */
.character-portrait{position:relative}.character-portrait .character-delete{position:absolute;top:10px;right:10px;width:32px;height:32px;min-height:32px;padding:0;display:grid;place-items:center;border:2px solid #000;border-radius:8px;background:#fff;color:#333;font-size:16px;z-index:2}.character-portrait-labels{position:absolute;left:12px;bottom:12px;right:12px;display:flex;align-items:center;flex-wrap:wrap;gap:6px;font-size:12px;color:#333}.character-portrait-labels>span{max-width:100%;padding:3px 7px;border-radius:4px;background:#fff;line-height:1.5;overflow-wrap:anywhere}.character-portrait-labels>span{font-size:14px;font-weight:600}.character-shelf-body>.button{margin-top:0}

/* Generation and result views share the current visual language. */
#creation-output{scroll-margin-top:104px;margin-top:0}
#creation-output .step-heading{margin-bottom:32px}
#creation-output .step-heading h1{font-size:32px;font-weight:600}
#creation-output .step-heading p{font-size:14px;color:#888}
#creation-output .generation-theater{max-width:none;width:100%;padding:28px;border:3px solid #000;border-radius:12px;background:#fff;box-shadow:2px 2px 0 #000}
#creation-output .generation-theater-top h2{font-size:24px;line-height:1.4;font-weight:600;color:#333}
#creation-output :is(.generation-theater-top p,.progress-label,.page-caption,.micro){font-size:12px;color:#888}
#creation-output .generation-orbit{background:var(--brand,#EEF200);border:2px solid #000;color:#000}
#creation-output .generation-orbit::after{border-top-color:#000;border-right-color:var(--brand,#EEF200)}
#creation-output .generation-dots span{background:#333}
#creation-output .live-drawing{background:#fafafa;border:2px solid #000;border-radius:12px;margin-top:24px;padding:28px;gap:28px}
#creation-output .live-drawing strong{font-size:16px;color:#333}
#creation-output .live-drawing p{font-size:12px;color:#888}
#creation-output .drawing-page{background:#fff;border:2px solid #000;box-shadow:3px 3px 0 #000}
#creation-output .drawing-page>span{border-color:#333;background:linear-gradient(145deg,#fff 30%,#EEF200 31%,#EEF200 60%,#ddd 61%)}
#creation-output .drawing-page>.ph{color:#000;filter:none}
#creation-output .progress-track{height:12px;border:2px solid #000;border-radius:8px;background:#f2f2f2;margin-top:24px}
#creation-output .progress-fill{background:var(--brand,#EEF200);border-radius:4px}
#creation-output .progress-fill::after{background:linear-gradient(90deg,transparent,#ffffff80,transparent)}
#creation-output .progress-label b{color:#333;font-size:14px}
#creation-output .book-preview-grid{gap:24px;margin-top:32px}
#creation-output .book-page-heading{font-size:14px}
#creation-output .pill{font-size:12px;border-radius:4px;padding:4px 8px;background:#f2f2f2;color:#333;border:0}
#creation-output .pill.green{background:#0098E4;color:#fff}
#creation-output .pill.orange{background:var(--brand,#EEF200);color:#000}
#creation-output :is(.cover-preview-button,.locked-comic-page,.unlocked-body-preview){border:3px solid #000;border-radius:12px;background:#f5f5f5;box-shadow:2px 2px 0 #000}
#creation-output .cover-preview-button:enabled:hover{box-shadow:4px 4px 0 #000}
#creation-output .locked-comic-page::after{background:#f5f5f5dd}
#creation-output .locked-comic-copy{color:#333}
#creation-output .locked-comic-copy>.ph{background:#fff;color:#333;box-shadow:none}
#creation-output .locked-comic-copy p{font-size:12px;color:#888}
#creation-output .locked-cta{background:var(--brand,#EEF200);color:#000;border:2px solid #000}
#creation-output .generation-actions{border-top:1px solid #ddd;gap:16px}
#creation-output .generation-actions .button{font-size:14px}
#creation-output .editor-inspector{background:#fff;border-color:#ddd}
#creation-output .editor-inspector label{font-size:14px}
#creation-output .editor-inspector textarea{font-size:14px}
#creation-output input[type=range]{accent-color:var(--brand,#EEF200)}
@media(max-width:620px){#creation-output .step-heading h1{font-size:28px}#creation-output .generation-theater{padding:16px}#creation-output .generation-theater-top h2{font-size:18px}#creation-output .book-preview-grid{grid-template-columns:1fr}#creation-output .live-drawing{padding:20px 12px;gap:16px}#creation-output .live-drawing strong{font-size:14px}#creation-output .progress-label{flex-wrap:wrap}}

#creation-output .result-layout{display:grid;grid-template-columns:minmax(0,1fr) 320px;align-items:start;gap:40px}
#creation-output .result-layout>section{min-width:0}
#creation-output #result-canvas{width:400px;max-width:100%;height:auto;margin:24px 0 0;touch-action:pan-y;cursor:grab;transition:transform .15s ease}
#creation-output #result-canvas.is-swiping{cursor:grabbing;user-select:none;transition:none}
#creation-output #result-canvas .comic-sheet{width:100%;max-width:100%;margin:0;height:auto;border:2px solid #000;box-shadow:2px 2px 0 #000;background:#fff}
#creation-output #result-canvas img{user-select:none;-webkit-user-drag:none}
#creation-output .comic-pagination{width:400px;max-width:100%;margin:20px 0 0;font-size:12px;gap:12px}
#creation-output .result-inspector.card{padding:24px;border:3px solid #000;border-radius:12px;background:#fafafa;box-shadow:2px 2px 0 #000}
#creation-output .result-inspector :is(label,textarea,select){font-size:14px}
#creation-output .result-toolbar{flex-wrap:wrap;gap:12px}
@media(max-width:760px){#creation-output .result-layout{grid-template-columns:1fr;gap:32px}#creation-output .result-inspector.card{padding:20px}#creation-output .comic-pagination .button{padding:8px 10px;font-size:12px}}

.project-card-actions{display:flex;align-items:stretch;gap:12px;margin-top:16px}.project-card-actions>.button{margin:0;flex:0 0 auto}.project-card-actions>.button.primary{flex:1;min-width:0}.project-card-body>h3:first-child{margin-top:0}

.character-portrait-edit{position:absolute;inset:0;width:100%;height:100%;padding:0;display:grid;place-items:center;background:transparent;color:inherit;cursor:pointer}.character-portrait-edit>img{width:100%;height:100%;object-fit:cover;transition:filter .18s}.character-edit-hint{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:flex;align-items:center;gap:6px;white-space:nowrap;border:2px solid #000;border-radius:8px;padding:8px 12px;background:var(--brand,#EEF200);color:#000;font-size:14px;font-weight:600;opacity:0;transition:opacity .18s}.character-portrait-edit:hover>img{filter:brightness(.85)}.character-portrait-edit:hover .character-edit-hint,.character-portrait-edit:focus-visible .character-edit-hint{opacity:1}.character-portrait-edit:focus-visible{outline:3px solid var(--brand,#EEF200);outline-offset:-5px}.character-portrait-labels{pointer-events:none}

.library-wrap .project-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}.project-card{min-width:0;display:flex;flex-direction:column;border:3px solid #000;border-radius:12px;background:#fff;box-shadow:2px 2px 0 #000;transition:box-shadow .18s}.project-card:hover{box-shadow:4px 4px 0 #000}.project-card .project-excerpt{background:#f5f5f5;border-bottom:3px solid #000}.project-card-body{padding:20px;display:flex;flex-direction:column;flex:1}.project-card h3{font-size:18px;font-weight:600;line-height:1.5}.project-card p{font-size:12px;color:#888;line-height:1.6}.project-card-actions{flex-wrap:nowrap;margin-top:auto;padding-top:16px;gap:12px}.project-card-actions .button{font-size:14px;min-height:44px;padding:8px 12px}.project-card-actions .primary{color:#000;background:var(--brand,#EEF200)}
@media(max-width:900px){.library-wrap .project-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:600px){.library-wrap .project-grid{grid-template-columns:1fr}}

/* Result preview and live dialogue counter. */
#creation-output .result-layout{grid-template-columns:520px minmax(0,1fr);gap:40px}
#creation-output #result-canvas,#creation-output .comic-pagination{width:520px;max-width:100%}
#creation-output #result-canvas .sheet-panel.chosen{outline:3px solid #000;outline-offset:0;box-shadow:inset 0 0 0 4px var(--brand,#EEF200);z-index:2}
#creation-output #result-canvas .sheet-panel.chosen::after{content:"";position:absolute;inset:0;border:4px solid var(--brand,#EEF200);pointer-events:none;z-index:5}
.dialogue-field{position:relative;display:block;margin-top:9px}
#creation-output .dialogue-field textarea{display:block;margin:0;padding-bottom:36px;min-height:140px}
.dialogue-count{position:absolute;right:18px;bottom:10px;padding:0 3px;background:#fff;color:#888;font-size:12px;font-weight:400;line-height:1.5;pointer-events:none}
@media(max-width:960px){#creation-output .result-layout{grid-template-columns:1fr;gap:32px}}

.membership-page .membership-plans-readonly .vip-plan-option:disabled{opacity:1;cursor:default;background:#fafafa;color:#333;border-color:#000;box-shadow:2px 2px 0 #000;transform:none}.membership-page .current-plan-label{display:inline-block;margin-left:12px;padding:3px 8px;border-radius:4px;background:#f026831f;color:#ce16a5;font-size:12px;font-weight:600}
/* Comic reader: 420px artwork with adjacent navigation. */
#creation-output .result-layout{grid-template-columns:524px minmax(0,1fr)}
#creation-output .comic-reader{display:grid;grid-template-columns:40px minmax(0,420px) 40px;gap:12px;align-items:center;max-width:100%}
#creation-output #result-canvas{width:420px;max-width:100%;margin:0}
#creation-output .comic-page-arrow{width:40px;min-width:0;height:44px;padding:0;display:grid;place-items:center;margin:0}
#creation-output .comic-page-arrow .ph{font-size:22px}
#creation-output .comic-page-number{text-align:center;font-size:12px;margin-top:16px}
.panel-select-field{display:block;position:relative;margin-top:8px}
.panel-select-field #panel-select{appearance:none;-webkit-appearance:none;width:100%;margin:0;padding-right:40px}
.panel-select-field::after{content:"";position:absolute;right:18px;top:50%;transform:translateY(-50%);border-left:4px solid transparent;border-right:4px solid transparent;border-top:5px solid #888;pointer-events:none}
.project-card .project-title{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere;margin:0;cursor:pointer}
.project-title:focus-visible{outline:3px solid #000;outline-offset:4px}
#project-story-preview{position:fixed;inset:auto;margin:0;width:min(360px,calc(100vw - 24px));max-height:min(400px,calc(100dvh - 24px));box-sizing:border-box;overflow:auto;padding:20px;border:3px solid #000;border-radius:12px;background:#fff;color:#333;box-shadow:4px 4px 0 #000}
#project-story-preview p{white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px;line-height:1.7;margin:0}
#project-story-preview .story-copy{display:flex;margin:8px 0 0 auto;width:24px;height:24px;min-height:0;padding:0;align-items:center;justify-content:center;font-size:14px;border:0;background:transparent;color:#888;box-shadow:none;cursor:pointer;border-radius:4px}
#project-story-preview .story-copy:hover{color:#333;background:#f3f3f3}
#project-story-preview .story-copy:focus-visible{outline:2px solid #000;outline-offset:2px}
@media(max-width:960px){#creation-output .result-layout{grid-template-columns:1fr}#creation-output .result-layout>section{max-width:524px}}
@media(max-width:480px){#creation-output .comic-reader{grid-template-columns:32px minmax(0,1fr) 32px;gap:8px}#creation-output .comic-page-arrow{width:32px;height:40px}}

#creation-output .step-heading>div{min-width:0;width:100%}
#creation-output .step-heading h2:has(.result-title-text){display:flex;align-items:flex-start;gap:16px}
.result-title-text{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere;min-width:0;flex:1}
#creation-output .result-title-more{flex:0 0 36px;width:36px;height:36px;min-height:0;padding:0;margin:4px 0 0;display:grid;place-items:center;font-size:24px}
#result-story-full{width:min(600px,calc(100vw - 32px));max-height:calc(100dvh - 64px);overflow:auto;box-sizing:border-box;padding:24px;border:3px solid #000;border-radius:12px;background:#fff;color:#333;box-shadow:4px 4px 0 #000}
.result-story-top{display:flex;align-items:center;justify-content:space-between;gap:16px;font-size:18px}
.result-story-top .button{width:36px;height:36px;min-height:0;padding:0;display:grid;place-items:center;font-size:20px}
#result-story-full p{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.8;font-size:16px;margin:16px 0 0}

.project-title-row{display:flex;align-items:flex-end;gap:6px;min-width:0}
.project-title-row .project-title{flex:1;min-width:0;cursor:default}
.project-text-more{flex:0 0 24px;width:24px;height:27px;display:grid;place-items:center;padding:0;border:0;border-radius:4px;background:transparent;color:#888;font-size:16px;cursor:pointer}
.project-text-more:hover,.project-text-more[aria-expanded=true]{background:#f3f3f3;color:#333}
.project-text-more:focus-visible{outline:2px solid #000;outline-offset:2px}

/* Shared dialog system: confirmation, account, checkout and character flows. */
#dialog{width:min(560px,calc(100vw - 32px));max-height:calc(100dvh - 32px);border:3px solid #000;border-radius:12px;background:#fff;color:#333;box-shadow:4px 4px 0 #000;overflow:auto}
#dialog::backdrop{background:rgb(0 0 0 / 70%);backdrop-filter:blur(3px)}
#dialog .dialog-body{padding:28px;max-height:calc(100dvh - 38px);overflow:auto}
#dialog .dialog-top{gap:20px;margin-bottom:24px;align-items:flex-start}
#dialog .dialog-top h2{font-size:24px;line-height:1.4;font-weight:600;margin:0;overflow-wrap:anywhere}
#dialog .dialog-top .icon-button{flex:0 0 36px;width:36px;height:36px;padding:0;font-size:20px;border-radius:8px;box-shadow:2px 2px 0 #000}
#dialog .dialog-body>p,#dialog .login-intro p,#dialog .vip-paywall-intro p,#dialog .ai-role-intro{font-size:14px;line-height:1.8;color:#333;margin:0 0 20px}
#dialog .micro,#dialog .manual-character-note,#dialog .ai-role-disclaimer,#dialog .vip-renewal-copy{font-size:12px;line-height:1.8;color:#888}
#dialog label,#dialog .field-label-row,#dialog .ai-role-style-label{font-size:14px;color:#333}
#dialog .notice,#dialog .story-idea-confirm{background:#f5f5f5;color:#333;border:0;border-radius:8px;padding:16px;font-size:14px;line-height:1.8;margin:20px 0}
#dialog .notice.success{background:#0098e418;color:#333}
#dialog .notice.error{background:#d4302018;color:#D43020}
#dialog .field-error{font-size:12px;color:#D43020}
#dialog .dialog-actions{position:sticky;bottom:-28px;display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:12px;background:#fff;margin:24px 0 0;padding:16px 0 28px;box-shadow:0 -8px 0 #fff;border:0}
#dialog .dialog-actions:empty{display:none}
#dialog .button{font-size:14px;min-height:44px;padding:10px 16px;border:3px solid #000;border-radius:8px;box-shadow:2px 2px 0 #000}
#dialog .button:hover:not(:disabled),#dialog .icon-button:hover{box-shadow:4px 4px 0 #000}
#dialog .button:disabled{background:#eee;color:#888;box-shadow:none}
#dialog .button.primary:not(:disabled){background:var(--brand,#EEF200);color:#000}
#dialog .dialog-summary{padding:16px;background:#f5f5f5;border:0;border-radius:8px;margin:20px 0}
#dialog .dialog-summary>div{font-size:14px;gap:16px;color:#333}
#dialog .review-controls{border-top:1px solid #ddd;margin-top:24px;padding-top:16px}
#dialog .review-controls summary{color:#888;font-size:12px;line-height:1.6}
#dialog select{appearance:none;padding-right:36px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 8 5'%3E%3Cpath d='M0 0h8L4 5Z' fill='%23888'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 16px center}
#dialog :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]),textarea,select){font-size:14px;box-shadow:2px 2px 0 #000}
#dialog .cast-dialog-fields :is(input,select):focus{border-color:#000;outline:3px solid #0098e4;outline-offset:4px}
#dialog .login-intro>.ph,#dialog .vip-paywall-intro>.ph{color:#333;background:var(--brand,#EEF200);border:3px solid #000;border-radius:12px;width:48px;height:48px;display:grid;place-items:center;margin:0 auto 16px;font-size:26px}
#dialog .login-intro h3,#dialog .vip-paywall-intro h3{font-size:20px;line-height:1.5;color:#333}
#dialog .vip-plan-options{gap:16px}
#dialog .vip-plan-option{background:#fff;color:#333;border:3px solid #000;border-radius:12px;padding:20px 16px;box-shadow:2px 2px 0 #000;gap:12px}
#dialog .vip-plan-option.selected{background:var(--brand,#EEF200);border-color:#000;box-shadow:2px 2px 0 #000}
#dialog .vip-plan-option:hover:not(:disabled){box-shadow:4px 4px 0 #000}
#dialog .vip-plan-option b{font-size:14px}#dialog .vip-plan-option strong{font-size:28px}
#dialog .vip-plan-option :is(span,small){font-size:12px;color:#333}
#dialog .vip-plan-option:disabled{background:#f5f5f5;opacity:1;box-shadow:none;cursor:default}
#dialog.ai-character-modal{width:min(960px,calc(100vw - 32px));max-width:960px}
#dialog .ai-character-badge,#dialog .ai-role-sample{background:#f5f5f5;color:#333;border:0;font-size:12px;border-radius:4px}
#dialog .ai-role-placeholder,#dialog .ai-role-portrait,#dialog .manual-character-photo{background:#f5f5f5;border:3px solid #000;border-radius:12px;color:#333}
#dialog .ai-role-placeholder>.ph{color:#888}
#dialog .ai-role-placeholder p,#dialog .ai-role-form .micro,#dialog .ai-role-form .field-label-row small{font-size:12px;color:#888}
#dialog .ai-role-styles .tag{font-size:12px;color:#333;box-shadow:2px 2px 0 #000}
#dialog .ai-role-styles .selected{background:var(--brand,#EEF200);color:#000;border-color:#000;box-shadow:2px 2px 0 #000}
#dialog .ai-role-orbit{background:var(--brand,#EEF200);color:#333;border:3px solid #000}
#dialog .ai-role-progress{background:#eee;height:8px;border:1px solid #000}
#dialog .ai-role-progress span{background:var(--brand,#EEF200)}
#dialog [aria-invalid=true]{outline:2px solid #D43020;outline-offset:3px}
@media(max-width:600px){#dialog .dialog-body{padding:20px}#dialog .dialog-top h2{font-size:20px}#dialog .dialog-actions{bottom:-20px;padding-bottom:20px}#dialog .dialog-actions>.button{flex:1;white-space:normal}#dialog .vip-plan-options{grid-template-columns:1fr}#dialog .ai-role-primary-actions{display:flex;flex-wrap:wrap;width:100%}#dialog .ai-role-primary-actions .button{flex:1}}

html body .app-header .header-auth.is-guest{width:auto;min-width:0;flex:0 0 auto;height:36px;padding:0 12px;border:3px solid #000;border-radius:8px;background:#fff;white-space:nowrap;font-size:14px;font-weight:600;overflow:visible}
html body .app-header .header-auth.is-guest span{font-size:14px}

/* Align composer settings and submit action when a single row fits. */
@media(min-width:801px){
 .story-entry-card .story-compose-toolbar{bottom:16px;height:44px;align-items:center}
 .story-entry-card .story-compose-actions{bottom:16px;height:44px;align-items:center}
 .story-entry-card .story-compose-actions .button{height:44px;min-height:44px}
}

/* Each membership card owns its checkout action. */
.membership-purchase-card{cursor:default;background:#fff;align-items:stretch}
.membership-purchase-card .membership-buy{width:100%;margin-top:20px;min-height:44px;justify-content:center;font-size:14px}
.membership-page-actions:empty{display:none}
.membership-content>.vip-plan-options+.micro{margin-top:20px}
.membership-buy:focus-visible{outline:3px solid #009fe8;outline-offset:4px}
.membership-buy[aria-busy="true"]{cursor:wait}

/* Shared component rule: no additional keyboard-focus outline. */
:focus,:focus-visible{outline:none!important}

/* Compact estimate stays attached to the fixed story composer. */
.story-entry-card .creation-total{display:flex;flex-direction:row;align-items:center;justify-content:space-between;flex-wrap:nowrap;gap:8px;min-height:40px;margin:0;padding:8px 16px;border-radius:8px 8px 0 0;box-sizing:border-box}
.story-entry-card .creation-total>strong{font-size:14px;font-weight:400;line-height:22px;color:#888}
.story-entry-card .creation-total .cover-free-label{margin-left:2px;font-weight:400;color:#777;padding:0 4px}
body:has(.story-compose-actions) .single-page-workflow{padding-bottom:340px}
@media(max-width:620px){.story-entry-card .creation-total{padding:6px 10px;min-height:40px}.story-entry-card .creation-total>strong{white-space:nowrap}.story-entry-card .creation-total>span{font-size:10px}}

/* The header creation CTA belongs exclusively to the home page. */
#header-start[hidden]{display:none!important}

.comic-page-dots{display:none}

html body .app-header>nav[hidden]{display:none!important}
/* Web library heading and creation action share the top row. */
@media(min-width:621px){
 html:not([data-preview-device="tablet"]) .library-wrap:has(>.shelf-toolbar){display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:24px}
 html:not([data-preview-device="tablet"]) .library-wrap:has(>.shelf-toolbar)>.step-heading{grid-column:1;grid-row:1}
 html:not([data-preview-device="tablet"]) .library-wrap>.shelf-toolbar{grid-column:2;grid-row:1;align-self:start;margin:0;justify-content:flex-end}
 html:not([data-preview-device="tablet"]) .library-wrap:has(>.shelf-toolbar)>.project-grid{grid-column:1/-1}
}

.story-ideas-top{align-items:flex-start}.story-ideas-top>div{min-width:0;flex:1}.story-ideas-top .icon-button{display:grid;place-items:center;flex:0 0 28px;width:28px;height:28px;min-height:28px;padding:0;margin:0;line-height:1}.story-ideas-top .icon-button .ph{display:block;font-size:17px;line-height:1}
/* Web detail keeps its editor beside the reader even in a narrower desktop window. */
@media(min-width:621px){
 html:not([data-preview-device="tablet"]) #creation-output .result-layout{grid-template-columns:minmax(0,524px) minmax(260px,1fr);gap:24px;align-items:start}
 html:not([data-preview-device="tablet"]) #creation-output .result-layout>section{min-width:0;max-width:none}
 html:not([data-preview-device="tablet"]) #creation-output .comic-reader{grid-template-columns:40px minmax(0,1fr) 40px;gap:12px}
 html:not([data-preview-device="tablet"]) #creation-output #result-canvas{width:100%;min-width:0}
 html:not([data-preview-device="tablet"]) #creation-output .result-inspector{min-width:0}
}

/* Cast selection stays in a dialog within the current creation flow. */
 .cast-library-picker{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px 16px;margin-top:20px}
.cast-library-option{display:flex;flex-direction:column;align-items:center;gap:10px;padding:0;border:0;background:none;color:#333;min-width:0;box-shadow:none}
.cast-library-avatar{display:grid;place-items:center;position:relative;width:100%;aspect-ratio:1;border-radius:50%;background:#f3f3f3}
.cast-library-avatar img{width:100%;height:100%;object-fit:cover;border-radius:50%}
.cast-library-avatar>.ph{font-size:40px}
.cast-library-check{position:absolute;right:0;top:0;display:grid;place-items:center;width:22px;height:22px;border:2px solid #000;border-radius:50%;background:#fff;color:#000}
.cast-library-check .ph{font-size:14px}
.cast-library-option[aria-pressed="true"] .cast-library-check{background:#f0f000}
.cast-library-option strong{max-width:100%;overflow-wrap:anywhere;font-size:14px}
.cast-library-option:disabled{opacity:.4;cursor:default}
.cast-library-empty{grid-column:1/-1;font-size:14px;line-height:1.7}
#dialog:has(.cast-library-picker) .dialog-actions:empty{display:none}
@media(max-width:620px){.cast-library-picker{gap:16px 10px}.cast-library-check{width:18px;height:18px}.cast-library-check .ph{font-size:12px}}

/* Desktop character library shares the workbench avatar dimensions. */
@media(min-width:621px){
html:not([data-preview-device="tablet"]) .character-library-wrap{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:24px}
html:not([data-preview-device="tablet"]) .character-library-wrap>.step-heading{grid-column:1;grid-row:1}
html:not([data-preview-device="tablet"]) .character-library-wrap>.character-add-tile{grid-column:2;grid-row:1;align-self:start;display:flex;flex-direction:row;gap:16px;padding:0;border:0;border-radius:0}
html:not([data-preview-device="tablet"]) .character-library-wrap>.character-shelf-grid{grid-column:1/-1;display:grid;grid-template-columns:repeat(5,minmax(0,160px));gap:32px 16px;justify-content:space-between}
html:not([data-preview-device="tablet"]) .character-shelf-card{border:0;box-shadow:none;background:none;overflow:visible;border-radius:0}
html:not([data-preview-device="tablet"]) .character-portrait{height:auto;aspect-ratio:auto;overflow:visible;background:none}
html:not([data-preview-device="tablet"]) .character-portrait-edit{position:relative;width:100%;height:auto;aspect-ratio:1;border:3px solid #000;border-radius:50%;box-shadow:4px 4px 0 #000;overflow:hidden}
html:not([data-preview-device="tablet"]) .character-portrait-edit img{border-radius:50%}
html:not([data-preview-device="tablet"]) .character-portrait .character-delete{top:0;right:0;width:30px;height:30px;min-height:30px;border:2px solid #000;border-radius:50%;box-shadow:2px 2px 0 #000;font-size:18px}
html:not([data-preview-device="tablet"]) .character-portrait-labels{position:static;justify-content:center;margin-top:12px;gap:4px}
html:not([data-preview-device="tablet"]) .character-portrait-labels>span{padding:0;background:none;font-size:14px}
html:not([data-preview-device="tablet"]) .character-library-wrap .empty-state{grid-column:1/-1}
}
@media(min-width:621px){html:not([data-preview-device="tablet"]) body .character-library-wrap .character-shelf-card:not(:disabled):not([aria-disabled="true"]),html:not([data-preview-device="tablet"]) body .character-library-wrap .character-shelf-card:not(:disabled):not([aria-disabled="true"]):hover{box-shadow:none!important}}

@media(min-width:621px){html:not([data-preview-device="tablet"]) #creation-style{margin-top:60px}}

.cast-library-create .cast-library-avatar{border:2px dashed #bbb;background:#fff}.cast-library-create .cast-library-avatar>.ph{font-size:32px}.character-create-options{display:flex;flex-direction:column;gap:16px;margin-top:24px}.character-create-options>.button{width:100%;white-space:nowrap}.character-create-options+.dialog-actions:empty{display:none}

.project-card[data-action]{cursor:pointer}.project-card[data-action]:focus-visible{outline:3px solid #111;outline-offset:5px}

/* Feedback batch 2026-10-21: clear success feedback and concise account navigation. */
#toast{top:88px;bottom:auto;display:flex;align-items:center;gap:10px;background:#fff;color:#204f34;border:2px solid #428157;border-radius:10px;box-shadow:3px 3px 0 #204f3420;padding:12px 20px;font-size:14px;font-weight:500;transform:translate(-50%,-12px);z-index:100}
#toast.show{transform:translate(-50%,0)}
#toast:before{content:'✓';display:grid;place-items:center;flex-shrink:0;width:22px;height:22px;border-radius:50%;background:#e0f1e4;color:#287142;font-weight:700}
.account-menu-id{margin:0 0 8px;padding:10px 12px 16px;align-items:center;border-top:0}
.account-menu-id-content{display:flex;align-items:center;gap:8px;min-width:0;flex-wrap:wrap}
.account-menu-id-content>span{font-size:12px;white-space:nowrap}
.account-menu-id-content>strong{font-size:12px;font-weight:500;color:#666;overflow-wrap:anywhere}
.account-menu-id-content>button{display:inline-flex;align-items:center;padding:4px}
.referral-id-box .referral-id-inline{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.referral-id-inline>span{margin:0;white-space:nowrap}.referral-id-inline>strong{font-size:20px;letter-spacing:.03em}
.app-header #header-earn{display:inline-flex;background:#fff;box-shadow:none!important;font-size:12px;gap:5px}
@media(max-width:620px){#toast{top:82px;max-width:calc(100vw - 28px);width:max-content;font-size:12px}.app-header #header-earn{padding:4px 6px;font-size:10px;min-width:0}.app-header #header-earn .ph{font-size:15px}.referral-id-inline>strong{font-size:15px}}
@media(prefers-reduced-motion:reduce){#toast{transition:none}}

#toast[data-tone=warning]{color:#805b18;border-color:#b88b32}#toast[data-tone=warning]:before{content:'!';color:#805b18;background:#fff1cf}#toast[data-tone=info]{color:#315d7d;border-color:#7694ad}#toast[data-tone=info]:before{content:'i';color:#315d7d;background:#e6f0f7}

/* Personal menu: inline ID and background scroll lock. */
#account-popover .account-menu-id{align-items:center}
#account-popover .account-menu-id-content{display:flex;align-items:center;gap:12px;flex:1;min-width:0;flex-wrap:nowrap}
#account-popover .account-menu-id-content>span{flex-shrink:0}
#account-popover .account-menu-id-content>strong{flex:1;min-width:0;overflow-wrap:anywhere;text-align:left}
#account-popover .account-menu-id-content>button{flex-shrink:0;margin-left:auto}
#account-popover{overscroll-behavior:contain}

/* Character library picker: consistent portraits, distinct choices and anchored actions. */
#dialog:has(.cast-library-picker){width:min(640px,calc(100vw - 32px));padding:0;overflow:hidden}
#dialog:has(.cast-library-picker) .dialog-body{display:flex;flex-direction:column;max-height:calc(100dvh - 38px);padding:28px;overflow:hidden}
#dialog:has(.cast-library-picker) .dialog-top{margin-bottom:8px;align-items:center}
#dialog:has(.cast-library-picker) .cast-library-intro{margin:0 0 22px;color:#626262;font-size:14px}
#dialog .cast-library-picker{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:stretch;gap:14px;margin:0;padding:3px 4px 7px;overflow-y:auto;min-height:0;max-height:400px;overscroll-behavior:contain}
#dialog .cast-library-option{position:relative;display:flex;flex-direction:column;justify-content:flex-start;align-items:center;gap:12px;min-width:0;min-height:174px;padding:20px 12px 16px;border:2px solid #e1e1dd;border-radius:12px;background:#fff;box-shadow:none;color:#333;transition:border-color .15s,background .15s}
#dialog .cast-library-option:hover:not(:disabled):not([aria-pressed="true"]){border-color:#999;background:#fafaf7;box-shadow:none;transform:none}
#dialog .cast-library-option:focus-visible{outline:3px solid #0098e4;outline-offset:1px}
#dialog .cast-library-option[aria-pressed="true"]{border-color:#111;background:#fafbdc;box-shadow:2px 2px 0 #111}
#dialog .cast-library-avatar{position:relative;display:grid;place-items:center;width:84px;height:84px;min-width:84px;min-height:84px;flex:0 0 84px;aspect-ratio:1;border-radius:50%;overflow:hidden;background:#edf1ed}
#dialog .cast-library-avatar img{display:block;position:static;width:84px;height:84px;min-height:84px;max-height:none;max-width:none;object-fit:cover;aspect-ratio:1;border-radius:50%}
#dialog .cast-library-avatar>.ph{font-size:36px;color:#819788}
#dialog .cast-library-check{position:absolute;right:10px;top:10px;width:22px;height:22px;border:1.5px solid #b9bcb5;background:white;border-radius:50%}
#dialog .cast-library-option[aria-pressed="true"] .cast-library-check{background:#eef200;border:2px solid #111}
#dialog .cast-library-check .ph{font-size:14px;font-weight:bold}
#dialog .cast-library-option strong{font-size:14px;font-weight:600;line-height:1.5;max-width:100%;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#dialog .cast-library-option small{font-size:11px;line-height:1.4;color:#777;margin-top:-8px}
#dialog .cast-library-option:disabled{opacity:.45;cursor:not-allowed;background:#f5f5f3}
#dialog .cast-library-create{border-style:dashed;border-color:#c7c9c1;background:#fafaf7}
#dialog .cast-library-create .cast-library-avatar{background:#f0f1e9}
#dialog .cast-library-create .cast-library-avatar>.ph{color:#555;font-size:28px}
#dialog .cast-library-empty{grid-column:1/-1;padding:18px 0;margin:0;color:#666}
#dialog:has(.cast-library-picker) .dialog-actions{position:static;flex:0 0 auto;margin:22px 0 0;padding:18px 0 0;border-top:1px solid #e9e9e3;box-shadow:none;gap:12px;flex-wrap:nowrap;background:white}
#dialog .cast-library-summary{margin-right:auto;font-size:12px;color:#626262;line-height:1.5}
#dialog:has(.cast-library-picker) .dialog-actions .button{white-space:nowrap}
@media(max-width:620px){
 #dialog:has(.cast-library-picker){width:calc(100vw - 24px);max-height:calc(100dvh - 24px)}
 #dialog:has(.cast-library-picker) .dialog-body{padding:20px;max-height:calc(100dvh - 30px)}
 #dialog:has(.cast-library-picker) .dialog-top h2{font-size:21px}
 #dialog:has(.cast-library-picker) .cast-library-intro{font-size:13px;margin-bottom:18px}
 #dialog .cast-library-picker{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;max-height:45dvh}
 #dialog .cast-library-option{min-height:157px;padding:18px 10px 14px;gap:10px}
 #dialog .cast-library-avatar,#dialog .cast-library-avatar img{width:72px;height:72px;min-width:72px;min-height:72px;flex-basis:72px}
 #dialog:has(.cast-library-picker) .dialog-actions{display:grid;grid-template-columns:1fr 1fr;margin-top:16px;padding-top:14px;gap:10px}
 #dialog .cast-library-summary{grid-column:1/-1;margin:0 0 2px;font-size:12px}
 #dialog:has(.cast-library-picker) .dialog-actions .button{width:100%;min-width:0;padding:10px}
}
/* Interface language is independent from comic dialogue language. */
/* Same globe · name · caret trigger as the landing header, framed like the Sign in button. */
html body .app-header .interface-locale-control{display:inline-flex;align-items:center;gap:7px;min-width:0;max-width:200px;height:36px;padding:0 12px;border:3px solid #000;border-radius:8px;background:#fff;color:#333;font:inherit;font-size:14px;font-weight:600;line-height:1;white-space:nowrap;cursor:pointer;box-shadow:2px 2px 0 #000;transition:transform .18s ease,box-shadow .18s ease}
.interface-locale-control .ph-globe{font-size:16px}.interface-locale-control .language-chevron{font-size:14px;transition:transform .15s}.interface-locale-control[aria-expanded=true] .language-chevron{transform:rotate(180deg)}
.interface-locale-control .language-current-label{min-width:0;overflow:hidden;text-overflow:ellipsis}
@media(hover:hover){html body .app-header .interface-locale-control:hover{box-shadow:4px 4px 0 #000}}
html:not([lang^=zh]) .app-header{height:auto;min-height:76px;flex-wrap:wrap;gap:12px}
html:not([lang^=zh]) .app-header nav{flex-wrap:wrap;gap:16px}
html:not([lang^=zh]) .header-actions{flex-wrap:wrap;gap:10px}
html:not([lang^=zh]) .story-compose-actions .button{white-space:normal}
html[dir=rtl] .account-menu-row,html[dir=rtl] label{text-align:right}
html[dir=rtl] .ph-arrow-right{transform:scaleX(-1)}
html[dir=rtl] .story-compose-actions{text-align:left}
@media(max-width:620px){html body .app-header .interface-locale-control{max-width:120px;padding:0 8px;gap:5px}.header-actions{gap:8px}.app-header{height:auto;min-height:64px;flex-wrap:wrap;gap:8px}}

@media(max-width:620px){html:not([lang^=zh]) body #workspace #creation-style .style-body b{white-space:normal;overflow-wrap:anywhere;min-height:36px;display:block;line-height:16px}}
/* Inviter ID window countdown sits on its own line under the hint. */
.referral-fill-card .referral-countdown{display:block;margin-top:4px;font-variant-numeric:tabular-nums}
