:root{font-family:-apple-system,BlinkMacSystemFont,"Hiragino Kaku Gothic ProN","Hiragino Sans","Yu Gothic",Meiryo,sans-serif;color:#172b27;background:#f4f7f5;font-synthesis:none}*{box-sizing:border-box}body{margin:0;min-width:320px}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.52}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,.upload-zone:focus-within{outline:3px solid #95d8c5;outline-offset:2px}h1,h2,h3,p{margin-top:0}.topbar{height:74px;padding:0 clamp(20px,3vw,48px);background:#fff;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #e1ebe6;position:sticky;top:0;z-index:10}.brand{display:flex;align-items:center;gap:10px;font-size:19px;font-weight:800;letter-spacing:-.03em;white-space:nowrap}.brand-mark{width:33px;height:33px;display:grid;place-items:center;background:#087f64;color:#fff;border-radius:10px;font-size:21px}.brand-badge{font-size:10px;letter-spacing:.09em;color:#087f64;background:#e6f6ee;border-radius:4px;padding:4px 6px;margin-left:1px}.top-actions{display:flex;align-items:center;gap:18px}.status-pill{display:inline-flex;align-items:center;gap:7px;color:#557369;font-size:12px;font-weight:700}.status-pill:before{content:"";width:7px;height:7px;border-radius:50%;background:#bbc7c1}.status-pill.ready:before{background:#0cab7b}.status-pill.unready:before{background:#d89c46}.text-button,.link-button{border:0;background:transparent;color:#426c60;font-size:13px;font-weight:700;padding:8px 0}.text-button:hover,.link-button:hover{text-decoration:underline}.workspace{max-width:1720px;margin:auto;display:grid;grid-template-columns:330px minmax(0,1fr);gap:32px;padding:32px clamp(20px,3vw,48px) 64px}.sidebar{background:#fff;border:1px solid #e0eae5;border-radius:17px;box-shadow:0 7px 26px rgba(16,57,43,.035);height:max-content;position:sticky;top:106px;overflow:hidden}.sidebar-intro{padding:28px 26px 24px;background:#e8f5ed}.eyebrow{font-size:11px;letter-spacing:.17em;font-weight:800;color:#0b8d69}.sidebar-intro h1{font-size:24px;letter-spacing:-.055em;line-height:1.35;margin:13px 0 10px}.sidebar-intro p{font-size:13px;line-height:1.65;color:#62766e;margin:0}.control-section{padding:23px 26px;border-top:1px solid #e9f0ec}.section-label{display:flex;align-items:center;gap:9px;margin-bottom:18px}.section-label h2{font-size:15px;letter-spacing:-.02em;margin:0}.step-num{background:#e8f6ee;color:#0b8d69;width:23px;height:23px;border-radius:7px;display:grid;place-items:center;font-size:11px;font-weight:900}.control-section label:not(.upload-zone){display:block;font-size:12px;color:#577166;font-weight:800;margin-bottom:7px}.control-section textarea,.control-section select{width:100%;border:1px solid #d7e5dd;background:#fff;border-radius:9px;color:#172b27}.control-section textarea{resize:vertical;min-height:83px;padding:11px 12px;font-size:14px;line-height:1.5}.control-section textarea::placeholder{color:#9caea5}.control-section select{height:42px;padding:0 11px;font-size:14px}.upload-zone{margin-top:12px;min-height:71px;padding:12px;border:1px dashed #adcdbc;border-radius:10px;background:#f8fcf9;display:flex;align-items:center;gap:11px;cursor:pointer}.upload-zone:hover{background:#edf8f1}.upload-icon{display:grid;place-items:center;flex:none;width:35px;height:35px;border-radius:8px;background:#e5f5eb;color:#0b8d69;font-size:23px;font-weight:300}.upload-copy{min-width:0}.upload-copy strong{font-size:13px;display:block;margin-bottom:2px}.upload-copy small{display:block;font-size:11px;color:#7a9084;line-height:1.4}.upload-zone img{height:46px;width:46px;object-fit:cover;border-radius:7px;margin-left:auto}.inline-fields{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:16px}.export-section{background:#fcfdfc}.export-section p{font-size:13px;line-height:1.55;color:#667a70;margin-bottom:15px}.export-section small{display:block;margin-top:10px;line-height:1.5;color:#87998f;font-size:11px}.primary-button,.secondary-button,.card-button{border:1px solid transparent;border-radius:9px;display:inline-flex;align-items:center;justify-content:center;gap:8px;font-size:13px;font-weight:800;white-space:nowrap;transition:background .15s,transform .15s,border-color .15s}.primary-button:hover:not(:disabled),.secondary-button:hover:not(:disabled),.card-button:hover:not(:disabled){transform:translateY(-1px)}.primary-button{background:#087f64;color:#fff;padding:13px 16px}.primary-button:hover:not(:disabled){background:#086e58}.primary-button span{margin-left:auto}.full-width{width:100%}.secondary-button{color:#087f64;background:#fff;border-color:#c8e1d4;padding:11px 15px}.secondary-button:hover:not(:disabled){background:#eff8f2}.editor{min-width:0}.editor-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin:6px 0 26px}.editor-heading h2{font-size:30px;letter-spacing:-.055em;margin:9px 0 5px}.editor-heading p{font-size:13px;line-height:1.6;color:#71847a;margin:0}.progress-row{background:#fff;border:1px solid #e0eae5;border-radius:11px;padding:15px 18px;margin-bottom:22px;display:flex;align-items:center;gap:21px}.progress-row>div:first-child{display:flex;align-items:baseline;gap:14px;white-space:nowrap}.progress-row strong{font-size:14px}.progress-row span:not(#progress-fill){font-size:11px;color:#87988e}.progress-track{background:#eaf3ec;border-radius:20px;height:7px;flex:1;overflow:hidden}.progress-track span{display:block;height:100%;width:0;background:#0aaa76;border-radius:20px;transition:width .25s}.notice{padding:12px 15px;border-radius:9px;background:#fff4dd;border:1px solid #f3d798;color:#805a18;margin-bottom:20px;font-size:13px;line-height:1.5}.notice.success{background:#e8f7ef;color:#136b4f;border-color:#bde7cc}.sticker-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:17px}.sticker-card{background:#fff;border:1px solid #e0eae5;border-radius:13px;overflow:hidden;box-shadow:0 3px 15px rgba(16,57,43,.026)}.card-top{padding:13px 14px;display:flex;align-items:center;justify-content:space-between}.card-index{font-size:12px;letter-spacing:.07em;font-weight:900;color:#779185}.card-state{font-size:10px;font-weight:800;padding:4px 6px;border-radius:5px;color:#7a9184;background:#eef3ee}.card-state.done{background:#dcf5e7;color:#07825f}.card-state.bad{background:#fff0df;color:#af6820}.card-image{aspect-ratio:370/320;background-color:#fff;background-image:linear-gradient(45deg,#e5ece9 25%,transparent 25%),linear-gradient(-45deg,#e5ece9 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#e5ece9 75%),linear-gradient(-45deg,transparent 75%,#e5ece9 75%);background-size:22px 22px;background-position:0 0,0 11px,11px -11px,-11px 0;display:grid;place-items:center;position:relative;overflow:hidden}.card-image img{width:100%;height:100%;object-fit:contain}.card-placeholder{text-align:center;color:#a0afa7;font-size:12px;line-height:1.5;padding:10px}.card-placeholder span{width:54px;height:54px;background:#ffffffbd;border-radius:15px;display:grid;place-items:center;margin:0 auto 9px;font-size:26px;color:#80b69a}.card-body{padding:15px}.card-phrase{display:block;font-size:14px;color:#243b31;margin-bottom:5px}.card-expression{font-size:11px;color:#81958a;line-height:1.45;margin:0;min-height:32px}.card-actions{display:flex;gap:7px;margin-top:10px}.card-button{background:#087f64;color:#fff;padding:10px 9px;flex:1}.card-button:hover:not(:disabled){background:#086e58}.card-note{font-size:10px;color:#ab6d2d;margin:7px 0 0;line-height:1.4}.footer-help{margin-top:24px;border:1px solid #dce8df;border-radius:12px;background:#fff;padding:20px 23px;display:flex;align-items:center;justify-content:space-between;gap:16px}.footer-help strong{font-size:14px}.footer-help p{font-size:12px;color:#7e9085;line-height:1.5;margin:5px 0 0}.footer-help a{color:#087f64;font-size:12px;font-weight:800;white-space:nowrap;text-decoration:none}.footer-help a:hover{text-decoration:underline}@media(max-width:1270px){.sticker-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:1030px){.workspace{grid-template-columns:285px minmax(0,1fr);gap:20px}.sticker-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.sidebar-intro,.control-section{padding-left:20px;padding-right:20px}}@media(max-width:700px){.topbar{height:62px;padding:0 16px}.brand{font-size:17px}.brand-badge{display:none}.status-pill{font-size:0;gap:0}.status-pill:before{width:9px;height:9px}.top-actions{gap:13px}.text-button{font-size:12px}.workspace{display:block;padding:18px 14px 48px}.sidebar{position:static;margin-bottom:26px}.sidebar-intro{padding:19px 20px}.sidebar-intro h1{font-size:21px}.sidebar-intro h1 br{display:none}.control-section{padding:17px 20px}.editor-heading{display:block;margin:0 0 17px}.editor-heading h2{font-size:26px}.editor-buttons{margin-top:17px}.progress-row{display:block}.progress-track{margin-top:11px}.sticker-grid{gap:10px}.card-body{padding:10px}.card-top{padding:10px}.card-actions{gap:5px}.card-button{font-size:11px}.footer-help{display:block}.footer-help a{display:inline-block;margin-top:10px}}@media(max-width:390px){.sticker-grid{grid-template-columns:1fr}.card-body{padding:14px}.card-button{font-size:13px}}

.mobile-generate{display:none}
@media(max-width:700px){.mobile-generate{display:inline-flex;padding:9px 11px;font-size:11px}.top-actions{gap:9px}.top-actions .text-button{font-size:11px}.status-pill{display:none}}

.field-help{font-size:11px;color:#789085;line-height:1.55;margin:7px 0 11px}.message-section .field-help:first-of-type{margin-top:-5px}.category-tabs{display:flex;gap:7px;overflow-x:auto;scrollbar-width:thin;padding-bottom:9px;margin-bottom:7px}.category-chip,.message-chip,.selected-chip{font-size:12px;font-weight:700;border:1px solid #cfe4d8;border-radius:999px;background:#fff;color:#245446;min-height:40px;padding:8px 12px;white-space:nowrap}.category-chip{flex:none}.category-chip.active,.message-chip.active{background:#087f64;color:#fff;border-color:#087f64}.message-options,.selected-messages,.saved-messages{display:flex;flex-wrap:wrap;gap:7px}.selected-messages{min-height:42px}.selected-chip{background:#eaf6ee;border-color:#a7d8bd}.selected-chip span{font-size:17px;line-height:0;margin-left:4px}.selection-heading{display:flex;align-items:center;justify-content:space-between;gap:9px;margin:17px 0 8px;font-size:12px}.selection-heading .link-button{font-size:11px}.empty-messages{font-size:11px;color:#85998d;margin:8px 0}.control-section label.custom-label{margin-top:18px}.message-section #custom-message{min-height:55px}.library-heading{margin-top:21px}.library-heading span{color:#7d9387;font-size:10px}.saved-item{display:inline-flex;align-items:center;border:1px solid #cfe4d8;border-radius:999px;overflow:hidden}.saved-item .message-chip{border:0;border-radius:0}.saved-remove{border:0;background:#fff;color:#668578;font-size:18px;min-width:32px;min-height:40px}.sidebar-generate{margin-bottom:9px;min-height:48px}.export-section #export-zip{background:#fff;color:#087f64;border-color:#a9d3bc;min-height:46px}.generation-banner{display:flex;align-items:center;gap:16px;padding:16px 20px;margin-bottom:18px;border:1px solid #bce6d0;border-radius:12px;background:linear-gradient(105deg,#e8f8ef,#f5fbf6 60%,#e4f6ed);color:#12684f}.generation-banner[hidden]{display:none}.generation-banner strong{font-size:14px}.generation-banner p{margin:3px 0 0;font-size:12px;color:#62917b}.generation-orbit{width:43px;height:43px;flex:none;border:3px solid #c8e9d7;border-top-color:#0ca574;border-radius:50%;display:grid;place-items:center;animation:stamp-spin 1.3s linear infinite}.generation-orbit>span{font-size:19px;color:#0ca574;animation:stamp-spin 1.3s linear infinite reverse}.generation-dots{margin-left:auto;display:flex;gap:5px}.generation-dots i{width:6px;height:6px;border-radius:50%;background:#0ca574;animation:stamp-dot 1s infinite alternate}.generation-dots i:nth-child(2){animation-delay:.2s}.generation-dots i:nth-child(3){animation-delay:.4s}.card-generating{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;background:#f3fcf4ed;color:#087f64;font-size:12px}.card-generating .generation-orbit{width:48px;height:48px}@keyframes stamp-spin{to{transform:rotate(360deg)}}@keyframes stamp-dot{to{opacity:.2;transform:translateY(-4px)}}@media(prefers-reduced-motion:reduce){.generation-orbit,.generation-orbit>span,.generation-dots i{animation:none}}@media(max-width:700px){.category-tabs{margin-right:-20px}.category-chip,.message-chip,.selected-chip{min-height:44px}.saved-remove{min-height:44px}}

.editor-buttons{display:flex;gap:8px;align-items:center}.mobile-export{display:none}@media(max-width:700px){.mobile-export{display:inline-flex;padding:8px 9px;font-size:11px}.editor-buttons{flex-wrap:wrap}.editor-buttons button{flex:1;min-height:44px}}

.member-summary{padding:12px 26px;background:#f8fcf9;border-top:1px solid #e4efe9;display:flex;justify-content:space-between;align-items:center;gap:10px}.member-summary strong{font-size:11px;line-height:1.4;overflow-wrap:anywhere}.member-summary .link-button{white-space:nowrap;font-size:11px}.saved-pairs{display:grid;gap:7px}.saved-pair{border:1px solid #d4e5d9;border-radius:9px;display:flex;align-items:stretch;overflow:hidden}.saved-pair>button:first-child{border:0;background:#fff;padding:9px 11px;min-width:0;flex:1;text-align:left}.saved-pair strong,.saved-pair small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.saved-pair strong{font-size:12px}.saved-pair small{font-size:10px;color:#799085;margin-top:3px}.edit-sticker{border:0;background:transparent;color:#087f64;font-size:11px;font-weight:800;padding:8px 0 0}.app-dialog{border:0;border-radius:17px;box-shadow:0 20px 70px #102e2a55;max-width:min(440px,calc(100vw - 24px));width:100%;padding:25px}.app-dialog::backdrop{background:#102e2a99}.app-dialog form{position:relative}.app-dialog h2{font-size:21px;margin:0 28px 10px 0}.app-dialog p{font-size:12px;line-height:1.6;color:#678074}.app-dialog label{font-size:12px;font-weight:800;display:block;margin:14px 0 6px}.app-dialog input,.app-dialog select,.app-dialog textarea{width:100%;border:1px solid #cfe2d6;border-radius:9px;font:inherit;padding:11px;font-size:14px}.app-dialog .primary-button{margin-top:18px;min-height:45px}.dialog-close{position:absolute;right:0;top:0;width:32px;height:32px;border:0;background:#edf5ef;border-radius:8px;color:#426657;font-size:19px}.app-dialog [role=status]{min-height:20px;margin:11px 0 0;color:#087f64}

#new-project-sidebar{display:none}@media(max-width:700px){.topbar #open-login,.topbar #new-project{display:none}#new-project-sidebar{display:block;margin-top:8px}.topbar .brand{min-width:0}.topbar .top-actions{flex:none}}

.gallery-shortcut{display:flex;align-items:center;gap:10px;width:100%;padding:14px 25px;border:0;border-top:1px solid #e4efe9;background:#fff;color:#087f64;text-align:left;font-size:13px;font-weight:800}.gallery-shortcut:hover{background:#f1faf5}.gallery-shortcut>span:first-child{font-size:20px;line-height:1}.gallery-shortcut small{margin-left:auto;font-size:10px;color:#82998b;font-weight:600}.gallery-dialog{border:0;border-radius:18px;box-shadow:0 20px 70px #102e2a55;background:#f8fcf9;width:min(1040px,calc(100vw - 24px));max-width:none;max-height:min(88dvh,900px);padding:24px;overflow-y:auto}.gallery-dialog::backdrop{background:#102e2ab3}.gallery-dialog-header{display:flex;justify-content:space-between;gap:16px;position:relative}.gallery-dialog-header h2{font-size:25px;margin:6px 0}.gallery-dialog-header p{font-size:12px;color:#71847a;margin:0 0 14px}.gallery-dialog-header .dialog-close{position:static;flex:none}.gallery-dialog [role=status]{color:#5e7b6b;font-size:12px;margin:0 0 13px}.gallery-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:13px}.gallery-card{background:#fff;border:1px solid #dce9df;border-radius:12px;overflow:hidden}.gallery-card-image{aspect-ratio:1;background-color:#fff;background-image:linear-gradient(45deg,#e5ece9 25%,transparent 25%),linear-gradient(-45deg,#e5ece9 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#e5ece9 75%),linear-gradient(-45deg,transparent 75%,#e5ece9 75%);background-size:22px 22px;background-position:0 0,0 11px,11px -11px,-11px 0;display:grid;place-items:center}.gallery-card-image img{width:100%;height:100%;object-fit:contain}.gallery-card-info{padding:10px}.gallery-card-info strong,.gallery-card-info small{display:block;overflow-wrap:anywhere}.gallery-card-info strong{font-size:13px}.gallery-card-info small{font-size:10px;color:#71847a;line-height:1.4;margin:4px 0 9px}.gallery-card-info a{display:block;padding:8px;text-align:center;border-radius:7px;background:#e8f7ef;color:#087f64;text-decoration:none;font-size:11px;font-weight:800}.gallery-dialog #gallery-more{margin-top:15px}

@media(min-width:900px){
  body{overflow:hidden}
  .workspace{height:calc(100dvh - 74px);min-height:0;overflow:hidden;display:grid;grid-template-columns:clamp(280px,var(--sidebar-width,30%),65%) 14px minmax(0,1fr);gap:0;padding:18px clamp(20px,3vw,48px)}
  .sidebar{position:static;top:auto;height:100%;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
  .editor{height:100%;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:8px 5px 30px 20px}
  .workspace-splitter{display:flex;align-items:center;justify-content:center;cursor:col-resize;touch-action:none;user-select:none;border-radius:8px;outline-offset:-2px}
  .workspace-splitter>span{display:block;width:5px;height:64px;border-radius:9px;background:#bed8c8;box-shadow:inset 0 0 0 1px #a8ceba}
  .workspace-splitter:hover>span,.workspace-splitter:focus-visible>span,.workspace-splitter.is-dragging>span{background:#087f64}
  .workspace-splitter:focus-visible{outline:2px solid #087f64}
  body.is-resizing{cursor:col-resize;user-select:none}
}
@media(max-width:899px){.workspace-splitter{display:none}.workspace{display:block}.sidebar{position:static;margin-bottom:26px}.editor{min-width:0}}
@media(max-width:700px){.gallery-dialog{padding:17px}.gallery-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.gallery-card-info{padding:8px}}
.phrase-toggle{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:39px;margin:4px 0 8px;padding:8px 11px;border:1px solid #d4e5d9;border-radius:8px;background:#f8fcf9;color:#356454;font-size:11px;font-weight:800}.phrase-toggle:hover{background:#eaf6ee}.message-options[hidden]{display:none}
.gallery-dialog #gallery-more[hidden]{display:none}
.edit-pose-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:13px}.edit-pose-heading label{margin:0}.ai-pose-button{border:1px solid #a9d8c0;background:#eaf8ef;color:#087f64;border-radius:8px;padding:9px 10px;min-height:40px;font-size:11px;font-weight:800}.ai-pose-button:hover:not(:disabled){background:#d8f2e3}.ai-pose-button:disabled{opacity:.55}@media(max-width:390px){.edit-pose-heading{align-items:flex-start;flex-direction:column}.ai-pose-button{width:100%}}

.submission-open{margin-top:9px;min-height:44px}.submission-dialog{width:min(560px,calc(100vw - 24px));max-width:none;max-height:min(90dvh,880px);overflow-y:auto}.submission-dialog-content{position:relative}.submission-dialog h2{margin:8px 30px 9px 0}.submission-dialog label{margin-top:13px}.submission-dialog textarea{resize:vertical;min-height:84px}.submission-readiness{padding:11px 13px;border:1px solid #d4e5d9;border-radius:9px;background:#f5faf6;color:#496b5c;font-size:12px;font-weight:700;line-height:1.5}.submission-readiness.ready{border-color:#a8dbbf;background:#eaf8ef;color:#087f64}.submission-ai-disclosure{display:flex;align-items:center;justify-content:space-between;margin-top:16px;padding:12px 13px;border-radius:9px;background:#f5faf6;color:#426c60;font-size:12px}.submission-ai-disclosure span{font-weight:800;color:#087f64}.submission-dialog .submission-help{margin:11px 0 0;font-size:11px}.submission-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:16px}.submission-actions .primary-button{margin:0}.submission-market-link{display:flex;align-items:center;justify-content:center;min-height:44px;margin-top:10px;border:1px solid #b5d9c5;border-radius:9px;background:#fff;color:#087f64;font-size:13px;font-weight:800;text-decoration:none}.submission-market-link:hover{background:#eff8f2}.submission-dialog #submission-feedback{min-height:20px;margin:12px 0 0;color:#087f64}.submission-dialog .submission-disclaimer{margin:10px 0 0;color:#71847a;font-size:11px}.footer-help button{flex:none}@media(max-width:700px){.submission-dialog{padding:19px}.submission-actions{grid-template-columns:1fr}.submission-actions button{min-height:46px}.footer-help button{width:100%;margin-top:12px}}
.submission-dialog .submission-language-heading{margin:19px 0 0;padding-bottom:6px;border-bottom:1px solid #dce9df;color:#264b3c;font-size:12px;font-weight:800}
.submission-wording-status{margin-top:10px;padding:12px 13px;border:1px solid #d4e5d9;border-radius:9px;background:#f7fbf8;color:#315947;font-size:12px;line-height:1.55}.submission-wording-status p{margin:0}.submission-wording-status button{margin-top:9px;width:100%}.submission-wording-status button[hidden]{display:none}
.submission-repair[hidden]{display:none}.submission-repair{margin-top:10px;padding:13px;border:1px solid #edc8aa;border-radius:9px;background:#fff8f1;color:#7c411d;font-size:12px;line-height:1.55}.submission-repair strong{display:block;font-size:13px}.submission-repair p{margin:5px 0 11px}.submission-repair-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.submission-repair-actions button{min-height:42px;margin:0;border-radius:9px;font-size:12px}.submission-repair-actions .primary-button{background:#087f64}.submission-repair-actions .secondary-button{background:#fff}@media(max-width:520px){.submission-repair-actions{grid-template-columns:1fr}}
.submission-character{margin-top:12px;padding:13px;border:1px solid #cde2d2;border-radius:9px;background:#fff}.submission-character h3{margin:0;color:#264b3c;font-size:15px}.submission-character p{margin:5px 0 0;color:#66796d;font-size:12px}.submission-character-fields{display:grid;grid-template-columns:1fr 1fr;gap:10px}.submission-character-fields label{display:block;margin-top:9px}.submission-character-fields input{width:100%;box-sizing:border-box}.submission-wording-status .submission-wording-privacy{margin-top:10px;color:#66796d;font-size:11px}@media(max-width:520px){.submission-character-fields{grid-template-columns:1fr}}
:root{--bottom-menu-height:calc(71px + env(safe-area-inset-bottom))}
.bottom-menu{position:fixed;left:0;right:0;bottom:0;z-index:9;display:flex;align-items:center;justify-content:center;gap:12px;padding:10px 14px calc(10px + env(safe-area-inset-bottom));background:rgba(255,255,255,.96);border-top:1px solid #dce9df;box-shadow:0 -5px 20px rgba(16,57,43,.08)}
.bottom-menu #bottom-menu-status{font-size:12px;font-weight:800;color:#587568;white-space:nowrap}
.bottom-menu .primary-button{width:min(100%,560px);min-width:0;min-height:50px;font-size:15px}
@media(min-width:900px){.workspace{height:calc(100dvh - 74px - var(--bottom-menu-height))}}
@media(max-width:899px){.workspace{padding-bottom:calc(var(--bottom-menu-height) + 40px)}}
.submission-actions #submission-bundle,.submission-actions #submission-mac{grid-column:1/-1}.submission-dialog [aria-invalid="true"]{border-color:#d56654;box-shadow:0 0 0 2px #fbe4df}.submission-dialog #submission-copy-fallback{width:100%;min-height:130px;margin-top:10px}.submission-dialog #submission-copy-fallback[hidden]{display:none}
.submission-actions #submission-cloud{grid-column:1/-1}.line-account-section{margin-top:16px;padding:13px;border:1px solid #cde2d2;border-radius:9px;background:#f5faf6}.line-account-section[hidden],.line-review-consent[hidden],#submission-cloud[hidden],#submission-mac[hidden],#line-account-remove[hidden]{display:none}.line-account-section strong{color:#264b3c}.line-account-section p{margin:6px 0;font-size:12px;line-height:1.55}.line-account-actions{display:flex;gap:8px;flex-wrap:wrap;margin:9px 0}.line-account-actions button{min-height:40px}.line-review-consent{display:flex;align-items:flex-start;gap:9px;margin-top:15px;font-size:12px;line-height:1.5}
.sheet-preview-panel{margin:0 0 22px;padding:16px;border:1px solid #cfe1d6;border-radius:12px;background:#fff}
.sheet-preview-panel[hidden]{display:none}
.sheet-preview-stale[hidden]{display:none}.sheet-preview-stale{margin:12px 0 0;padding:9px 11px;border:1px solid #efcfaf;border-radius:9px;background:#fff7ed;color:#95541d;font-size:11px;font-weight:700;line-height:1.5}
.sheet-preview-panel summary{cursor:pointer;color:#126b54;font-size:14px;font-weight:800}
.sheet-preview-panel summary span{margin-left:8px;color:#70887a;font-size:11px}
.sheet-preview-controls{display:flex;align-items:center;flex-wrap:wrap;gap:7px;margin:14px 0 10px}
.sheet-preview-controls span{margin-right:4px;color:#526e60;font-size:11px;font-weight:700}
.sheet-preview-scroll{overflow-x:auto;border:1px solid #d9e7df;border-radius:8px}
.sheet-preview-stage{position:relative;width:100%;min-width:min(100%,600px);aspect-ratio:7 / 6;background:#fff}
.sheet-preview-stage.rows-2{aspect-ratio:7 / 3}
.sheet-preview-stage.checker{background-color:#fff;background-image:linear-gradient(45deg,#dce6e1 25%,transparent 25%),linear-gradient(-45deg,#dce6e1 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#dce6e1 75%),linear-gradient(-45deg,transparent 75%,#dce6e1 75%);background-size:24px 24px;background-position:0 0,0 12px,12px -12px,-12px 0}
.sheet-preview-stage.black{background:#172321}
.sheet-preview-stage.white{background:#fff}
.sheet-preview-stage img{display:block;width:100%;height:100%;object-fit:contain}
.sheet-preview-cells{position:absolute;inset:0;display:grid;grid-template-columns:repeat(4,1fr);grid-template-rows:repeat(4,1fr);pointer-events:none}
.sheet-preview-stage.rows-2 .sheet-preview-cells{grid-template-rows:repeat(2,1fr)}
.sheet-preview-cells span{border:1px solid #087f6480;color:#075540;background:#ffffffb8;align-self:start;justify-self:start;margin:3px;padding:2px 5px;border-radius:4px;font-size:10px;font-weight:800}
.sheet-preview-cells span.failed{color:#8d3e1f;background:#fff3e8;border-color:#c97041}
.sheet-preview-detail{margin:10px 0 0;color:#536d60;font-size:11px;line-height:1.5}
.sheet-preview-failures{margin:7px 0 0;padding-left:20px;color:#9b4c23;font-size:11px;line-height:1.5}
@media(max-width:420px){.bottom-menu .primary-button{font-size:13px}.bottom-menu #bottom-menu-status{font-size:11px}.sheet-preview-panel{padding:11px}}
.development-details{margin-top:12px;padding:11px 12px;border:1px solid #cce4d6;border-radius:9px;background:#f4fbf6;color:#385d4d;font-size:11px;line-height:1.55;overflow-wrap:anywhere}
.development-details[hidden]{display:none}.development-details strong{display:block;color:#087f64;margin-bottom:6px}.development-details p{margin:0 0 5px}.development-details p:last-child{margin:0}
:root{--bottom-menu-height:78px}
.bottom-menu{min-height:var(--bottom-menu-height);gap:16px}
.bottom-menu-actions{display:flex;align-items:center;gap:8px;width:min(100%,740px)}
.bottom-menu-actions>button{min-height:48px;padding:9px 13px;flex:1;white-space:nowrap}
.bottom-menu-actions #generate-sticky{flex:2.1;width:auto}
.bottom-menu-actions .bottom-more{flex:0 0 52px;font-size:20px;line-height:1}
.bottom-more-panel{position:absolute;right:max(14px,calc((100vw - 740px)/2));bottom:calc(100% + 8px);width:min(300px,calc(100vw - 28px));padding:7px;border:1px solid #d5e5da;border-radius:12px;background:#fff;box-shadow:0 12px 36px #183b2b38;display:grid;gap:2px}
.bottom-more-panel[hidden]{display:none}
.bottom-more-panel button,.bottom-more-panel a{display:block;width:100%;padding:13px 12px;border:0;border-radius:7px;background:transparent;color:#285448;text-align:left;text-decoration:none;font-size:13px;font-weight:800}
.bottom-more-panel button:hover,.bottom-more-panel a:hover{background:#edf8f1}.bottom-more-panel #new-project{color:#b25636}
.bottom-more-panel #admin-link{color:#087f64;background:#e8f6ed;border:1px solid #b9dcc8}
.bottom-more-panel #admin-link:hover{background:#d6efdf}
.character-source-preview{display:block;width:min(220px,100%);max-height:220px;object-fit:contain;margin:12px auto;border:1px solid #d7e5dd;border-radius:10px;background-color:#fff;background-image:linear-gradient(45deg,#e6eeea 25%,transparent 25%),linear-gradient(-45deg,#e6eeea 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#e6eeea 75%),linear-gradient(-45deg,transparent 75%,#e6eeea 75%);background-size:20px 20px;background-position:0 0,0 10px,10px -10px,-10px 0}
.character-source-preview[hidden]{display:none}
.bottom-more-panel #gallery-shortcut-count{float:right;color:#7a9583;font-size:11px}
.generation-banner{scroll-margin-top:18px}.generation-copy{min-width:0;flex:1}.generation-clock{display:flex;flex-direction:column;align-items:flex-end;flex:none;margin-left:auto;white-space:nowrap}.generation-clock strong{font-size:18px;font-variant-numeric:tabular-nums}.generation-clock small,.generation-copy small{font-size:10px;color:#6b917a}.generation-copy small{display:block;margin-top:4px}.generation-copy small[hidden]{display:none}
.sheet-workbench{margin:-4px 0 18px;padding:13px;border:1px solid #cfe5d7;border-radius:12px;background:#fff;scroll-margin-top:18px}.sheet-workbench[hidden]{display:none}
.sheet-workbench-heading{display:flex;flex-wrap:wrap;justify-content:space-between;gap:5px;margin-bottom:10px;color:#175d49;font-size:12px}.sheet-workbench-heading span{color:#789085;font-size:10px}
.sheet-workbench-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}.sheet-workbench-cell{position:relative;min-width:0;aspect-ratio:7/6;border:1px dashed #b6d9c3;border-radius:6px;background:linear-gradient(100deg,#f3f9f4 20%,#e5f4e9 38%,#f3f9f4 58%);background-size:240% 100%;animation:sheet-shimmer 2.3s linear infinite;animation-delay:var(--cell-delay);overflow:hidden;padding:5px}.sheet-workbench-cell b{position:relative;z-index:1;color:#4d8067;font-size:10px}.sheet-workbench-cell span{position:absolute;bottom:4px;left:5px;right:5px;color:#598673;font-size:10px;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@keyframes sheet-shimmer{to{background-position-x:-240%}}
.card-generating{background:linear-gradient(110deg,#eefaf1ea,#dff4e8e8,#eefaf1ea);background-size:250% 100%;animation:sheet-shimmer 2.2s linear infinite;animation-delay:var(--card-delay)}
.card-generating::before{content:'✦';position:absolute;top:12%;left:13%;font-size:18px;color:#80c2a0;animation:card-float 2.8s ease-in-out infinite alternate}.card-generating::after{content:'✦';position:absolute;right:15%;bottom:18%;font-size:13px;color:#80c2a0;animation:card-float 2.2s ease-in-out infinite alternate-reverse}
@keyframes card-float{to{transform:translateY(12px) rotate(18deg);opacity:.45}}
input:not([type=file]),textarea,select{scroll-margin-top:80px;scroll-margin-bottom:calc(var(--bottom-menu-height) + 26px)}
@media(max-width:700px){:root{--bottom-menu-height:104px}.bottom-menu{display:block;padding:8px 10px calc(9px + env(safe-area-inset-bottom))}.bottom-menu #bottom-menu-status{display:block;margin:0 0 6px;text-align:center;font-size:11px}.bottom-menu-actions{gap:6px}.bottom-menu-actions>button{min-height:48px;padding:7px 8px;font-size:11px}.bottom-menu-actions #generate-sticky{font-size:12px;flex:2.2}.bottom-menu-actions .bottom-more{flex:0 0 42px;font-size:19px}.generation-banner{padding:12px;gap:9px}.generation-orbit{width:36px;height:36px}.generation-clock strong{font-size:15px}.sheet-workbench{padding:9px}}
@media(max-width:370px){.bottom-menu-actions #generate-sticky{font-size:11px}.bottom-menu-actions>button{padding:6px 5px}}
@media(prefers-reduced-motion:reduce){.sheet-workbench-cell,.card-generating,.card-generating::before,.card-generating::after{animation:none}}

.saved-sheets-panel{margin:0 0 22px;padding:15px;border:1px solid #cfe1d6;border-radius:12px;background:#fff;scroll-margin-top:20px}
.saved-sheets-panel p{margin:11px 0;color:#6d8476;font-size:12px;line-height:1.5}
.saved-sheets-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:9px}
.saved-sheets-list button{min-width:0;padding:12px;border:1px solid #d6e7dc;border-radius:9px;background:#f8fcf9;color:#315b49;text-align:left}
.saved-sheets-list button:hover{border-color:#87c9a5;background:#edf8f1}
.saved-sheets-list strong,.saved-sheets-list span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.saved-sheets-list strong{font-size:12px}.saved-sheets-list span{margin-top:5px;color:#708d7b;font-size:11px}
.admin-page{width:min(720px,calc(100% - 32px));margin:40px auto 90px}
.admin-page h1{margin:8px 0 12px}.admin-page>p{color:#5c7768;font-size:14px;line-height:1.6}
.admin-settings-card{padding:24px;border:1px solid #d4e6d9;border-radius:14px;background:#fff}
.admin-settings-card[hidden]{display:none}
.admin-settings-card h2{margin:0 0 9px;font-size:19px}.admin-settings-card p{color:#5c7768;font-size:13px;line-height:1.6}
.admin-toggle{display:flex;align-items:center;gap:10px;margin:18px 0;font-weight:800;color:#244d3c}
.admin-toggle input{width:20px;height:20px;accent-color:#087f64}
.admin-settings-card #admin-save-status{margin:12px 0 0}
.admin-line-card{margin-top:18px}
.admin-line-card form{display:grid;gap:9px;margin-top:16px}
.admin-line-card label{font-size:13px;font-weight:800;color:#285448}
.admin-line-card input{width:100%;min-height:46px;padding:10px 12px;border:1px solid #c9e2d3;border-radius:9px;background:#fff}
.admin-line-card form .primary-button{justify-self:start;margin-top:5px}
.admin-line-card #admin-line-remove{margin-top:14px}
@media(min-width:900px){body:has(.admin-page){overflow:auto}}
@media(max-width:700px){:root{--bottom-menu-height:calc(104px + env(safe-area-inset-bottom))}.bottom-menu-actions #generate-sticky{font-size:11px}}

.control-section .field-label{display:block;font-size:12px;color:#577166;font-weight:800;margin-bottom:9px}
.style-choices{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-bottom:8px}
.style-choice{min-width:0;padding:4px;border:1.5px solid #dce8df;border-radius:10px;background:#fff;color:#35584a;text-align:center;display:flex;flex-direction:column;align-items:center;gap:5px;transition:border-color .15s,box-shadow .15s,transform .15s}
.style-choice:hover{border-color:#77b69f;transform:translateY(-1px)}
.style-choice.is-selected{border-color:#087f64;box-shadow:0 0 0 2px #c8f0de;background:#effaf3;color:#065b48}
.style-choice img{display:block;width:100%;height:auto;aspect-ratio:370/320;object-fit:contain;border-radius:6px}
.style-choice span{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden;min-height:2.5em;line-height:1.25;font-size:10px;font-weight:800;overflow-wrap:anywhere}
.opening{display:none;position:fixed;inset:0;z-index:100;background:#071a14;color:#d7f7df;overflow:hidden;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}
.opening-live .opening{display:block;animation:none}
.opening.is-done{display:none}
.opening-live body{overflow:hidden}
.opening.is-closing{opacity:0;transition:opacity .28s ease}
.opening>canvas,.opening-shade{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.opening-shade{background:linear-gradient(180deg,#071a142e 0%,#071a1400 25%,#071a1499 50%,#071a1400 78%,#071a14a6 100%),radial-gradient(ellipse at center,#071a14 0%,#071a14d9 28%,#071a1433 75%)}
.opening:after{content:'';position:absolute;inset:0;pointer-events:none;background:repeating-linear-gradient(180deg,#0000 0 3px,#001c0d55 3px 4px);opacity:.48;z-index:2}
.opening-content{position:relative;z-index:1;min-height:100dvh;display:grid;grid-template-rows:auto 1fr auto;padding:clamp(18px,3vw,40px);padding-bottom:max(clamp(18px,3vw,40px),env(safe-area-inset-bottom));max-width:1440px;margin:auto}
.opening-top,.opening-bottom{display:flex;align-items:center;gap:14px;color:#8bcfa5;font-size:11px;font-weight:700;letter-spacing:.15em}
.opening-top{justify-content:space-between}.opening-top>span:last-child{color:var(--opening-accent,#83edaa)}
.opening-center{align-self:center;text-align:center;padding:24px 0 38px}.opening-stamp{width:92px;height:100px;border:2px solid #a0e2b6;margin:0 auto 31px;display:grid;place-items:center;position:relative;box-shadow:8px 8px 0 #5fbf83,0 0 32px #41b77940;background:#0d3524}.opening-stamp:before,.opening-stamp:after{content:'';position:absolute;width:11px;height:11px;background:#071a14;border:1px solid #a0e2b6;top:10px}.opening-stamp:before{left:-7px}.opening-stamp:after{right:-7px}.opening-stamp span{font:normal 56px/1 Georgia,serif;color:#c1f3ca;text-shadow:0 0 21px #a3eabeaa}.opening-stamp small{position:absolute;bottom:7px;font-size:9px;letter-spacing:.2em;color:#8fdbab}.opening-kicker{font-size:11px;color:#8fdbab;letter-spacing:.18em;margin:0 0 13px}.opening-center h2{font-family:inherit;font-size:clamp(36px,8vw,92px);font-weight:800;letter-spacing:.04em;line-height:1.12;margin:0;color:#e1ffe8;text-shadow:0 0 30px #5cce8140}.opening-cursor{display:inline-block;animation:opening-blink .65s steps(1,end) infinite;color:#9aebaf}.opening-subtitle{font-size:clamp(13px,1.8vw,18px);letter-spacing:.1em;color:#a3dcb4;margin:19px 0 29px}.opening-terminal{width:min(510px,88vw);margin:auto;padding:12px 16px;border:1px solid #4b9867;background:#091d15de;box-shadow:0 0 0 1px #102e20 inset;text-align:left;color:#95deab;font-size:11px;letter-spacing:.08em;white-space:nowrap;overflow:hidden}.opening-terminal span{display:block;overflow:hidden;text-overflow:ellipsis}
.opening-center h2{font-size:clamp(31px,5.7vw,82px);white-space:nowrap;letter-spacing:.025em}.opening-stamp{animation:opening-hover 2.4s steps(4,end) infinite}.opening-start{display:inline-flex;align-items:center;justify-content:center;gap:15px;margin:26px auto 0;min-width:min(340px,84vw);min-height:62px;padding:12px 24px;border:2px solid #d9ffe3;border-radius:0;background:var(--opening-accent,#83edaa);box-shadow:7px 7px 0 #164c30;color:#052015;font:800 clamp(16px,2.3vw,22px)/1 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;letter-spacing:.12em;transition:transform .12s,box-shadow .12s,background .2s}.opening-start:hover{transform:translate(3px,3px);box-shadow:4px 4px 0 #164c30}.opening-start:focus-visible{outline:3px solid #fff;outline-offset:5px}.opening-start span{font-size:17px}.opening-hint{color:#b9e9c7;font-size:10px;letter-spacing:.18em;margin:17px 0 0;animation:opening-blink 1.2s steps(1,end) infinite}
.opening-showcase{width:min(570px,90vw);margin:17px auto 14px;border:1px solid var(--opening-accent,#83edaa);background:#06150f;box-shadow:5px 5px 0 #1b5033;text-align:left}.opening-showcase-head{display:flex;align-items:center;gap:10px;min-height:30px;padding:3px 8px;border-bottom:1px solid #35694b;color:var(--opening-accent,#83edaa);font-size:10px;letter-spacing:.09em;font-weight:800}.opening-showcase-head>span:nth-child(2){margin-left:auto;color:#8daa99;font-size:9px}.opening-showcase-head button{flex:none;border:1px solid #568d6c;background:#103222;color:#d8ffe3;padding:3px 7px;border-radius:0;font:inherit;font-size:9px;min-height:25px}.opening-showcase-head button:hover,.opening-showcase-head button:focus-visible{background:var(--opening-accent,#83edaa);color:#052015;outline:2px solid #e9ffed;outline-offset:2px}.opening-showcase canvas{display:block;width:100%;height:148px;background:#06150f;image-rendering:pixelated;pointer-events:none}.opening-showcase p{margin:0;padding:5px 9px 6px;border-top:1px solid #234b32;color:#b7d7bf;font-size:10px;letter-spacing:.04em;line-height:1.3}.opening-showcase+.opening-terminal{margin-top:0}.opening-showcase~.opening-start{margin-top:18px}
.opening-bottom{display:grid;grid-template-columns:auto 1fr auto;gap:15px}.opening-signal{height:9px;border:1px solid #4a9569;background:repeating-linear-gradient(90deg,var(--opening-accent,#83edaa) 0 9px,#08170f 9px 13px);background-size:52px 100%;animation:opening-signal 1s steps(4,end) infinite;opacity:.8}.opening-bottom>span:last-child{min-width:64px;text-align:right;color:#d8ffe4}
@keyframes opening-blink{50%{opacity:0}}@keyframes opening-failsafe{to{visibility:hidden;pointer-events:none;opacity:0}}
@keyframes opening-hover{50%{transform:translateY(-6px)}}@keyframes opening-signal{to{background-position:52px 0}}
@media(max-width:600px){.opening-content{padding:20px 18px max(24px,env(safe-area-inset-bottom))}.opening-top,.opening-bottom{font-size:9px;letter-spacing:.1em}.opening-stamp{width:74px;height:80px;margin-bottom:26px}.opening-stamp span{font-size:44px}.opening-stamp small{font-size:8px}.opening-center h2{font-size:clamp(24px,7vw,40px)}.opening-subtitle{margin:12px 0 14px}.opening-showcase{width:100%;margin:12px auto}.opening-showcase-head{font-size:9px}.opening-showcase-head>span:nth-child(2){font-size:8px}.opening-showcase canvas{height:126px}.opening-bottom{grid-template-columns:1fr auto}.opening-bottom>span:first-child{grid-column:1/-1}.opening-terminal{font-size:9px}}
@media(max-height:780px){.opening-stamp{display:none}.opening-center{padding:8px 0 14px}.opening-subtitle{margin:10px 0 12px}.opening-showcase{margin:12px auto}.opening-showcase canvas{height:124px}.opening-start{min-height:54px}.opening-hint{margin-top:10px}}
@media(max-height:680px){.opening-terminal{display:none}.opening-showcase canvas{height:112px}.opening-center h2{font-size:clamp(24px,5vw,58px)}}
@media(max-width:380px){.opening-showcase-head{gap:6px}.opening-showcase-head>span:first-child{white-space:nowrap;letter-spacing:.03em}.opening-showcase-head>span:nth-child(2){display:none}.opening-showcase-head button{margin-left:auto}}
@media(prefers-reduced-motion:reduce){.opening-cursor,.opening-stamp,.opening-hint,.opening-signal{animation:none}.opening.is-closing{transition:none}}

/* Keep the chosen phrases in view while the user scrolls through setup. */
.selection-tray{height:68px;position:sticky;top:74px;z-index:9;background:#f0faf4;border-bottom:1px solid #c9e5d4;box-shadow:0 5px 18px #173d2918}
.selection-tray[hidden]{display:none}
.selection-tray-inner{max-width:1720px;height:100%;margin:auto;padding:9px clamp(20px,3vw,48px);display:flex;align-items:center;gap:16px;min-width:0}
.selection-tray-count{flex:none;color:#17664d;font-size:13px;white-space:nowrap}
.selection-tray .selected-messages{min-width:0;min-height:0;flex:1;display:flex;flex-wrap:nowrap;align-items:center;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;padding:3px 1px 5px}
.selection-tray .selected-chip{flex:none;min-height:39px;background:#fff;border-color:#a7d8bd}
.selection-tray .selected-chip.is-arriving{opacity:0}
.message-flight{position:fixed;z-index:30;display:flex;align-items:center;justify-content:center;white-space:nowrap;padding:8px 12px;border:1px solid #087f64;border-radius:999px;background:#087f64;color:#fff;font-size:12px;font-weight:800;box-shadow:0 8px 24px #087f6460;pointer-events:none}
@media(min-width:900px){body.has-selection-tray .workspace{height:calc(100dvh - 74px - var(--bottom-menu-height) - 68px)}}
@media(max-width:700px){.selection-tray{top:62px}.selection-tray-inner{gap:10px;padding:8px 14px}.selection-tray-count{font-size:11px}.selection-tray .selected-chip{min-height:42px}}
.bottom-more-panel{max-height:min(68dvh,540px);overflow-y:auto;overscroll-behavior:contain}

.active-favorite{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:10px;padding:9px 10px;border:1px solid #b5ddc4;border-radius:8px;background:#eef9f1;color:#17664d;font-size:11px;font-weight:800}
.active-favorite[hidden]{display:none}
.active-favorite button,.character-favorites-heading button{border:0;background:transparent;color:#087f64;font-size:11px;font-weight:800;white-space:nowrap}
.character-favorites{margin-top:20px;padding-top:16px;border-top:1px solid #e5eee8}
.character-favorites-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;color:#244d3e;font-size:12px}
.character-favorites #favorites-status{margin:9px 0 0;color:#738a7d;font-size:11px;line-height:1.5}
.favorites-list{display:grid;gap:8px;margin-top:9px}
.favorite-character-card{display:grid;grid-template-columns:56px minmax(0,1fr);gap:9px;align-items:center;padding:8px;border:1px solid #d4e5d9;border-radius:9px;background:#f9fcfa}
.favorite-character-card.is-active{border-color:#70b995;background:#edf9f1}
.favorite-character-card img{width:56px;height:56px;object-fit:contain;border-radius:7px;background-color:#fff;background-image:linear-gradient(45deg,#e5ece9 25%,transparent 25%),linear-gradient(-45deg,#e5ece9 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#e5ece9 75%),linear-gradient(-45deg,transparent 75%,#e5ece9 75%);background-size:14px 14px}
.favorite-character-placeholder{display:grid;place-items:center;width:56px;height:56px;border-radius:7px;background:#eaf6ee;color:#087f64;font-size:25px}
.favorite-character-info{min-width:0}
.favorite-character-info strong,.favorite-character-info small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.favorite-character-info strong{font-size:11px;color:#244d3e}
.favorite-character-info small{margin-top:2px;color:#7a9084;font-size:10px}
.favorite-character-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.favorite-character-actions button,.gallery-favorite{min-height:31px;padding:5px 8px;border:1px solid #b8dcca;border-radius:7px;background:#fff;color:#087f64;font-size:10px;font-weight:800}
.favorite-character-actions button:first-child{background:#087f64;color:#fff;border-color:#087f64}
.gallery-favorite{width:100%;margin-top:6px;font-size:11px}
.character-library{margin-top:18px;min-width:0}
.character-setup-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:stretch;gap:10px;margin-bottom:16px}.character-setup-row .active-character-card{position:relative;min-width:0;min-height:0;margin:0;padding:0;aspect-ratio:1;overflow:hidden}.character-setup-row .active-character-thumb{position:absolute;inset:0;width:100%;height:100%;border:0;border-radius:0}.character-setup-row .active-character-thumb img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.character-setup-row .character-description{min-width:0;display:flex;flex-direction:column}.character-setup-row .character-description textarea{min-height:0;flex:1;width:100%;font-size:12px;padding:8px}
.active-character-card{display:flex;align-items:center;gap:11px;min-height:83px;margin:0 0 16px;padding:9px;border:1px solid #b8d9c7;border-radius:9px;background:#f4fbf7}.active-character-thumb{display:grid;place-items:center;flex:none;width:62px;height:62px;overflow:hidden;border:1px solid #cce4d6;border-radius:9px;background:#fff}.active-character-thumb img{width:100%;height:100%;object-fit:contain}.active-character-thumb img[hidden]{display:none}.active-character-thumb #active-character-placeholder{opacity:.3}
.character-library-heading{display:flex;align-items:center;justify-content:space-between;margin:14px 0 8px;color:#27483d;font-size:12px}
.character-library-heading span{color:#708c7d;font-weight:600}
.character-library-heading button{border:0;background:transparent;color:#087f64;font-size:12px;font-weight:800;min-height:34px}
.character-group-strip{display:flex;gap:8px;overflow-x:auto;padding:3px 2px 8px;scrollbar-width:thin}
.character-group-strip button{display:flex;flex:none;flex-direction:column;align-items:flex-start;justify-content:center;gap:4px;min-width:110px;max-width:170px;min-height:58px;padding:8px 11px;border:1.5px solid #87bea4;border-radius:9px;background:#f5fbf7;color:#215840;text-align:left;box-shadow:0 2px 6px #174e3220;transition:transform .16s ease,background .16s ease,border-color .16s ease,box-shadow .16s ease}
.character-group-strip button strong{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}.character-group-strip button small{font-size:10px;font-weight:800;color:#087f64}.character-group-strip button:hover:not(:disabled){transform:translateY(-2px);border-color:#087f64;box-shadow:0 5px 12px #174e3229}.character-group-strip button:active:not(:disabled){transform:scale(.97)}
.character-group-strip button[aria-pressed="true"]{background:#087f64;color:#fff;border-color:#087f64;box-shadow:0 3px 9px #087f6440}.character-group-strip button[aria-pressed="true"] small{color:#e3fff0}
.character-image-strip{display:grid;grid-auto-flow:column;grid-auto-columns:calc((100% - 16px)/3);gap:8px;overflow-x:auto;overscroll-behavior-inline:contain;scroll-snap-type:x mandatory;scrollbar-width:thin;min-height:100px;padding:2px 1px 9px}
.character-image-strip button{scroll-snap-align:start;min-width:0;aspect-ratio:1;border:1px solid #d5e6db;border-radius:12px;background:#f6faf7;padding:3px;overflow:hidden;position:relative}
.character-image-strip button[aria-pressed="true"]{border:2px solid #087f64;box-shadow:0 0 0 2px #c6ebd7}
.character-image-strip img{width:100%;height:100%;object-fit:contain;border-radius:8px;background-color:#fff;background-image:linear-gradient(45deg,#e7eeea 25%,transparent 25%),linear-gradient(-45deg,#e7eeea 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#e7eeea 75%),linear-gradient(-45deg,transparent 75%,#e7eeea 75%);background-size:12px 12px}
.character-image-strip .image-caption{position:absolute;bottom:3px;left:3px;right:3px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-radius:6px;background:#ffffffea;color:#1b4738;font-size:10px;padding:3px}
.character-library #character-library-status{margin:5px 0;color:#678276;font-size:11px;line-height:1.4}
.character-heading-actions{display:flex;align-items:center;gap:10px}.character-heading-actions button[hidden],.character-rename-form[hidden]{display:none}
.character-rename-form{margin:8px 0 12px;padding:10px;border:1px solid #cde3d5;border-radius:9px;background:#f7fcf9}.character-rename-form label{display:block;margin-bottom:6px;color:#31584a;font-size:11px;font-weight:800}.character-rename-form>div{display:flex;gap:6px}.character-rename-form input{min-width:0;flex:1;min-height:36px;padding:6px 8px;border:1px solid #b9d6c6;border-radius:9px}.character-rename-form button{min-height:36px;padding:5px 9px;border:1px solid #bfdcca;border-radius:9px;background:#fff;color:#087f64;font-size:11px;font-weight:800}.character-rename-form button[type="submit"]{background:#087f64;color:#fff}.character-rename-form p{margin:6px 0 0;color:#9b4834;font-size:11px}.character-rename-form p:empty{display:none}
.character-image-strip .character-image-tile{position:relative;min-width:0;scroll-snap-align:start;aspect-ratio:1}.character-image-strip .character-image-tile>button[data-character-image]{width:100%;height:100%;aspect-ratio:auto}.character-image-strip .character-photo-delete{position:absolute;top:6px;right:6px;z-index:1;width:30px;height:30px;min-width:30px;aspect-ratio:auto;padding:0;border:1px solid #fff;border-radius:9px;background:#fff;color:#9b4039;font-size:14px;font-weight:900;box-shadow:0 2px 7px #24352b55}.character-image-strip .character-photo-delete:hover{background:#fff1ef}
.gallery-favorite[aria-pressed="true"]{background:#e9f7ed;color:#087f64;border-color:#87c9a5}
.gallery-album{width:100%;padding:0;border:1px solid #dce9df;border-radius:12px;background:#fff;color:#17382d;text-align:left;overflow:hidden;cursor:pointer}.gallery-album:hover,.gallery-album:focus-visible{border-color:#43aa79;box-shadow:0 4px 18px #147b4430}.gallery-album .gallery-card-image{aspect-ratio:1}.gallery-album .gallery-card-info{display:block}.gallery-album .gallery-card-info strong,.gallery-album .gallery-card-info small{display:block}.gallery-album .album-count{display:inline-block;margin-top:8px;padding:3px 8px;border-radius:99px;background:#e8f7ef;color:#087f64;font-size:11px;font-weight:800}.gallery-album-placeholder{font-size:46px;color:#88bca1}.gallery-dialog #gallery-back{margin:0 0 14px}
.gallery-dialog #gallery-back[hidden]{display:none}
.bottom-action-group{display:grid;gap:2px;padding:5px 0;border-top:1px solid #e5eee8}
.bottom-action-group:first-child{border-top:0}
.bottom-action-group[hidden],.saved-sheets-panel[hidden]{display:none}
.bottom-action-group>strong{padding:6px 12px 2px;color:#789085;font-size:10px;letter-spacing:.06em}
.bottom-more-panel button[hidden],.bottom-more-panel a[hidden]{display:none}
.sheet-preview-controls select{min-height:40px;padding:6px 10px;border:1px solid #cfe1d6;border-radius:7px;background:#fff;color:#315d4c;font-size:12px;font-weight:700}
.saved-sheets-panel h3{margin:0;color:#126b54;font-size:14px}
.sheet-view-tabs{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin:0 0 16px;padding:5px;border:1px solid #d5e8dd;border-radius:10px;background:#f4faf6}
.sheet-view-tabs button{min-height:44px;border:0;border-radius:8px;background:transparent;color:#587568;font-size:13px;font-weight:800;transition:background .2s,box-shadow .2s,color .2s,transform .2s}
.sheet-view-tabs button:hover{transform:translateY(-1px)}.sheet-view-tabs button[aria-selected="true"]{background:#fff;color:#076e55;box-shadow:0 2px 10px #173e2518}
#stamps-view-panel[hidden],#sheets-view-panel[hidden]{display:none}
.saved-sheets-panel{min-height:250px}.saved-sheets-heading h2{margin:0 0 5px;font-size:19px;color:#173d32}.saved-sheets-heading p{margin:0 0 18px}
.saved-sheets-list{grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:14px}
.sheet-gallery-empty{grid-column:1/-1}
.saved-sheet-tile{position:relative;min-width:0;border:1px solid #d8e8df;border-radius:10px;background:#fff;overflow:hidden;box-shadow:0 3px 12px #163f2a0c}
.saved-sheets-list .saved-sheet-open{display:block;width:100%;padding:0;border:0;border-radius:0;background:#fff;color:#244437;text-align:left}
.saved-sheet-open img,.sheet-tile-placeholder{display:grid;place-items:center;width:100%;aspect-ratio:7/6;object-fit:contain;background-color:#fff;background-image:linear-gradient(45deg,#e3ebe6 25%,transparent 25%),linear-gradient(-45deg,#e3ebe6 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#e3ebe6 75%),linear-gradient(-45deg,transparent 75%,#e3ebe6 75%);background-size:20px 20px;background-position:0 0,0 10px,10px -10px,-10px 0;color:#70857a;font-weight:800}
.saved-sheet-caption{display:block;padding:10px 44px 10px 10px;min-height:69px}.saved-sheet-caption strong,.saved-sheet-caption small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.saved-sheet-caption strong{font-size:12px}.saved-sheet-caption small{margin-top:3px;color:#6b8275;font-size:10px}
.saved-sheets-list .saved-sheet-favorite{position:absolute;right:8px;bottom:10px;display:grid;place-items:center;width:38px;height:38px;min-width:38px;padding:0;border:1px solid #d6e7dc;border-radius:8px;background:#fff;color:#1a7a5a;font-size:24px;line-height:1;text-align:center}.saved-sheets-list .saved-sheet-favorite[aria-pressed="true"]{color:#dc9447;background:#fff9ed}
.sheet-gallery-dialog{width:min(1000px,calc(100vw - 24px));max-width:none;max-height:92dvh;padding:0;border:1px solid #d6e8dc;border-radius:12px;background:#fff;box-shadow:0 24px 72px #102e2a55;overflow:auto}.sheet-gallery-dialog::backdrop{background:#0a2926b8;backdrop-filter:blur(4px)}
.sheet-gallery-shell{position:relative;padding:20px}.sheet-gallery-shell .dialog-close{right:17px;top:17px;width:40px;height:40px}.sheet-gallery-shell h2{margin:0 50px 4px 0;font-size:20px}.sheet-gallery-shell p{margin:0 0 14px;color:#657d71;font-size:12px}.sheet-gallery-image{display:grid;place-items:center;min-height:130px;max-height:calc(92dvh - 175px);overflow:auto;border:1px solid #dbe9df;border-radius:9px;background-color:#fff;background-image:linear-gradient(45deg,#e5ece9 25%,transparent 25%),linear-gradient(-45deg,#e5ece9 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#e5ece9 75%),linear-gradient(-45deg,transparent 75%,#e5ece9 75%);background-size:24px 24px;background-position:0 0,0 12px,12px -12px,-12px 0}.sheet-gallery-image img{display:block;max-width:100%;max-height:calc(92dvh - 180px);object-fit:contain}.sheet-gallery-actions{display:flex;gap:9px;flex-wrap:wrap;margin-top:14px}.sheet-gallery-actions button{min-height:44px;padding:9px 13px;border:1px solid #bddaca;border-radius:8px;background:#f6fbf8;color:#096f55;font-weight:800}
.sheet-gallery-image #sheet-gallery-loading{margin:0;padding:22px;color:#466c5a;font-size:13px;font-weight:700}.sheet-gallery-image #sheet-gallery-loading[hidden]{display:none}.sheet-gallery-image img:not([src]){display:none}
@media(max-width:600px){.saved-sheets-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.saved-sheets-panel{padding:12px}.sheet-gallery-shell{padding:14px}.sheet-gallery-actions button{flex:1}.sheet-view-tabs button{font-size:12px}}
.sticker-card[role="button"]{cursor:pointer;outline-offset:3px;transition:border-color .15s,box-shadow .15s}
.sticker-card[role="button"]:hover{border-color:#82c9a5}
.sticker-card[role="button"]:focus-visible{outline:3px solid #95d8c5}
.sticker-card.is-selected{border:2px solid #087f64;box-shadow:0 0 0 3px #bde8d3}
.card-select-hint{display:block;margin-top:8px;color:#087f64;font-size:11px;font-weight:800}

/* Keep the workspace focused on the form and sticker cards. */
.brand-title{font:inherit;line-height:1;margin:0}
.topbar .brand{color:inherit;text-decoration:none}
.topbar .brand:hover .brand-title{text-decoration:underline;text-underline-offset:3px}
.topbar .brand:focus-visible{outline:3px solid #95d8c5;outline-offset:4px;border-radius:8px}
.topbar .status-pill{font-size:0;gap:0}
.topbar .status-pill:before{width:9px;height:9px}
.topbar .member-summary{display:block;padding:5px 9px;border:1px solid #d6e8dd;border-radius:999px;background:#f3faf6}
.topbar .member-summary strong{font-size:11px;line-height:1;white-space:nowrap;overflow-wrap:normal}
.workspace{padding-top:18px}
.sidebar>.control-section:first-child{border-top:0}
@media(max-width:700px){.workspace{padding-top:12px}.topbar .member-summary{padding:5px 7px}.topbar .member-summary strong{font-size:10px}}

/* Focused workspace: one setting panel, a compact pre-generation map, and image-first results. */
:root{--studio-ink:#15322d;--studio-green:#087f64;--studio-mist:#f4faf7;--studio-line:#d9e8df;--studio-coral:#fa8e78;--studio-gold:#efbb55}
body{background:radial-gradient(circle at 78% 5%,#eaf7f0 0,transparent 30%),#f7faf8;color:var(--studio-ink)}
.topbar{box-shadow:0 2px 14px #1c604b08}
.brand-mark{background:linear-gradient(145deg,#0e9778,#086a5c);box-shadow:0 3px 9px #087f642a}
.workspace{gap:0}
.sidebar{border-color:var(--studio-line);box-shadow:0 14px 40px #153e2b0b}
.setting-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;padding:8px;background:#f0f7f2;border-bottom:1px solid var(--studio-line)}
.setting-tabs button{min-width:0;min-height:47px;border:0;border-radius:10px;background:transparent;color:#54766a;font-size:12px;font-weight:800;white-space:nowrap}
.setting-tabs button span{margin-right:5px;color:#84bfa7;font-size:15px}
.setting-tabs button[aria-selected="true"]{background:#fff;color:#075f50;box-shadow:0 2px 10px #16463314}
.setting-tabs button[aria-selected="true"] span{color:#df886d}
.setting-tabs button:focus-visible,.mobile-workspace-tabs button:focus-visible{outline:3px solid #95d8c5;outline-offset:-2px}
.selected-setting-summary{padding:9px 18px;border-bottom:1px solid var(--studio-line);background:#edf8f1;color:#16644d;font-size:12px;font-weight:800;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.selected-setting-summary[hidden]{display:none}
.control-section{position:relative;padding:22px 20px 26px;border-top:0}
.control-section[hidden]{display:none}
.section-label{margin-bottom:18px}.section-label h2{font-size:17px}.step-num{display:none}
.section-art{position:absolute;top:9px;right:13px;width:72px;height:72px;object-fit:contain;pointer-events:none;filter:drop-shadow(0 4px 7px #12392a19)}
.message-art{width:58px;height:58px;right:20px;top:12px}
.control-section label:not(.upload-zone){font-size:12px;margin-bottom:8px;color:#45685d}
.control-section textarea,.control-section select{border-color:#cddfd5;border-radius:11px;font-size:14px;transition:border-color .2s,box-shadow .2s}
.control-section textarea:focus,.control-section select:focus{border-color:#70bfa0;box-shadow:0 0 0 3px #d6f1e1;outline:0}
.control-section textarea{min-height:68px;max-height:180px}
.control-section #subject:not(:focus):placeholder-shown{min-height:68px}
.control-section #subject:focus{min-height:108px}
.prompt-assist-button{margin:12px 0 4px;white-space:normal;text-align:center}.prompt-assist-result{margin:14px 0;padding:14px;border:1px solid #c9e2d4;border-radius:13px;background:#f7fcf9}.prompt-assist-result>label{font-weight:800}.prompt-assist-result textarea{max-height:none;min-height:62px}.prompt-assist-list-heading{display:flex;justify-content:space-between;gap:8px;align-items:baseline;margin:16px 0 8px;font-size:12px;color:#315b4d}.prompt-assist-list-heading small{font-size:11px;font-weight:400;color:#6c8778}.prompt-assist-list{display:grid;gap:10px;max-height:min(42vh,480px);overflow-y:auto;padding-right:3px}.control-section .prompt-assist-item{display:block;margin:0}.prompt-assist-item span{display:block;margin-bottom:5px;font-size:12px}.prompt-assist-item textarea{width:100%;min-height:54px;max-height:none;font-size:12px}.prompt-assist-item textarea:disabled{opacity:.5}.prompt-assist-result .text-button{margin-top:10px}
.upload-zone{min-height:68px;padding:10px 13px;margin:0 0 12px;border:1px dashed #9ccdb5;border-radius:10px;background:#f5fbf7;transition:background .18s,border-color .18s,transform .18s}
.upload-zone:hover{background:#eaf7ef;border-color:#087f64;transform:translateY(-1px)}
.upload-zone:active{transform:scale(.99)}
.upload-icon{width:39px;height:39px;border-radius:8px;font-size:24px}
.upload-copy{flex:1}.upload-copy strong{font-size:12px;color:#214739}.upload-copy small{font-size:10px;color:#698377}
.upload-arrow{font-size:24px;line-height:1;color:#438c6a}
.character-favorites,.saved-library{margin-top:16px;padding:0;border:1px solid var(--studio-line);border-radius:11px;background:#fcfefd}
.character-favorites[hidden],.saved-library[hidden]{display:none}
.character-favorites summary,.saved-library summary,.development-details summary{padding:12px 14px;cursor:pointer;color:#275f4b;font-size:12px;font-weight:800;list-style:none}
.character-favorites summary::-webkit-details-marker,.saved-library summary::-webkit-details-marker,.development-details summary::-webkit-details-marker{display:none}
.character-favorites summary:after,.saved-library summary:after,.development-details summary:after{content:'⌄';float:right;color:#6da88b}
.character-favorites[open] summary:after,.saved-library[open] summary:after,.development-details[open] summary:after{transform:rotate(180deg)}
.character-favorites summary span,.saved-library summary span{font-weight:600;color:#758d80;margin-left:5px}
.character-favorites-heading,.character-favorites #favorites-status,.favorites-list,.character-favorites #favorites-more,.saved-library .selection-heading,.saved-library .saved-messages,.saved-library .saved-pairs{margin-left:13px;margin-right:13px}
.character-favorites-heading{justify-content:flex-end;border-top:1px solid var(--studio-line);padding-top:8px}
.saved-library{padding-bottom:12px}.saved-library summary{border-bottom:1px solid transparent}.saved-library[open] summary{border-bottom-color:var(--studio-line)}
.drawer-help,.drawer-status{margin:12px 13px 8px;color:#688478;font-size:12px;line-height:1.5}.drawer-create{display:flex;gap:8px;margin:10px 13px}.drawer-create input,.drawer-phrase-input{min-width:0;flex:1;padding:9px 10px;border:1px solid #cfe4d8;border-radius:9px;font:inherit}.drawer-create button,.drawer-action{border:1px solid #087f64;border-radius:9px;background:#087f64;color:white;padding:8px 11px;font-size:12px;font-weight:800;cursor:pointer}.drawer-tabs{display:flex;gap:7px;overflow-x:auto;margin:12px 13px;padding-bottom:4px}.drawer-tab{flex:none;border:1px solid #cfe4d8;border-radius:999px;background:white;color:#245446;padding:8px 12px;font-size:12px;font-weight:700;cursor:pointer}.drawer-tab.active{background:#087f64;color:#fff}.drawer-content{margin:8px 13px}.drawer-heading{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-bottom:10px}.drawer-heading strong{margin-right:auto;font-size:13px}.drawer-text-button{border:0;background:transparent;color:#087f64;padding:7px;font-size:11px;font-weight:700;cursor:pointer}.drawer-actions{display:flex;gap:7px;flex-wrap:wrap;margin:9px 0}.drawer-phrases{display:flex;flex-wrap:wrap;gap:7px}.drawer-empty{font-size:12px;color:#758d80}.drawer-add-form{display:flex;gap:7px;margin:9px 0}.drawer-phrase{display:inline-flex;align-items:center;border:1px solid #cfe4d8;border-radius:999px;overflow:hidden}.drawer-phrase button:first-child{border:0;border-radius:0}.drawer-phrase .saved-remove{min-height:40px}
.drawer-candidate{display:inline-flex;align-items:center;border:1px solid #cfe4d8;border-radius:999px;overflow:hidden}.drawer-candidate .message-chip{border:0;border-radius:0}.candidate-save{border:0;border-left:1px solid #e4eee8;background:white;color:#087f64;min-width:34px;min-height:40px;font-size:20px;cursor:pointer}.candidate-save:hover,.drawer-text-button:hover{background:#eaf6ee}.saved-item .candidate-save{min-width:30px;font-size:18px}@media(max-width:700px){.candidate-save{min-height:44px}.drawer-create,.drawer-add-form{flex-wrap:wrap}.drawer-create input,.drawer-phrase-input{flex-basis:100%}}
.drawer-tab.active{background:#087f64;color:white;box-shadow:0 5px 15px #087f6440;animation:drawer-float 2.2s ease-in-out infinite}.drawer-tab.is-receiving{animation:drawer-pop .65s ease-out,drawer-float 2.2s ease-in-out .65s infinite}.saved-library.drag-over,.custom-message-drop.drag-over{background:#e4f8ed;outline:2px dashed #087f64;outline-offset:-3px}.drawer-tabs .drawer-tab{cursor:copy}.drawer-flight{position:fixed;z-index:60;max-width:210px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:8px 12px;border:1px solid #087f64;border-radius:999px;background:#087f64;color:white;font-size:12px;font-weight:800;box-shadow:0 10px 24px #087f6460;pointer-events:none}.custom-message-drop{padding:9px;border:1px dashed #bddbca;border-radius:10px;background:#fbfefd}.custom-message-drop textarea{width:100%;box-sizing:border-box}.custom-message-drop p{margin:5px 2px 8px;color:#6b8978;font-size:11px;line-height:1.5}.custom-message-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.custom-message-actions button,.custom-message-actions label{display:inline-flex;align-items:center;justify-content:center;min-height:35px;padding:7px 10px;border:1px solid #087f64;border-radius:8px;background:#087f64;color:white;font-size:11px;font-weight:800;cursor:pointer}.custom-message-actions label{background:white;color:#087f64}.message-section #message-drawers{margin:10px 0}.message-section #toggle-category-phrases{margin-top:10px}@keyframes drawer-float{0%,100%{transform:translateY(0)}50%{transform:translateY(-4px)}}@keyframes drawer-pop{0%{transform:scale(1)}45%{transform:scale(1.16)}100%{transform:scale(1)}}@media(prefers-reduced-motion:reduce){.drawer-tab.active,.drawer-tab.is-receiving{animation:none}.drawer-flight{display:none}}@media(max-width:390px){.setting-tabs button{font-size:11px;padding:4px 2px}}
.message-section #drawer-content:not(:empty){margin:8px 0 12px;padding:12px;border:1px solid #d9e8df;border-radius:10px;background:#fcfefd}.message-section #drawer-content .drawer-empty{margin:2px 0}.message-section #drawer-content:has(.drawer-empty):not(:has(.drawer-heading)){padding:8px 10px}.message-section #message-drawers .drawer-help{margin:9px 13px 4px}.message-section #message-drawers .drawer-create{margin-top:6px;margin-bottom:6px}.message-section #message-drawers .drawer-tabs{margin-top:8px;margin-bottom:4px}.message-section #message-drawers .drawer-status{margin-top:2px;margin-bottom:5px;font-size:10px}.message-section #drawer-content.drag-over{background:#e4f8ed;outline:2px dashed #087f64}
.development-details{margin-top:14px;padding:0;background:#f7fbf8}.development-details summary{padding:11px 12px}.development-details p{padding:0 12px}
.model-name{display:block;margin-top:8px;color:#748d81;font-size:11px;overflow-wrap:anywhere}
.message-section .custom-label{margin-top:8px}.message-section #ai-seed{min-height:66px}
.message-divider{display:flex;align-items:center;gap:10px;margin:18px 0;color:#7d9689;font-size:11px;font-weight:700;white-space:nowrap}.message-divider:before,.message-divider:after{content:'';height:1px;background:#deebe2;flex:1}
.category-tabs{scrollbar-width:auto;scrollbar-color:#96c7aa #e7f2ea;padding-bottom:12px;mask-image:linear-gradient(to right,#000 91%,transparent 100%)}
.category-scroll{position:relative}.category-scroll:after{content:'›';position:absolute;right:0;top:3px;width:24px;height:35px;display:grid;place-items:center;color:#087f64;font-size:24px;font-weight:700;background:linear-gradient(90deg,#ffffff00,#fff 40%);pointer-events:none}
.category-tabs::-webkit-scrollbar{height:5px}.category-tabs::-webkit-scrollbar-thumb{background:#96c7aa;border-radius:5px}
.category-chip.active,.message-chip.active{background:var(--studio-green)}
.progress-row[hidden]{display:none}.progress-row{padding:11px 15px;margin-bottom:14px;border-color:#b4d9c5;background:#edf9f1}
.notice{margin-bottom:14px}
.notice{position:fixed;top:86px;left:50%;z-index:20;width:min(560px,calc(100vw - 28px));margin:0;transform:translateX(-50%);box-shadow:0 12px 30px #153b291e;font-weight:700}
.notice[hidden]{display:none}
.sticker-grid{gap:11px}
.sticker-card{border-color:#dce9e1;box-shadow:0 5px 18px #14392a09;transition:transform .2s,border-color .2s,box-shadow .2s}
.sticker-card:hover{transform:translateY(-2px);box-shadow:0 10px 22px #14392a12}
.sticker-card.is-selected{border:2px solid #087f64;box-shadow:0 0 0 3px #bde8d3,0 10px 22px #14392a15}
.sticker-grid.is-outline{grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}
.sticker-grid.is-outline .sticker-card{min-width:0;min-height:96px;background:linear-gradient(135deg,#fff 72%,#f1faf4)}
.sticker-grid.is-outline .card-top{padding:10px 11px 3px}.sticker-grid.is-outline .card-state{display:none}
.sticker-grid.is-outline .card-body{padding:2px 11px 12px}.sticker-grid.is-outline .card-phrase{font-size:13px;line-height:1.35;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.sticker-grid.is-outline .card-expression{font-size:10px;min-height:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sticker-card.is-empty .card-body{padding:8px 12px 13px}.sticker-card.is-empty .card-expression{min-height:0}
.sticker-card.is-empty:not(.is-selected) .card-state{background:#f1f6f2;color:#789084}
.sticker-card.is-selected .card-state{background:#087f64;color:#fff}
.card-phrase{font-size:13px;line-height:1.4}.card-expression{font-size:11px;min-height:0}
.sticker-card.has-image .card-body{padding:10px 12px 13px}
.card-image{background-size:18px 18px;background-position:0 0,0 9px,9px -9px,-9px 0}
.card-select-hint{display:none}
.bottom-menu{backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);background:#ffffffed}
.bottom-menu #bottom-menu-status[hidden]{display:none}
.bottom-menu-actions{width:min(100%,780px)}
.bottom-menu-actions>button{border-radius:11px;min-height:48px}
.bottom-menu-actions .is-unavailable{color:#769c8b;background:#f8fbf9;border-color:#e1ece5}
.bottom-more.has-selected{position:relative;border-color:#6dbb96;background:#edf8f1}
.bottom-menu-actions>button:not(.bottom-more){display:flex;align-items:center;justify-content:center;gap:8px}
.bottom-menu-actions #generate-sticky span{margin-left:0}
.bottom-menu-actions>button svg{width:18px;height:18px;flex:none}
.bottom-menu-actions>button#export-bottom svg{width:17px;height:17px}
.bottom-more.has-selected:after{content:'';position:absolute;right:7px;top:7px;width:6px;height:6px;border-radius:50%;background:#e89366}
.bottom-more-panel{z-index:12}
.sticker-preview-dialog{width:min(540px,calc(100vw - 28px));max-width:none;max-height:90dvh;padding:0;border:1px solid #d4e8dc;border-radius:20px;background:#fff;box-shadow:0 30px 80px #082b2552;overflow:auto}
.sticker-preview-dialog::backdrop{background:#0a2926b8;backdrop-filter:blur(5px)}
.sticker-preview-shell{position:relative;padding:22px}.sticker-preview-shell .dialog-close{top:18px;right:18px;min-width:38px;min-height:38px}
.sticker-preview-canvas{aspect-ratio:370/320;display:grid;place-items:center;margin:16px 0;border:1px solid #e0ebe5;border-radius:13px;background-color:#fff;background-image:linear-gradient(45deg,#e5ece9 25%,transparent 25%),linear-gradient(-45deg,#e5ece9 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#e5ece9 75%),linear-gradient(-45deg,transparent 75%,#e5ece9 75%);background-size:24px 24px;background-position:0 0,0 12px,12px -12px,-12px 0;overflow:hidden}
.sticker-preview-canvas img{width:100%;height:100%;object-fit:contain}.sticker-preview-shell h2{margin:0 0 5px;font-size:20px}.sticker-preview-shell p{margin:0;color:#607b6e;font-size:13px;line-height:1.5}
.mobile-workspace-tabs{display:none}
@media(min-width:900px){.workspace{padding-top:14px;padding-bottom:42px}.editor{padding-top:0}.sidebar{max-height:100%;scrollbar-width:thin}.sidebar .control-section{min-height:0}}
@media(max-width:899px){
  .mobile-workspace-tabs{position:sticky;top:74px;z-index:9;display:grid;grid-template-columns:1fr 1fr;height:51px;padding:5px 14px;background:#fff;border-bottom:1px solid var(--studio-line)}
  .mobile-workspace-tabs button{border:0;border-radius:9px;background:transparent;color:#668679;font-size:13px;font-weight:800}
  .mobile-workspace-tabs button[aria-current="page"]{background:#e5f6ec;color:#086c53}
  body[data-workspace-view="settings"] .editor,body[data-workspace-view="preview"] .sidebar{display:none}
  .workspace{padding:15px 14px calc(var(--bottom-menu-height) + 20px)}
  .sidebar{margin:0}
  .editor{padding:0}
  .sticker-grid.is-outline{grid-template-columns:repeat(2,minmax(0,1fr))}
  .sticker-grid:not(.is-outline){grid-template-columns:repeat(2,minmax(0,1fr))}
  .selection-tray{top:113px;height:54px}
  body.has-selection-tray .workspace{height:auto}
  body.is-typing .bottom-menu{display:none}
}
@media(max-width:700px){
  :root{--bottom-menu-height:calc(115px + env(safe-area-inset-bottom))}
  .topbar{height:62px}
  .notice{top:122px}
  .mobile-workspace-tabs{top:62px}
  .workspace{padding-top:12px}
  .setting-tabs{padding:7px}.setting-tabs button{min-height:45px;font-size:13px}
  .control-section{padding:22px 18px 26px}
  .section-art{width:66px;height:66px}
  .bottom-menu{padding:7px 12px calc(8px + env(safe-area-inset-bottom))}
  .bottom-menu-actions{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 48px;gap:6px}
  .bottom-menu-actions #generate-sticky{grid-column:1/-1;min-height:46px;font-size:13px}
  .bottom-menu-actions>button:not(#generate-sticky){min-height:44px;font-size:12px}
  .bottom-menu-actions .bottom-more{min-width:48px;font-size:18px}
  .bottom-menu #bottom-menu-status{display:none}
  .sticker-grid.is-outline .sticker-card{min-height:90px}
  .sticker-grid.is-outline .card-phrase{font-size:13px}
  .sticker-grid.is-outline .card-expression{font-size:11px;color:#647f71}
  .sticker-grid:not(.is-outline) .card-phrase{font-size:12px}
  .sticker-grid:not(.is-outline) .card-expression{display:none}
  .sticker-grid:not(.is-outline) .sticker-card.is-selected .card-expression{display:block}
}

/* The top-right gear opens a dedicated settings page on both screen sizes. */
.settings-trigger{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;padding:7px 12px;border:1px solid #b9d9c8;border-radius:11px;background:#edf8f1;color:#086c53;font-size:13px;font-weight:800;white-space:nowrap}
.settings-trigger:hover,.settings-trigger[aria-expanded="true"]{background:#d8f0e2;border-color:#80bfa0}
.settings-trigger svg{width:21px;height:21px;flex:none}
.settings-trigger small{font-size:11px;font-weight:800;line-height:1.2}
.settings-trigger.needs-login{background:#fff0f0;border-color:#d35a65;color:#ac2637;box-shadow:0 0 0 2px #ffe0e2}
.settings-trigger.needs-login:hover{background:#ffe3e6}
.settings-trigger.is-connected{background:#e8f7ee;border-color:#85c9a5;color:#087f64}
.account-status-card{margin:0 0 18px}
.account-status-card p{margin:7px 0;color:#45695b;line-height:1.55}
.account-status-card button{margin:7px 8px 0 0;min-height:42px}
.account-status-card button[hidden]{display:none}
.login-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:16px 0 9px}
.login-actions button{min-height:44px}
.login-transfer{display:flex!important;align-items:flex-start;gap:9px;margin-top:13px;font-size:14px;line-height:1.5}
.login-transfer input{width:18px!important;height:18px!important;min-height:18px!important;margin:2px 0 0;flex:none}
#login-form .text-button{margin-right:14px}
@media(max-width:480px){.login-actions{grid-template-columns:1fr}.settings-trigger small{font-size:10px}}
.app-settings-page{max-width:900px;margin:0 auto;padding:35px clamp(16px,4vw,40px) 70px}
.app-settings-page[hidden]{display:none}
.app-settings-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:22px}
.app-settings-head h1{font-size:32px;line-height:1.2;margin:7px 0 8px}
.app-settings-head p{color:#60786b;font-size:14px;line-height:1.6;margin:0}
.settings-summary{padding:13px 17px;margin:0 0 17px;border:1px solid #bde4cd;border-radius:12px;background:#eaf8ee;color:#086a50;font-size:15px;font-weight:800}
.settings-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-bottom:16px}
.settings-card{padding:22px;border:1px solid #d9e8df;border-radius:15px;background:#fff;box-shadow:0 7px 24px #153e2b08}
.settings-card h2{font-size:19px;margin:0 0 8px}
.settings-card p{font-size:13px;color:#617a6d;line-height:1.6;margin:0 0 15px}
.settings-choices{display:grid;gap:7px}
.settings-choices-count{grid-template-columns:repeat(5,minmax(0,1fr))}
.settings-choices-model{grid-template-columns:repeat(2,minmax(0,1fr))}
.settings-choices button{min-width:0;min-height:48px;padding:8px 4px;border:1px solid #b9d7c5;border-radius:9px;background:#fff;color:#245447;font-size:15px;font-weight:800;white-space:nowrap;box-shadow:0 2px 5px #153e2b08;transition:background .22s ease,border-color .22s ease,color .22s ease,box-shadow .22s ease,transform .22s cubic-bezier(.2,.8,.2,1)}
.settings-choices button:hover:not(:disabled){border-color:#67b294;background:#eef9f2;transform:translateY(-2px);box-shadow:0 5px 12px #087f641c}
.settings-choices button:active:not(:disabled){transform:scale(.94)}
.settings-choices button[aria-pressed="true"]{border-color:#087f64;background:#087f64;color:#fff;box-shadow:0 5px 13px #087f6430}
.settings-choices button[aria-pressed="true"]:hover:not(:disabled){background:#086e58}
.settings-choices button.is-pressing{animation:settings-choice-press .34s cubic-bezier(.2,.8,.2,1)}
.settings-card select[hidden]{display:none}
@keyframes settings-choice-press{0%{transform:scale(.94)}55%{transform:scale(1.055)}100%{transform:scale(1)}}
@media(prefers-reduced-motion:reduce){.settings-choices button{transition:background .1s,border-color .1s,color .1s}.settings-choices button.is-pressing{animation:settings-choice-press .16s ease-out}}
.settings-card .model-name[hidden]{display:none}
.settings-specs p{margin:9px 0 0}
body[data-app-page="settings"] .workspace,body[data-app-page="settings"] .mobile-workspace-tabs,body[data-app-page="settings"] .selection-tray,body[data-app-page="settings"] .bottom-menu,body[data-app-page="settings"] #notice,body[data-app-page="settings"] #line-job-banner{display:none}
/* Desktop workspace locks the document and scrolls its two panes independently.
   The settings page sits outside those panes, so restore document scrolling here. */
body[data-app-page="settings"]{overflow-y:auto;min-height:100dvh}

.admin-line-card form{display:grid;gap:10px;margin:18px 0}.admin-line-card input{width:100%;min-height:44px;padding:10px 12px;border:1px solid #bfd8cb;border-radius:10px;font:inherit}.admin-line-card button{justify-self:start}.admin-line-requests-list{display:grid;gap:18px;margin-top:18px}.admin-line-request{border:1px solid #d4e8dc;border-radius:16px;padding:18px;background:#fafffc;display:grid;gap:10px;min-width:0}.admin-line-request h3,.admin-line-request p,.admin-line-request h4{margin:0}.admin-line-request a,.admin-line-request button{justify-self:start}.admin-line-request pre{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.7;font:inherit;background:#f2f7f4;border-radius:10px;padding:12px;max-height:360px;overflow:auto}.admin-line-previews{display:grid;grid-template-columns:repeat(auto-fill,minmax(90px,1fr));gap:8px}.admin-line-previews img{width:100%;aspect-ratio:370/320;object-fit:contain;background:#edf4f1;border:1px solid #d4e8dc;border-radius:10px}
@media(max-width:700px){.settings-trigger{padding:7px 9px;font-size:12px}.app-settings-page{padding-top:22px}.app-settings-head{display:block}.app-settings-head h1{font-size:27px}.app-settings-head .secondary-button{margin-top:15px}.settings-cards{grid-template-columns:1fr;gap:12px}.settings-card{padding:19px}}
@media(max-width:370px){.sticker-grid.is-outline,.sticker-grid:not(.is-outline){grid-template-columns:repeat(2,minmax(0,1fr))}.sticker-grid.is-outline .card-expression{display:none}}

.submission-result[hidden],.submission-result [hidden]{display:none}.submission-dialog.is-job-view .submission-dialog-content>:not(.dialog-close):not(.eyebrow):not(#submission-heading):not(#submission-result){display:none}.submission-result{padding:23px 16px 8px;text-align:center}.submission-result-mark{display:grid;place-items:center;width:56px;height:56px;margin:0 auto 15px;border-radius:50%;background:#e1f5e9;color:#087f64;font-size:28px;font-weight:800}.submission-dialog.is-processing .submission-result-mark{background:#eaf2f0;font-size:26px}.submission-dialog.is-stopped .submission-result-mark{background:#fff0e8;color:#b24622}.submission-result h3{margin:0 0 10px;color:#154f3d;font-size:20px}.submission-result p{margin:8px 0;color:#496b5c;line-height:1.55}.submission-result-item{font-size:17px;font-weight:800;color:#087f64!important}.submission-result .secondary-button{margin-top:10px}.submission-title-retry{margin:20px 0;padding:16px;border:1px solid #cde2d2;border-radius:10px;background:#f7fbf8;text-align:left}.submission-title-retry label{display:block;margin:8px 0 5px;font-weight:700}.submission-title-retry input{width:100%;box-sizing:border-box}.submission-title-retry .primary-button{margin-top:16px}.submission-title-retry #retry-title-feedback{min-height:1.5em;color:#a23b20}
.submission-result #submission-owner-review{display:flex;margin:20px 0 9px;text-decoration:none}
.submission-result #submission-owner-review[hidden]{display:none}
.submission-dialog.is-processing .submission-result-mark{position:relative}
.submission-dialog.is-processing .submission-result-mark::before{content:'';position:absolute;inset:-4px;border:4px solid #bee7d8;border-top-color:#087f64;border-radius:50%;animation:submission-working 1s linear infinite}
@keyframes submission-working{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.submission-dialog.is-processing .submission-result-mark::before{animation:none}}
.line-job-banner[hidden]{display:none}.line-job-banner{position:fixed;z-index:15;left:50%;bottom:calc(var(--bottom-menu-height) + 12px);width:min(680px,calc(100vw - 24px));transform:translateX(-50%);display:flex;align-items:center;gap:13px;padding:14px 42px 14px 16px;border:2px solid #99ccb2;border-radius:15px;background:#f2fbf5;box-shadow:0 16px 42px #102f2540;color:#174d3b}.line-job-banner.is-stopped{border-color:#e99975;background:#fff5ef;color:#8b351d}.line-job-banner.is-submitted{border-color:#71c7a2;background:#e9f8ef}.line-job-banner-copy{flex:1;min-width:0}.line-job-banner-copy strong{display:block;font-size:15px}.line-job-banner-copy p{margin:4px 0 0;font-size:12px;line-height:1.4;overflow-wrap:anywhere}.line-job-banner .secondary-button{flex:none;min-height:38px}.line-job-banner-dismiss{position:absolute;right:8px;top:7px;border:0;background:transparent;color:inherit;font-size:24px;line-height:1;padding:3px 7px}@media(max-width:700px){.line-job-banner{bottom:calc(var(--bottom-menu-height) + 8px);align-items:stretch;flex-direction:column;gap:9px;padding:12px 38px 12px 13px}.line-job-banner-copy strong{font-size:14px}.line-job-banner .secondary-button{width:100%}}

/* Step 03: words and pose planning */
.word-chat{margin:8px 0 15px;padding:15px;border:1px solid #b9decd;border-radius:15px;background:#f5fbf7;color:#244c40}
.word-chat-heading h3{margin:0 0 4px;font-size:16px}.word-chat-heading p,.word-chat-candidates>p{margin:0 0 11px;color:#607c70;font-size:12px;line-height:1.5}
.word-chat-log{display:flex;flex-direction:column;gap:8px;max-height:220px;overflow-y:auto;padding:10px;border:1px solid #d6e9de;border-radius:11px;background:#fff}
.word-chat-line{max-width:91%;margin:0;padding:9px 11px;border-radius:12px;font-size:13px;line-height:1.55;white-space:pre-wrap;overflow-wrap:anywhere}
.word-chat-line.assistant{align-self:flex-start;background:#eaf6ed}.word-chat-line.user{align-self:flex-end;background:#087f64;color:#fff}
.word-chat-options,.word-chat-examples{display:flex;flex-wrap:wrap;gap:7px;margin-top:10px}.word-chat-options:empty{display:none}
.word-chat-options button,.word-chat-examples button{min-height:38px;padding:7px 10px;border:1px solid #a9d3bc;border-radius:999px;background:#fff;color:#17664d;font-size:12px;font-weight:700;cursor:pointer;text-align:left}
.word-chat-options button:hover,.word-chat-examples button:hover{background:#e2f4e8}
.word-chat-form{display:flex;gap:7px;margin-top:10px}.word-chat-form input{min-width:0;flex:1;padding:9px 11px;border:1px solid #bddbca;border-radius:9px;font:inherit;font-size:13px}.word-chat-form button,.word-chat-primary{min-height:38px;padding:8px 12px;border:1px solid #087f64;border-radius:9px;background:#087f64;color:#fff;font-size:12px;font-weight:800;cursor:pointer}.word-chat-primary:disabled,.word-chat-form button:disabled{opacity:.5;cursor:not-allowed}
.word-chat-status{margin:7px 2px 0;color:#607c70;font-size:11px;min-height:1em}
.word-chat-candidates,.word-chat-save{margin-top:12px;padding:12px;border:1px solid #cee5d6;border-radius:11px;background:#fff}.word-chat-candidates[hidden],.word-chat-save[hidden]{display:none}
.word-chat-candidates-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:5px;font-size:13px}.word-chat-candidates-head span{color:#087f64;font-weight:800}
.word-chat-candidate-list{display:grid;gap:9px;max-height:420px;overflow-y:auto;margin:10px 0;padding-right:3px}.word-chat-item{padding:10px;border:1px solid #d7e8dd;border-radius:10px;background:#fbfefd}.word-chat-item.is-removed{opacity:.55}
.word-chat-item-head{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:12px}.word-chat-item-head button{border:0;background:transparent;color:#087f64;font-size:11px;font-weight:800;cursor:pointer}
.word-chat-pose-options{display:flex;flex-wrap:wrap;gap:5px;margin-top:8px}.word-chat-pose-options button{padding:6px 8px;border:1px solid #cfe4d8;border-radius:8px;background:#fff;color:#355b4c;font-size:11px;line-height:1.4;text-align:left;cursor:pointer}.word-chat-pose-options button[aria-pressed="true"]{border-color:#087f64;background:#e3f5e9;color:#075f4d}
.word-chat-item input{width:100%;box-sizing:border-box;margin-top:8px;padding:7px 9px;border:1px solid #d4e5d9;border-radius:8px;font:inherit;font-size:11px}
.word-chat-save strong{display:block;margin-bottom:9px;font-size:13px}.word-chat-save input{width:100%;box-sizing:border-box;padding:8px 10px;border:1px solid #bddbca;border-radius:8px;font:inherit}.word-chat-save>div{display:flex;flex-wrap:wrap;gap:8px;margin-top:9px}.word-chat-save>div button:not(.word-chat-primary){border:1px solid #bddbca;border-radius:9px;background:white;color:#17664d;padding:8px 12px;font-size:12px;cursor:pointer}
.manual-words{margin-top:13px;border:1px solid #d5e8dd;border-radius:12px;background:#fff;padding:0 12px 12px}.manual-words>summary{padding:12px 0;color:#245446;font-weight:800;cursor:pointer}.manual-words #compose-direct{margin-top:8px}.word-field-help{margin:5px 0 7px;color:#70877a;font-size:11px}
.word-link-button{border:0;background:transparent;color:#087f64;padding:5px 0 10px;font-size:12px;font-weight:800;cursor:pointer}.word-link-button[hidden]{display:none}
.word-set-preview{margin:10px 0;border:1px solid #d5e8dd;border-radius:9px;padding:9px}.word-set-preview summary{cursor:pointer;color:#275f4b;font-size:12px;font-weight:800}.word-set-preview summary span{color:#789085;font-weight:600}.word-set-preview #word-set-items{display:flex;flex-wrap:wrap;gap:5px;margin-top:10px}.word-set-preview #word-set-items>span{padding:5px 7px;border-radius:7px;background:#f2f8f3;font-size:11px}.word-set-preview #word-set-items small{color:#7a9284}
.word-set-heading{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:9px}
.word-set-heading strong{font-size:13px;color:#275f4b}
.word-set-heading strong span{color:#789085;font-weight:600}
.word-set-actions{display:flex;flex-wrap:wrap;gap:6px}
.word-set-actions button,.word-set-preview #word-set-items button{min-height:38px;padding:7px 10px;border:1px solid #b9d8c9;border-radius:8px;background:#fff;color:#17664d;font-size:12px;font-weight:800}
.word-set-actions #word-set-ai{border-color:#c7b7e5;background:#f7f2ff;color:#62429c}
.word-set-preview #word-set-details{margin-top:8px}
.word-set-preview #word-set-items button{min-height:34px;background:#edf8f1}
.word-set-preview #word-set-items button span{margin-left:4px;font-size:16px}
@media(max-width:700px){.word-set-actions{width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.word-set-actions #word-set-ai{grid-column:1/-1}.word-set-actions button{white-space:normal}}
.drawer-tab-group{display:inline-flex;flex:none;align-items:stretch;border:1px solid #cfe4d8;border-radius:999px;overflow:hidden}.drawer-tab-group .drawer-tab{border:0;border-radius:0}.drawer-use{border:0;border-left:1px solid #cfe4d8;background:#fff;color:#087f64;padding:6px 9px;font-size:11px;font-weight:800;cursor:pointer}.drawer-use:hover{background:#eaf6ee}
.custom-message-preview{color:#275f4b!important;font-weight:700}.custom-message-destinations{display:flex;flex-wrap:wrap;gap:8px 12px;margin:7px 0 9px}.custom-message-destinations label{display:inline-flex;align-items:center;gap:4px;margin:0!important;color:#3b5e50;font-size:11px;font-weight:600}.custom-message-destinations input{width:auto;margin:0}
.saved-message-search{display:block;width:calc(100% - 26px);box-sizing:border-box;margin:9px 13px;padding:8px 10px;border:1px solid #cfe4d8;border-radius:8px;font:inherit;font-size:12px}
@media(max-width:700px){.word-chat{padding:11px}.word-chat-form{flex-wrap:wrap}.word-chat-form input{flex-basis:100%}.word-chat-form button{width:100%}.word-chat-line{max-width:94%}}
.drawer-picker{width:min(500px,calc(100vw - 28px));border:0;border-radius:14px;padding:0;box-shadow:0 18px 60px #193e3350}.drawer-picker-shell{position:relative;padding:20px}.drawer-picker-shell h2{margin:0 35px 5px 0;font-size:18px}.drawer-picker-shell p{font-size:12px;color:#6b8978}.drawer-picker-shell>input{box-sizing:border-box;width:100%;padding:9px;border:1px solid #cfe4d8;border-radius:8px;font:inherit}.drawer-picker-list{display:grid;gap:5px;max-height:45vh;overflow-y:auto;margin:12px 0}.drawer-picker-list label{display:flex;align-items:center;gap:8px;padding:7px;border:1px solid #e0eee5;border-radius:8px;font-size:12px;cursor:pointer}.drawer-picker-list label:has(input:checked){background:#eaf6ee;border-color:#87caa5}.drawer-picker-list input{accent-color:#087f64}

.word-chat-saved-drawers{display:flex;flex-wrap:wrap;align-items:center;gap:7px;margin-top:11px}.word-chat-saved-drawers:empty{display:none}.word-chat-saved-drawers strong{flex-basis:100%;font-size:12px}.word-chat-saved-drawers button,.word-chat-refresh-actions button{padding:8px 10px;border:1px solid #b7d9c5;border-radius:9px;background:#fff;color:#17664d;font-size:12px;font-weight:700;cursor:pointer}.word-chat-saved-drawers button:hover,.word-chat-refresh-actions button:hover{background:#e2f4e8}.word-chat-refresh-actions{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0}.word-chat-refresh-actions button:disabled,.word-chat-item-head button:disabled{opacity:.45;cursor:not-allowed}.word-chat-item.is-kept{border-color:#087f64;background:#f0fbf4}.word-chat-item-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}.word-chat-item-actions [aria-pressed="true"]{color:#a35d00}
.word-chat-auto-all{width:100%;margin-top:11px;font-size:13px;min-height:44px}.word-chat-preferences{margin-top:10px;border:1px solid #cfe4d8;border-radius:10px;background:#fff}.word-chat-preferences summary{padding:10px 12px;color:#225944;font-size:12px;font-weight:800;cursor:pointer}.word-chat-preferences summary span{color:#9b6030}.word-chat-preferences>p{margin:0 12px 9px;color:#607c70;font-size:11px;line-height:1.5}.word-chat-preferences #word-chat-preference-list{display:grid;gap:6px;max-height:270px;overflow-y:auto;padding:0 12px 12px}.word-chat-preferences #word-chat-preference-list>strong{margin-top:7px;font-size:11px}.word-chat-preferences #word-chat-preference-list>p{margin:0;color:#7a9085;font-size:11px}.word-preference-row{display:flex;align-items:center;gap:7px;padding:6px 0;border-bottom:1px solid #edf3ee;font-size:11px}.word-preference-row span{flex:1;overflow-wrap:anywhere}.word-preference-row small{color:#708679}.word-preference-row button{padding:5px 7px;border:1px solid #cfe4d8;border-radius:7px;background:white;color:#17664d;font-size:10px;cursor:pointer}
/* The words screen uses one visual language for each kind of action:
   violet = AI, blue = choices, green = apply/save, amber = manual work. */
#message-panel{min-width:0}
#message-panel .section-label{margin-bottom:12px}
#message-panel .message-art{margin-bottom:12px}
#message-panel :is(input:not([type=checkbox]),textarea,select){max-width:100%;font-size:16px}
#message-panel :is(input:not([type=checkbox]),textarea,select):focus{border-color:#6655b3;box-shadow:0 0 0 3px #ddd6ff;outline:none}
#message-panel :is(button,summary,input,textarea,select):focus-visible{outline:3px solid #6655b3;outline-offset:3px}

#message-panel .word-chat{min-width:0;max-width:100%;margin:0;padding:20px;border:2px solid #cfc4ee;border-radius:18px;background:#f7f5ff;color:#292744;box-shadow:0 5px 18px #38305c0c}
.word-method-label{display:inline-block;margin-bottom:7px;color:#513e97;font-size:12px;font-weight:900;letter-spacing:.025em}
#message-panel .word-chat-heading{margin-bottom:18px}
#message-panel .word-chat-heading h3{margin:0 0 5px;color:#242342;font-size:18px;line-height:1.35}
#message-panel .word-chat-heading p{margin:0;color:#565470;font-size:13px;line-height:1.6}
.word-chat-quickstart{min-width:0;padding:16px;border:1px solid #bcb0e6;border-radius:13px;background:#fff}
.word-chat-quickstart>strong{display:block;margin-bottom:10px;color:#362b75;font-size:14px}
#message-panel .word-chat-auto-all{display:block;width:100%;min-height:52px;margin:0;padding:10px 14px;border-color:#5845a6;border-radius:10px;background:#5845a6;color:#fff;font-size:15px;line-height:1.4;white-space:normal}
.word-chat-quickstart>p{margin:9px 0 0;color:#666781;font-size:12px;line-height:1.5}
.word-chat-conversation{min-width:0;margin-top:20px;padding-top:18px;border-top:2px solid #ded7f3}
.word-chat-conversation h4{margin:0 0 10px;color:#362b75;font-size:15px}
#message-panel .word-chat-log{min-width:0;gap:10px;padding:12px;border:1px solid #d4cee7;border-radius:12px;background:#fff}
#message-panel .word-chat-line{max-width:88%;padding:11px 13px;font-size:14px;line-height:1.6}
#message-panel .word-chat-line.assistant{background:#f0ecff;color:#302b59}
#message-panel .word-chat-line.user{background:#514196;color:#fff}
#message-panel .word-chat-options,#message-panel .word-chat-examples{min-width:0;gap:8px;margin-top:13px}
#message-panel .word-chat-options:not(:empty):before,#message-panel .word-chat-examples:not(:empty):before{flex-basis:100%;color:#5a5d77;font-size:12px;font-weight:800}
#message-panel .word-chat-options:not(:empty):before{content:'AIからの選択肢'}
#message-panel .word-chat-examples:not(:empty):before{content:'入力せずに試す例'}
#message-panel .word-chat-options button,#message-panel .word-chat-examples button{min-height:44px;max-width:100%;padding:9px 13px;border:1.5px solid #8eb5dd;border-radius:10px;background:#eef6ff;color:#174b77;font-size:13px;line-height:1.4;font-weight:800;white-space:normal;overflow-wrap:anywhere}
#message-panel .word-chat-options button:hover,#message-panel .word-chat-examples button:hover{background:#dfedff;border-color:#5b96cf}
#message-panel #word-chat-examples[hidden]{display:none}
#message-panel label.word-chat-input-label{display:block;margin:18px 0 8px;color:#373459;font-size:14px;font-weight:800}
#message-panel .word-chat-form{align-items:stretch;gap:9px;margin:0}
#message-panel .word-chat-form input{flex:1;min-width:0;min-height:48px;padding:11px 13px;border:2px solid #9ba1b3;border-radius:10px;background:#fff;color:#182238;font-size:16px}
#message-panel .word-chat-form input::placeholder{color:#687382;opacity:1}
#message-panel .word-chat-form button{flex:none;min-height:48px;padding:10px 15px;border:2px solid #5845a6;border-radius:10px;background:#fff;color:#473593;font-size:14px;font-weight:900;white-space:normal}
#message-panel .word-chat-form button:hover{background:#eeeaff}
#message-panel .word-chat-status{margin:13px 0 0;color:#3e4680;font-size:13px;line-height:1.5}
#message-panel .word-chat-status:empty{display:none}
#message-panel .word-chat-saved-drawers{gap:9px;margin-top:18px;padding-top:14px;border-top:1px solid #ddd7f0}
#message-panel .word-chat-saved-drawers strong{color:#42466c;font-size:13px}
#message-panel .word-chat-saved-drawers button{min-height:44px;border-color:#93baa3;background:#fff;color:#12644b;font-size:13px}
#message-panel .word-chat-preferences{margin-top:18px;border:1px solid #c9c7d8;border-radius:11px;background:#fff}
#message-panel .word-chat-preferences summary{min-height:48px;padding:13px 15px;color:#4b4f65;font-size:13px}
#message-panel .word-chat-preferences button{min-height:40px}

#message-panel .word-chat-candidates{margin-top:20px;padding:17px;border:2px solid #91b9dc;border-radius:13px;background:#f3f8ff}
#message-panel .word-chat-candidates-head{align-items:flex-start;flex-wrap:wrap;gap:5px;color:#153f65;font-size:15px}
#message-panel .word-chat-candidates>p{margin:10px 0 0;color:#4e6378;font-size:13px}
#message-panel .word-chat-candidate-list{gap:13px;margin:15px 0}
#message-panel .word-chat-item{min-width:0;padding:14px;border:1.5px solid #bfd4e9;border-radius:11px;background:#fff}
#message-panel .word-chat-item.is-kept{border-color:#148069;background:#f3fbf7}
#message-panel .word-chat-item-head{align-items:flex-start;gap:12px;font-size:14px;line-height:1.5}
#message-panel .word-chat-item-head strong{min-width:0;overflow-wrap:anywhere}
#message-panel .word-chat-item-actions{gap:6px}
#message-panel .word-chat-item-head button{min-height:40px;padding:8px 10px;border:1px solid #a9b9ca;border-radius:8px;background:#fff;color:#275078;font-size:12px;white-space:nowrap}
#message-panel .word-chat-item-head [data-word-keep][aria-pressed="true"]{border-color:#15816b;background:#e7f6ee;color:#086148}
#message-panel .word-chat-item-head [data-word-toggle]{border-color:#d6b7a7;color:#884b30}
#message-panel .word-chat-pose-options{gap:7px;margin-top:12px}
#message-panel .word-chat-pose-options button{min-height:44px;padding:9px 11px;border:1.5px solid #b7c8dd;border-radius:9px;color:#274b68;font-size:12px}
#message-panel .word-chat-pose-options button[aria-pressed="true"]{border-color:#2670ab;background:#e2f0ff;color:#14507e}
#message-panel .word-chat-item input{min-height:44px;margin-top:12px;padding:9px 11px;border:2px solid #9ba1b3;border-radius:9px;background:#fff;font-size:16px}
#message-panel .word-chat-refresh-actions{gap:9px;margin:15px 0}
#message-panel .word-chat-refresh-actions button{min-height:44px;border:1.5px solid #467eab;color:#205b89;font-size:13px}
#message-panel #word-chat-apply{width:100%;min-height:49px;border-color:#087f64;background:#087f64;font-size:14px;white-space:normal}
#message-panel .word-chat-save{margin-top:20px;padding:17px;border:2px solid #80b99d;border-radius:13px;background:#f4fbf6}
#message-panel .word-chat-save strong{margin-bottom:12px;color:#145f48;font-size:16px}
#message-panel .word-chat-save label{display:block;margin:0 0 7px;color:#2c5946;font-size:13px;font-weight:800}
#message-panel .word-chat-save input{min-height:47px;padding:10px 12px;border:2px solid #8fa59a;border-radius:9px;background:#fff;font-size:16px}
#message-panel .word-chat-save>div{gap:9px;margin-top:13px}
#message-panel .word-chat-save>div button{min-height:44px;padding:9px 13px;font-size:13px}
#message-panel #word-chat-save-folder{border-color:#087f64;background:#087f64}
#message-panel #word-chat-skip-save{border-color:#8b958f;background:#fff;color:#45534b}

#message-panel .manual-words{min-width:0;max-width:100%;margin-top:24px;padding:0 17px 18px;border:2px solid #ddb978;border-radius:15px;background:#fffaf0;box-shadow:0 4px 14px #7b54210b}
#message-panel .manual-words>summary{min-height:70px;padding:15px 2px;color:#573e1d;line-height:1.4}
#message-panel .manual-words>summary .word-method-label{display:block;margin:0 0 4px;color:#936118}
#message-panel .manual-words>summary strong{font-size:15px}
#message-panel .manual-words[open]>summary{margin-bottom:10px;border-bottom:1px solid #e8d6b3}
#message-panel .manual-words :is(input:not([type=checkbox]),textarea,select){border:2px solid #a99f8c;background:#fff}
#message-panel .manual-words .word-chat-primary{min-height:44px;border-color:#79571e;background:#79571e;font-size:13px}
#message-panel .manual-words .category-tabs{min-width:0;width:100%;max-width:100%;margin-right:0;mask-image:none}
#message-panel .manual-words .category-scroll{min-width:0;max-width:100%;overflow:hidden}
#message-panel .manual-words .category-chip{min-height:44px}
#message-panel .manual-words .category-chip.active{background:#236c9b;border-color:#236c9b;color:#fff}
#message-panel .manual-words .phrase-toggle,#message-panel .manual-words .saved-library summary{min-height:44px;font-size:13px}
#message-panel .manual-words .custom-message-actions button,#message-panel .manual-words .custom-message-actions label{min-height:44px;font-size:12px}
#message-panel .manual-words .saved-message-search{width:calc(100% - 26px);font-size:16px}

@media(max-width:899px){
  #message-panel{padding-left:16px;padding-right:16px}
  #message-panel .word-chat-heading h3{font-size:21px}
  #message-panel .word-chat{padding:16px}
  #message-panel .word-chat-form{flex-wrap:wrap}
  #message-panel .word-chat-form input{flex-basis:100%}
  #message-panel .word-chat-form button{width:100%}
  #message-panel .word-chat-log,#message-panel .word-chat-candidate-list{max-height:none;overflow:visible}
  #message-panel .word-chat-line{max-width:94%}
  #message-panel .word-chat-item-head{flex-direction:column}
  #message-panel .word-chat-item-actions{justify-content:flex-start;width:100%}
  #message-panel .word-chat-item-actions button{flex:1}
  .selection-tray-inner{width:100%;max-width:100%;overflow:hidden;display:grid;grid-template-columns:auto minmax(0,1fr)}
  .selection-tray .selected-messages{width:100%;min-width:0}
}
@media(max-width:380px){
  #message-panel .word-chat{padding:13px}
  #message-panel .word-chat-candidates,#message-panel .word-chat-save{padding:12px}
  #message-panel .word-chat-item{padding:10px}
  #message-panel .manual-words{padding-left:12px;padding-right:12px}
  .selection-tray-inner{gap:7px;padding-left:10px;padding-right:10px}
}

/* Each way of choosing words occupies its own swipeable page. */
.word-method-navigation{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:5px 10px;margin:0 0 10px}
.word-method-navigation label{grid-column:1/-1;margin:0;color:#586077;font-size:12px;font-weight:800}
#message-panel #word-method-select{width:100%;min-height:44px;margin:0;padding:8px 34px 8px 11px;border:1.5px solid #a8b1c1;border-radius:10px;background:#fff;color:#293247;font-size:14px;font-weight:800}
#word-method-position{padding-bottom:12px;color:#59647b;font-size:11px;font-weight:800;white-space:nowrap}
.word-method-progress{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px;margin:0 0 8px;--active-method-color:#6844a7}
.word-method-progress i{height:4px;border-radius:9px;background:#dfe4ea}
.word-method-progress i.is-active{background:var(--active-method-color)}
.word-method-swipe-hint{margin:0 0 6px;color:#667085;font-size:11px;line-height:1.5}
.word-method-set-bar{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 0 10px;flex-wrap:wrap}
.word-method-set-summary{margin:0;color:#475467;font-size:11px;font-weight:700}
.word-method-set-bar button{border:1px solid #a7d8bd;background:#f2faf5;color:#17664d;border-radius:9px;min-height:36px;padding:7px 11px;font:inherit;font-size:11px;font-weight:800;cursor:pointer}
.word-limit-dialog{max-height:min(85dvh,760px);overflow:auto}
.word-limit-shell{position:relative}
.word-limit-dialog #word-limit-description{font-size:13px;margin:0 0 14px}
.word-limit-items{display:grid;gap:8px}
.word-limit-item{display:flex;align-items:center;gap:10px;padding:9px 10px;border:1px solid #d2e8dc;border-radius:10px;background:#f8fcfa;min-width:0}
.word-limit-item span{color:#668075;font-size:12px;font-weight:800;flex:none}
.word-limit-item strong{flex:1;min-width:0;overflow-wrap:anywhere;font-size:14px}
.word-limit-item button{flex:none;border:1px solid #97cdb1;border-radius:8px;background:#fff;color:#087f64;min-height:38px;padding:7px 10px;font:inherit;font-size:12px;font-weight:800;cursor:pointer}
@media(max-width:700px){.word-method-set-bar button{width:100%}.word-limit-item button{min-width:88px}}
#message-panel .word-chat-status{margin:0 0 10px}
.word-method-pages{min-width:0}
#message-panel .word-method-page[hidden]{display:none!important}
#message-panel .word-method-page.word-chat,#message-panel .word-method-page.manual-words{min-width:0;max-width:100%;margin:0;padding:16px;border:1.5px solid var(--method-color);border-radius:9px;background:var(--method-soft);color:#293247;box-shadow:none}
.word-method-page-head{display:flex;align-items:center;gap:10px;margin:0 0 8px}
.word-method-number{display:grid;flex:none;place-items:center;width:35px;height:35px;border-radius:9px;background:var(--method-color);color:#fff;font-size:14px;font-weight:900;letter-spacing:.02em}
.word-method-page-head small{display:block;color:var(--method-color);font-size:10px;font-weight:800;line-height:1.2}
.word-method-page-head h3{margin:1px 0 0;color:#263044;font-size:16px;line-height:1.25}
.word-method-description{margin:0 0 14px;color:#4f5b70;font-size:12px;line-height:1.55}
#message-panel .word-method-page .word-chat-conversation{margin:0;padding:0;border:0}
#message-panel .word-method-page .word-chat-quickstart{padding:12px}
#message-panel .word-method-page .word-chat-primary{min-height:44px;border-color:var(--method-color);background:var(--method-color)}
#message-panel .word-method-page .saved-library{margin:0;background:#fff}
#message-panel .word-method-page #saved-message-search{width:calc(100% - 26px)}
#message-panel .word-method-page #message-drawers{padding:12px}
#message-panel .word-method-page #word-chat-candidates[hidden],#message-panel .word-method-page #word-chat-save[hidden]{display:none}
.custom-message-extra-save{margin:10px 0;border:1px solid #dcc9d5;border-radius:9px;background:#fff}
.custom-message-extra-save summary{padding:10px;color:#76425f;font-size:12px;font-weight:800;cursor:pointer}
.custom-message-extra-save .custom-message-destinations{padding:0 10px 10px}
@media(max-width:899px){
  #message-panel .word-method-page.word-chat,#message-panel .word-method-page.manual-words{padding:13px}
  .word-method-navigation{margin-top:2px}
  .word-method-swipe-hint{font-size:11px}
}
@media(max-width:380px){
  #message-panel .word-method-page.word-chat,#message-panel .word-method-page.manual-words{padding:11px}
}

/* Compact desktop tabs and a page-turn transition for the seven word methods. */
#message-panel .word-method-navigation{display:block;margin:0 0 10px}
.word-method-tabs{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px}
.word-method-tabs button{display:flex;min-width:0;min-height:52px;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:5px 2px;border:1.5px solid #d8dfe7;border-radius:9px;background:#f8fafc;color:#4a5769;font-size:12px;font-weight:800;line-height:1.2;white-space:nowrap}
.word-method-tabs button small{color:#7f8b9b;font-size:10px;font-weight:900}
.word-method-tabs button[aria-selected="true"]{border-color:var(--tab-color);background:var(--tab-soft);color:var(--tab-color);box-shadow:0 2px 8px #24324712}
.word-method-tabs button[aria-selected="true"] small{color:var(--tab-color)}
.word-method-tabs button:hover:not([aria-selected="true"]){background:#edf2f7}
#word-method-tab-0{--tab-color:#6844a7;--tab-soft:#f5f0ff}
#word-method-tab-1{--tab-color:#315fba;--tab-soft:#eef4ff}
#word-method-tab-2{--tab-color:#167b83;--tab-soft:#ecfaf9}
#word-method-tab-3{--tab-color:#a65d1b;--tab-soft:#fff6eb}
#word-method-tab-4{--tab-color:#a53d73;--tab-soft:#fff0f7}
#word-method-tab-5{--tab-color:#25764c;--tab-soft:#edf9f0}
#word-method-tab-6{--tab-color:#596282;--tab-soft:#f2f4fa}
#message-panel #word-method-select,#message-panel #word-method-position,#message-panel .word-method-progress,.word-method-swipe-hint span{display:none}
.word-method-pages.is-transitioning{position:relative;overflow:hidden;perspective:900px;isolation:isolate;pointer-events:none}
.word-method-pages.is-transitioning .word-method-page{backface-visibility:hidden;will-change:transform,opacity}
#message-panel .category-chip,#message-panel .message-chip,#message-panel .selected-chip,#message-panel .saved-item,#message-panel .drawer-candidate,#message-panel .drawer-phrase,#message-panel .drawer-tab-group,#selection-tray .selected-chip{border-radius:9px}
@media(min-width:900px) and (max-width:1599px){
  .word-method-tabs{grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media(max-width:899px){
  #message-panel{touch-action:pan-y pinch-zoom}
  #message-panel .word-method-navigation{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:10px}
  .word-method-tabs{display:none}
  #message-panel #word-method-select{display:block}
  #message-panel #word-method-position{display:inline}
  #message-panel .word-method-progress{display:grid}
  .word-method-swipe-hint span{display:inline}
}

/* Keep both levels of choices visible while only their content scrolls. */
@media(min-width:900px){
  .sidebar{display:flex;flex-direction:column;overflow:hidden;scrollbar-gutter:auto}
  .sidebar>.setting-tabs,.sidebar>.selected-setting-summary{flex:none}
  .sidebar>.control-section:not([hidden]){flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
  #message-panel{padding-top:0}
  #message-panel .word-method-navigation{position:sticky;top:0;z-index:3;margin:0 -20px 10px;padding:12px 20px;background:#fff;border-bottom:1px solid var(--studio-line)}
}
@media(max-width:899px){
  .sidebar{overflow:visible}
  .setting-tabs{position:sticky;top:125px;z-index:8}
  #message-panel .word-method-navigation{position:sticky;top:189px;z-index:7;margin-left:-16px;margin-right:-16px;padding:9px 16px;background:#fff;border-bottom:1px solid var(--studio-line)}
}
@media(max-width:700px){
  .setting-tabs{top:113px}
  #message-panel .word-method-navigation{top:173px}
}

/* Make generated words and pose changes visible at their destination. */
.auto-word-spark{display:inline-block;margin-right:6px}.auto-word-dots{display:none;align-items:center;justify-content:center;gap:4px;margin-left:9px}.auto-word-dots i{width:5px;height:5px;border-radius:50%;background:currentColor;animation:auto-word-dot .8s ease-in-out infinite alternate}.auto-word-dots i:nth-child(2){animation-delay:.14s}.auto-word-dots i:nth-child(3){animation-delay:.28s}
#message-panel .word-chat-auto-all.is-thinking:disabled{opacity:1;background:linear-gradient(110deg,#5845a6 20%,#8165ce 48%,#5845a6 76%);background-size:220% 100%;animation:auto-word-thinking 1.5s linear infinite}
.word-chat-auto-all.is-thinking .auto-word-spark{animation:auto-word-spark 1s ease-in-out infinite}.word-chat-auto-all.is-thinking .auto-word-dots{display:inline-flex}
@keyframes auto-word-thinking{to{background-position:-220% 0}}@keyframes auto-word-dot{to{opacity:.25;transform:translateY(-5px)}}@keyframes auto-word-spark{50%{transform:rotate(35deg) scale(1.25)}}
.word-flight{position:fixed;z-index:50;pointer-events:none;max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:8px 12px;border:1px solid #7654b5;border-radius:9px;background:#6844a7;color:#fff;font-size:12px;font-weight:800;box-shadow:0 10px 26px #4424854d}
.card-select{display:block;width:100%;padding:0;border:0;background:transparent;color:inherit;text-align:left;cursor:pointer}
.card-select:focus-visible{outline:3px solid #95d8c5;outline-offset:-3px;border-radius:10px}
.card-phrase.is-placeholder,.card-expression.is-placeholder{color:#8d9b95;font-style:italic}
.sticker-card{position:relative}
.sticker-card .card-top{padding-right:53px}
.card-clear-icon{position:absolute;top:8px;right:8px;z-index:1;display:grid;place-items:center;width:38px;height:38px;border:1px solid #d7e6df;border-radius:9px;background:#fff;color:#6a8277}
.card-clear-icon:hover:not(:disabled){border-color:#d59494;background:#fff5f5;color:#a23f3f}
.card-regenerate-icon{position:absolute;top:52px;left:8px;z-index:2;display:grid;place-items:center;width:38px;height:38px;border:1px solid #b6dfc9;border-radius:9px;background:#fffffff0;color:#087f64;box-shadow:0 2px 8px #123d2a25}
.card-regenerate-icon:hover:not(:disabled){background:#e6f8ee;border-color:#087f64}
.card-quick-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;padding:7px 9px 9px;border-top:1px solid #e4eee8}
.card-quick-actions button{min-width:0;min-height:38px;padding:5px 4px;border:1px solid #cdded3;border-radius:9px;background:#fff;color:#386452;font-size:10px;font-weight:800;white-space:nowrap;transition:transform .2s,background .2s,border-color .2s,box-shadow .2s}
.card-quick-actions button:last-child{border-color:#c7b7e5;background:#f7f2ff;color:#62429c}
.card-quick-actions button:hover:not(:disabled){transform:translateY(-2px);box-shadow:0 4px 9px #14392a18}.card-quick-actions button:active:not(:disabled){transform:scale(.95)}
.card-word-feedback{margin:0 9px 9px;padding:8px 9px;border-radius:7px;background:#fff5e9;color:#8d4a17;font-size:11px;font-weight:700;line-height:1.45}
.sticker-card.is-pose-thinking .card-expression{opacity:.55;animation:card-pose-wait 1s ease-in-out infinite alternate}
.sticker-card.is-word-thinking .card-phrase{opacity:.55;animation:card-pose-wait 1s ease-in-out infinite alternate}
.sticker-card.is-word-arriving{animation:card-word-arrive .55s ease-out}.sticker-card.is-pose-arriving{animation:card-pose-arrive .55s ease-out}
@keyframes card-pose-wait{to{opacity:1}}@keyframes card-word-arrive{45%{border-color:#7654b5;box-shadow:0 0 0 5px #bb9ceb77,0 8px 24px #6844a733;transform:translateY(-4px)}}@keyframes card-pose-arrive{45%{border-color:#0b9b74;box-shadow:0 0 0 5px #9cdebf88,0 8px 24px #087f6433;transform:translateY(-4px)}}
.preview-pose-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin:9px 0}
.preview-pose-actions button{min-height:40px;padding:7px 9px;border:1px solid #aacdb8;border-radius:9px;background:#eff9f2;color:#17634d;font-size:11px;font-weight:800;transition:transform .2s,background .2s,box-shadow .2s}
.preview-pose-actions button:first-child{border-color:#c9b9e8;background:#f5efff;color:#6844a7}.preview-pose-actions button:hover:not(:disabled){transform:translateY(-2px);box-shadow:0 5px 12px #14392a16}.preview-pose-actions button:active:not(:disabled){transform:scale(.97)}
#pose-action-status{margin:0;color:#3b6b57;font-size:11px;line-height:1.4}#pose-action-status:empty{display:none}
@media(max-width:700px){.card-clear-icon{width:44px;height:44px;top:5px;right:5px}.card-regenerate-icon{width:44px;height:44px;top:46px;left:8px}.card-quick-actions button{min-height:44px;font-size:12px}.sticker-grid:not(.is-outline) .card-expression{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.preview-pose-actions{grid-template-columns:1fr}.preview-pose-actions button{min-height:44px}}
@media(prefers-reduced-motion:reduce){#message-panel .word-chat-auto-all.is-thinking:disabled,.auto-word-dots i,.word-chat-auto-all.is-thinking .auto-word-spark,.sticker-card.is-pose-thinking .card-expression,.sticker-card.is-word-thinking .card-phrase{animation-duration:2.5s}.sticker-card.is-word-arriving,.sticker-card.is-pose-arriving{animation-duration:.18s}}

/* LINE Creators Market status signals. */
.line-market-indicator{display:inline-flex;align-items:center;gap:4px;padding:5px 7px;border:1px solid #d3e4d9;border-radius:10px;background:#fff;transition:transform .18s,box-shadow .18s}
.line-market-indicator:hover{transform:translateY(-2px);box-shadow:0 5px 12px #14392a16}
.line-market-indicator[hidden]{display:none}
.market-dot{display:inline-grid;place-items:center;min-width:22px;height:22px;padding:0 4px;border-radius:50%;font-size:11px;font-weight:900;line-height:1;color:#fff}
.market-dot-attention{background:#d24757}.market-dot-review{background:#dfaa27;color:#342908}.market-dot-ready{background:#3279c6}
.line-market-dialog{width:min(650px,calc(100vw - 24px));max-width:none;max-height:min(86dvh,850px);overflow-y:auto}
.line-market-head{display:flex;justify-content:space-between;align-items:start;gap:12px;position:relative}
.line-market-head .dialog-close{position:static;flex:none}.line-market-head h2{margin-bottom:4px}
.line-market-head p{margin-bottom:12px}.line-market-legend{display:flex;align-items:center;flex-wrap:wrap;gap:6px;font-size:11px;font-weight:700;color:#50675d;padding:10px 0;border-bottom:1px solid #e1ebe6}
.line-market-legend .market-dot{min-width:12px;width:12px;height:12px;padding:0;margin-left:9px}
.line-market-list{display:grid;gap:7px;margin-top:12px}.line-market-item{display:flex;align-items:center;gap:10px;min-width:0;padding:10px 12px;border:1px solid #e0eae4;border-radius:10px;background:#fff;color:#183a31;text-decoration:none}
.line-market-list[hidden],.line-market-detail[hidden]{display:none}
.line-market-item{width:100%;font:inherit;text-align:left;cursor:pointer}
.line-market-thumbnail{display:grid;place-items:center;flex:none;width:44px;height:44px;object-fit:contain;border:1px solid #e3eee8;border-radius:8px;background:#f6faf8;color:#8ca49a;font-size:10px}
.line-market-item-arrow{font-size:23px;line-height:1;color:#638478}
.line-market-detail{margin-top:14px}.line-market-back{min-height:38px;padding:5px 10px;border:0;background:none;color:#087f64;font-weight:800;cursor:pointer}
.line-market-detail-card{display:flex;gap:16px;align-items:center;margin-top:8px;padding:14px;border:1px solid #e0eae4;border-radius:12px;background:#f8fcfa}
.line-market-detail-image{display:grid;place-items:center;flex:none;width:128px;height:128px;object-fit:contain;border:1px solid #e0eae4;border-radius:10px;background:#fff;color:#7d988b;text-align:center}
.line-market-detail-card h3{margin:0 0 8px;font-size:17px;overflow-wrap:anywhere}.line-market-detail-card p{margin:0 0 12px;color:#526e61;font-size:12px}.line-market-detail-card a,.line-market-qr-box a{color:#087f64;font-size:12px;font-weight:800}
.line-market-qr-box{display:flex;flex-direction:column;align-items:center;gap:10px;margin-top:12px;padding:16px;border:1px solid #e0eae4;border-radius:12px;color:#526e61;text-align:center;font-size:12px}.line-market-qr-box img{width:180px;height:180px}
.line-market-share-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:8px}.line-market-share-actions button{min-height:40px;padding:7px 14px;border:1px solid #b8dbcb;border-radius:9px;background:#fff;color:#087f64;font-weight:800;cursor:pointer}.line-market-share-actions button:last-child{background:#087f64;color:#fff}
.line-market-share-panel{width:100%;margin-top:5px;padding:14px;border:1px solid #cce8d9;border-radius:14px;background:#f8fcfa;text-align:left}
.line-market-share-preview{display:flex;align-items:center;gap:11px;min-width:0;padding-bottom:12px;border-bottom:1px solid #e0ebe5}.line-market-share-preview img,.line-market-share-preview>span{display:grid;place-items:center;flex:none;width:54px;height:54px;object-fit:contain;border-radius:9px;background:#fff;color:#829b90}.line-market-share-preview strong,.line-market-share-preview small{display:block}.line-market-share-preview strong{font-size:14px;color:#183a31;overflow-wrap:anywhere}.line-market-share-preview small{margin-top:4px;font-size:11px;color:#607c70}
.line-market-share-methods{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:12px}.line-market-share-method{display:flex;align-items:center;gap:9px;min-height:52px;padding:8px 10px;border:1px solid #d6e8df;border-radius:11px;background:#fff;color:#234a3c;font:inherit;font-size:12px;font-weight:800;text-align:left;text-decoration:none;cursor:pointer}.line-market-share-method:hover{border-color:#087f64;background:#f1faf5}.line-market-share-method::before{display:grid;place-items:center;flex:none;width:28px;height:28px;border-radius:8px;background:#e9f4ef;font-size:15px}.line-market-share-method.is-line::before{content:'L';background:#06c755;color:#fff}.line-market-share-method.is-x::before{content:'𝕏';background:#111;color:#fff}.line-market-share-method.is-mail::before{content:'✉';background:#e7f1ff;color:#2860a6}.line-market-share-method.is-copy::before{content:'⧉';background:#e8f6f0;color:#087f64}.line-market-share-method.is-native::before{content:'↗';background:#f0eaff;color:#6551a5}
.line-market-item:hover{background:#f3faf6}.line-market-item .market-dot{min-width:12px;width:12px;height:12px;padding:0;flex:none}
.line-market-item-title{min-width:0;flex:1;font-size:12px;font-weight:800;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.line-market-item-status{font-size:11px;color:#526e61;white-space:nowrap}
.line-market-note{margin-top:14px!important;font-size:11px!important}
@media(max-width:700px){.topbar .top-actions{gap:6px}.line-market-indicator{padding:4px 5px;gap:2px}.line-market-indicator .market-dot{min-width:18px;height:18px;font-size:10px}.line-market-dialog{padding:18px}.line-market-detail-image{width:92px;height:92px}.line-market-detail-card{gap:10px;padding:10px}.line-market-item{gap:7px;padding:8px}.line-market-item-title{font-size:11px}}
@media(max-width:390px){.topbar .brand{font-size:15px}.topbar .brand-mark{width:28px;height:28px}.topbar .member-summary{display:none}}

/* Keep the AI conversation above its choices and bottom composer. */
#message-panel #word-method-page-1 .word-chat-preferences{margin:8px 0;border:0;background:transparent;text-align:right}
#message-panel #word-method-page-1 .word-chat-preferences summary{display:inline-flex;align-items:center;min-height:30px;padding:3px 0;background:transparent;font-size:11px}
#message-panel #word-method-page-1 .word-chat-preferences[open]{padding:8px 10px;border:1px solid #c9c7d8;border-radius:9px;background:#fff;text-align:left}
#message-panel #word-method-page-1 .word-chat-conversation{display:flex;flex-direction:column;gap:10px;min-width:0;margin:14px 0 0;padding:16px;border:1px solid #cbdde0;border-radius:11px;background:#eaf2f3}
#message-panel #word-method-page-1 .word-chat-log{min-height:82px;max-height:320px;overflow-y:auto;gap:11px;margin:0;padding:4px 7px;border:0;border-radius:0;background:transparent}
#message-panel #word-method-page-1 .word-chat-line{position:relative;max-width:84%;padding:10px 13px;border-radius:11px;font-size:14px;box-shadow:0 2px 7px #294d4417;animation:word-chat-appear .22s ease-out}
#message-panel #word-method-page-1 .word-chat-line.assistant{margin-left:34px;border-top-left-radius:3px;background:#fff;color:#253c38}
#message-panel #word-method-page-1 .word-chat-avatar{position:absolute;left:-34px;top:0;display:grid;place-items:center;width:27px;height:27px;border-radius:8px;background:#fff;color:#087f64;font-size:10px;font-weight:900}
#message-panel #word-method-page-1 .word-chat-line.user{border-top-right-radius:3px;background:#bff1b1;color:#173e31}
#message-panel #word-method-page-1 .word-chat-options,#message-panel #word-method-page-1 .word-chat-examples{margin:0;padding-left:41px}
#message-panel #word-method-page-1 .word-chat-options button,#message-panel #word-method-page-1 .word-chat-examples button{min-height:38px;border-color:#9cc9b1;border-radius:9px;background:#fff;color:#17634a;font-size:12px}
#message-panel #word-method-page-1 .word-chat-options button:hover,#message-panel #word-method-page-1 .word-chat-examples button:hover{background:#ebfaef;border-color:#087f64}
#message-panel #word-method-page-1 .word-chat-status{margin:0}
#message-panel #word-method-page-1 .word-chat-status[data-busy="true"]{position:relative;display:flex;align-items:center;gap:10px;min-height:54px;overflow:hidden;padding:12px 14px 16px;border:1px solid #a9c4e8;border-radius:11px;background:#f0f6ff;color:#23508c;font-weight:800;box-shadow:0 3px 12px #23508c12}
#message-panel #word-method-page-1 .word-chat-status[data-busy="true"]::before{content:"";flex:none;width:18px;height:18px;border:3px solid #cbdcf4;border-top-color:#315fba;border-radius:50%;animation:word-chat-loading-spin .8s linear infinite}
#message-panel #word-method-page-1 .word-chat-status[data-busy="true"]::after{content:"";position:absolute;bottom:0;left:-35%;width:35%;height:4px;border-radius:4px;background:linear-gradient(90deg,#76b6ed,#315fba);animation:word-chat-loading-track 1.7s ease-in-out infinite}
#message-panel #word-method-page-1 .word-chat-loading-time{flex:none;margin-left:auto;color:#4a6690;font-size:11px;font-variant-numeric:tabular-nums;white-space:nowrap}
@keyframes word-chat-loading-spin{to{transform:rotate(360deg)}}
@keyframes word-chat-loading-track{to{left:100%}}
#message-panel #word-method-page-1 label.word-chat-input-label{margin:4px 0 -5px;color:#45645a;font-size:12px}
#message-panel #word-method-page-1 .word-chat-form{position:sticky;bottom:8px;z-index:2;display:flex;flex-wrap:nowrap;align-items:center;gap:6px;margin:0;padding:5px;border:1.5px solid #a9caba;border-radius:10px;background:#fff;box-shadow:0 2px 8px #214d4212}
#message-panel #word-method-page-1 .word-chat-form:focus-within{border-color:#087f64;box-shadow:0 0 0 3px #c9ead7}
#message-panel #word-method-page-1 .word-chat-form input{flex:1 1 0;min-width:0;min-height:42px;padding:8px 10px;border:0;border-radius:7px;background:transparent;color:#20332f;font-size:16px;outline:0}
#message-panel #word-method-page-1 .word-chat-form button{flex:none;width:auto;min-width:68px;min-height:42px;padding:7px 12px;border:0;border-radius:8px;background:#087f64;color:#fff;font-size:13px}
#message-panel #word-method-page-1 .word-chat-form button:hover:not(:disabled){background:#066b54}
#message-panel #word-method-page-1 .word-chat-input-history{max-height:220px;overflow-y:auto;padding:9px 10px;border:1px solid #b7d5c5;border-radius:9px;background:#fff;box-shadow:0 5px 16px #214d4217}
#message-panel #word-method-page-1 .word-chat-input-history[hidden]{display:none}
#message-panel #word-method-page-1 .word-chat-input-history>strong{display:block;margin-bottom:5px;color:#426357;font-size:11px}
.word-chat-input-history-item{display:flex;align-items:center;gap:4px;border-top:1px solid #eef3ef}
.word-chat-input-history-item button{min-height:39px;border:0;background:transparent;color:#21483b;cursor:pointer}
.word-chat-input-history-item button:first-child{flex:1;min-width:0;overflow:hidden;padding:8px 5px;text-align:left;text-overflow:ellipsis;white-space:nowrap;font-size:12px}
.word-chat-input-history-item button:last-child{flex:none;width:39px;color:#a54e4e;font-size:20px}
.word-chat-input-history-item button:hover{background:#f1faf4}
@keyframes word-chat-appear{from{opacity:.35;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:700px){#message-panel #word-method-page-1 .word-chat-conversation{padding:11px}#message-panel #word-method-page-1 .word-chat-line{max-width:90%}#message-panel #word-method-page-1 .word-chat-options,#message-panel #word-method-page-1 .word-chat-examples{padding-left:0}}
@media(prefers-reduced-motion:reduce){#message-panel #word-method-page-1 .word-chat-line,#message-panel #word-method-page-1 .word-chat-status[data-busy="true"]::before,#message-panel #word-method-page-1 .word-chat-status[data-busy="true"]::after{animation:none}}

/* Keep candidate actions within reach while reviewing a long set. */
#message-panel .word-chat-candidate-actions{position:sticky;bottom:70px;z-index:4;display:flex;align-items:stretch;gap:8px;margin:12px -8px -8px;padding:9px 8px 8px;border-top:1px solid #bed4e9;border-radius:0 0 9px 9px;background:#f3f8fff2;box-shadow:0 -5px 16px #24496312;backdrop-filter:blur(10px)}
#message-panel #word-chat-apply{flex:1 1 0;width:auto;min-width:0;min-height:44px;padding:8px 10px;font-size:13px}
#message-panel .word-chat-regenerate-menu{position:static;flex:none}
#message-panel .word-chat-regenerate-menu summary{display:flex;align-items:center;justify-content:center;min-width:104px;min-height:44px;padding:8px 10px;border:1.5px solid #467eab;border-radius:9px;background:#fff;color:#205b89;font-size:13px;font-weight:800;cursor:pointer;list-style:none}
#message-panel .word-chat-regenerate-menu summary::-webkit-details-marker{display:none}
#message-panel .word-chat-regenerate-menu summary:after{content:'⌃';margin-left:5px;font-size:14px}
#message-panel .word-chat-regenerate-menu[open] summary{background:#e5f2fc}
#message-panel .word-chat-regenerate-menu .word-chat-refresh-actions{position:absolute;left:8px;right:8px;bottom:calc(100% + 8px);display:grid;gap:7px;width:auto;margin:0;padding:9px;border:1px solid #aac6df;border-radius:10px;background:#fff;box-shadow:0 10px 26px #24496330}
#message-panel .word-chat-regenerate-menu .word-chat-refresh-actions button{width:100%;min-height:44px;text-align:left}
@media(max-width:700px){#message-panel .word-chat-candidate-actions{bottom:calc(var(--bottom-menu-height, 64px) + 62px)}#message-panel .word-chat-regenerate-menu summary{min-width:96px;font-size:12px}}
@media(max-width:380px){#message-panel .word-chat-candidate-actions{display:grid;grid-template-columns:minmax(0,1fr)}#message-panel #word-chat-apply{order:-1}#message-panel .word-chat-regenerate-menu summary{width:100%}}

/* Character setup starts with the photo itself. Keep the same reading order at every width. */
#character-panel{container-name:character-panel;container-type:inline-size}
#character-panel .character-library{margin-top:0}
#character-panel .character-setup-row{display:grid;grid-template-columns:minmax(0,1fr);align-items:start;gap:18px;margin:0}
.character-photo-step,.character-next-steps{min-width:0}
.character-photo-step h3{margin:0 0 10px;font-size:15px;line-height:1.4;color:#244c3c}
#character-panel .character-photo-picker{display:block;width:100%;margin:0;padding:0;border:2px solid #8ac7ac;border-radius:16px;overflow:hidden;background:#fff;box-shadow:0 6px 20px #124f3220}
#character-panel .character-photo-picker:hover,#character-panel .character-photo-picker:focus-within{border-color:#087f64;background:#fff}
#character-panel .character-photo-picker .character-photo-action{display:flex;width:100%;min-height:76px;margin:0;padding:11px 15px;border:0;border-radius:0;background:#eaf8ef;transform:none;cursor:pointer}
#character-panel .character-photo-picker .character-photo-action:hover{background:#ddf4e8;transform:none}
#character-panel .character-photo-picker .character-photo-preview{display:block;width:100%;min-height:0;margin:0;padding:0;border:0;border-radius:0;background:#eff6f1;transform:none;cursor:pointer}
#character-panel .character-photo-picker .character-photo-preview:hover{transform:none}
#character-panel .character-photo-picker .active-character-card{position:relative;width:100%;height:auto;max-height:400px;aspect-ratio:4/3;min-height:0;margin:0;padding:0;border:0;border-radius:0;overflow:hidden;background:#eff6f1}
#character-panel .character-photo-picker .active-character-thumb{position:absolute;inset:0;display:block;width:100%;height:100%;border:0;border-radius:0;background:transparent}
#character-panel .character-photo-picker .active-character-thumb img{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:cover;object-position:center 30%;border-radius:0}
#character-panel .character-photo-picker .active-character-thumb img[hidden]{display:none}
#character-panel .character-photo-picker #active-character-placeholder{object-fit:contain;padding:12%;opacity:.23}
#character-panel .character-photo-picker.is-empty .active-character-card{height:132px;max-height:none;aspect-ratio:auto}
#character-panel .character-photo-picker.is-empty #active-character-placeholder{padding:8px;opacity:.3}
.character-photo-action{display:flex;align-items:center;gap:12px;color:#15553d}
.character-photo-action .upload-icon{width:44px;height:44px;border-radius:11px;background:#fff;color:#087f64;font-size:29px;font-weight:400}
.character-photo-action .upload-copy{flex:1}
.character-photo-action .upload-copy strong{font-size:16px;line-height:1.35;margin:2px 0}
.character-photo-action .upload-copy small:first-child{font-size:11px;font-weight:800;color:#315e4d}
.character-photo-action .upload-arrow{font-size:26px;line-height:1;color:#087f64}
.same-character-photo{width:100%;min-height:44px;margin:9px 0 0;padding:9px 12px;border:1px solid #b6d9c6;border-radius:11px;background:#fff;color:#087f64;font-size:13px;font-weight:800;cursor:pointer}.same-character-photo:hover{background:#eff9f3}.same-character-photo[hidden]{display:none}
.gallery-cloud-more{grid-column:1/-1;min-height:44px}
.character-next-style{display:flex;align-items:center;justify-content:space-between;gap:9px;width:calc(100% - 24px);min-height:48px;margin:10px 12px;padding:9px 12px;border:1px solid #087f64;border-radius:10px;background:#087f64;color:#fff;font-size:13px;font-weight:800;text-align:left;line-height:1.35}
.character-next-style:hover{background:#066d56}
.character-next-style[hidden]{display:none}
.character-next-style span{flex:none;font-size:20px}
.character-description .character-next-style{width:100%;margin:10px 0 0}
.character-next-steps{padding:15px;border:1px solid #dcebe2;border-radius:14px;background:#fbfefc}
.character-next-steps .character-library-heading:first-child{margin:0 0 8px}
.character-next-steps .character-library-heading strong{font-size:14px}
.character-next-steps .character-heading-actions{display:flex;flex-shrink:0}
.character-next-steps .character-heading-actions button{min-height:44px;padding:6px 8px;white-space:nowrap;flex-shrink:0}
.character-next-steps .character-group-strip:empty{display:none}
.character-next-steps.has-no-saved-characters .character-library-heading,.character-next-steps.has-no-saved-characters .character-group-strip,.character-next-steps.has-no-saved-characters #character-groups-empty{display:none}
.character-next-steps.has-no-saved-characters .character-description{margin-top:0}
.character-image-strip .character-image-tile.has-delete{display:grid;grid-template-rows:auto 44px;gap:5px;aspect-ratio:auto}
.character-image-strip .character-image-tile.has-delete>button[data-character-image]{width:100%;height:auto;aspect-ratio:1}
.character-image-strip .character-image-tile.has-delete .character-photo-delete{position:static;width:100%;height:44px;min-width:0;min-height:44px;padding:4px 6px;border:1px solid #e2c2be;border-radius:9px;background:#fff7f5;color:#9b4039;font-size:11px;box-shadow:none}
.character-image-strip .character-image-tile.has-delete .character-photo-delete:hover{background:#ffece8}
.character-next-steps .character-group-strip button{min-height:58px}
.character-next-steps .character-description{display:block;margin-top:16px}
.character-next-steps .character-description label{font-size:14px;margin-bottom:3px}
.character-next-steps .character-description label span{font-size:11px;font-weight:700;color:#738d7f}
.character-next-steps .character-description textarea{width:100%;min-height:110px;padding:12px;font-size:16px;line-height:1.55}
.character-helper{margin:0 0 9px;font-size:11px;line-height:1.5;color:#718a7d}
.character-media-panel{margin-top:12px;border:1px solid #dcebe2;border-radius:11px;background:#fff}
.character-media-panel[hidden],.character-helper[hidden]{display:none}
.character-media-panel summary{display:flex;align-items:center;min-height:46px;padding:10px 12px;cursor:pointer;color:#245a45;font-size:12px;font-weight:800;list-style:none}
.character-media-panel summary::-webkit-details-marker{display:none}
.character-media-panel summary::after{content:'⌄';margin-left:auto;font-size:18px;color:#5d9275}
.character-media-panel[open] summary::after{content:'⌃'}
.character-media-panel summary span{margin:0 4px}
.character-media-panel .character-image-strip{margin:0 10px 10px}
.character-next-steps #character-library-status{margin:12px 0 0}
@container character-panel (min-width:760px){#character-panel .character-setup-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:22px}}
@media(max-width:700px){#character-panel .character-photo-picker .active-character-card{aspect-ratio:1;max-height:340px}#character-panel .character-photo-picker.is-empty .active-character-card{height:148px;max-height:none;aspect-ratio:auto}#character-panel .character-photo-picker .character-photo-action{padding:10px 12px}.character-next-steps{padding:13px}#character-references.character-image-strip{grid-auto-columns:minmax(136px,calc((100% - 8px)/2))}}
@media(max-width:360px){#character-references.character-image-strip{grid-auto-flow:row;grid-template-columns:minmax(0,1fr);grid-auto-columns:auto;overflow-x:visible;scroll-snap-type:none}}

/* Keep the primary LINE request action in view while the long form scrolls. */
.submission-dialog[open]{display:flex;flex-direction:column;max-height:min(94dvh,960px);padding:0;overflow:hidden}
.submission-dialog .submission-dialog-content{flex:1;min-height:0;overflow-y:auto;padding:25px;scroll-padding:24px;scrollbar-gutter:stable}
.submission-submit-footer{flex:none;padding:12px 25px calc(14px + env(safe-area-inset-bottom));border-top:1px solid #d1e5d9;background:#fff;box-shadow:0 -8px 24px #173f3212}
.submission-submit-footer[hidden],.submission-dialog.is-job-view .submission-submit-footer{display:none}
.submission-submit-heading{display:flex;justify-content:space-between;align-items:baseline;gap:12px;color:#174b3b;font-size:13px}
.submission-submit-heading span{color:#a45732;font-size:11px;font-weight:800}
.submission-submit-issues{display:flex;gap:6px;flex-wrap:wrap;margin:7px 0 9px}
.submission-submit-issues:empty{display:none}
.submission-submit-issues button{min-height:32px;padding:5px 9px;border:1px solid #edc8af;border-radius:999px;background:#fff8f1;color:#8b3f20;font-size:11px;font-weight:750;text-align:left;white-space:normal}
.submission-submit-issues button:hover{background:#ffeddd}
.submission-submit-issues span{align-self:center;color:#8b6e5e;font-size:11px}
.submission-submit-footer #submission-cloud{min-height:49px;margin:0;font-size:14px}
.submission-submit-footer #submission-cloud.is-ready{box-shadow:0 0 0 0 #0ba57875;animation:submission-ready-pulse 1.8s ease-out infinite}
.line-review-consent input[type=checkbox]{flex:none;width:20px;height:20px;margin:0;accent-color:#08775d}.line-review-consent label{cursor:pointer}
.submission-result-reason-label{display:block;margin:12px 0 3px;color:#9a3e21;font-size:13px}
.submission-result-reason-label[hidden]{display:none}
.submission-dialog.is-stopped #submission-result-stage{padding:12px;border:1px solid #edc4ad;border-radius:10px;background:#fff8f3;color:#74351f;text-align:left;font-weight:750;overflow-wrap:anywhere}
@keyframes submission-ready-pulse{65%{box-shadow:0 0 0 9px #0ba57800}100%{box-shadow:0 0 0 0 #0ba57800}}
@media(max-width:700px){.submission-dialog[open]{max-height:calc(100dvh - 12px)}.submission-dialog .submission-dialog-content{padding:19px 17px}.submission-submit-footer{padding:10px 17px calc(10px + env(safe-area-inset-bottom))}}
@media(prefers-reduced-motion:reduce){.submission-submit-footer #submission-cloud.is-ready{animation:none;box-shadow:0 0 0 2px #87d2ae}}

.auto-submit-dialog{max-width:min(480px,calc(100vw - 24px))}.auto-submit-content{position:relative;display:grid;gap:12px}.auto-submit-dialog .dialog-close{width:44px;height:44px;right:-8px;top:-8px}.auto-submit-dialog h2{margin:0;font-size:21px;line-height:1.4}.auto-submit-lead{display:flex;align-items:baseline;flex-wrap:wrap;gap:8px;margin:0;padding:13px 15px;border:2px solid #99ccb2;border-radius:13px;background:#f2fbf5;color:#174d3b;font-size:14px;font-weight:700}.auto-submit-countdown{font-size:30px;font-variant-numeric:tabular-nums;letter-spacing:.02em;color:#087f64}.auto-submit-listing{display:grid;grid-template-columns:auto 1fr;gap:6px 12px;margin:0;font-size:14px;line-height:1.55}.auto-submit-listing dt{font-weight:800;color:#426657}.auto-submit-listing dd{margin:0;overflow-wrap:anywhere}.auto-submit-actions{display:grid;gap:9px}.auto-submit-actions .primary-button,.auto-submit-actions .secondary-button{margin:0;min-height:50px;font-size:16px;font-weight:800}.auto-submit-cancel{justify-self:center;min-height:44px;font-size:14px;color:#8b351d}.auto-submit-dialog [role=status]:empty{display:none}
.auto-submit-dialog .auto-submit-lead{font-size:15px;line-height:1.5;color:#174d3b}
.settings-auto-delay[hidden]{display:none}.settings-auto-delay{display:grid;gap:6px;margin:4px 0 12px}.settings-auto-delay label{font-size:14px;font-weight:800}.settings-auto-delay select{min-height:46px;border:2px solid #99ccb2;border-radius:11px;padding:8px 12px;font:inherit;font-size:16px;font-weight:700;background:#fff}.settings-auto-delay-note{margin:0;font-size:12px;line-height:1.5;color:#678074}
.terminal-trigger[hidden]{display:none}.terminal-trigger{display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:0 14px;border:2px solid #16241f;border-radius:11px;background:#16241f;color:#9ff0c4;font:700 14px/1 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;cursor:pointer}.terminal-trigger[aria-expanded="true"]{background:#0b1310;box-shadow:inset 0 0 0 2px #3fd68a}.terminal-trigger span:last-child{font-family:"Zen Kaku Gothic New",system-ui,sans-serif}
.terminal-panel[hidden]{display:none}.terminal-panel{position:fixed;z-index:16;top:84px;right:16px;width:min(680px,calc(100vw - 32px));height:min(52vh,480px);display:flex;flex-direction:column;border-radius:14px;overflow:hidden;background:#0b1310;border:1px solid #24382f;box-shadow:0 22px 60px #06100c80;color:#d4e6dc;font:13.5px/1.6 ui-monospace,SFMono-Regular,Menlo,Consolas,"Zen Kaku Gothic New",monospace}
.terminal-head{display:flex;align-items:center;gap:10px;padding:8px 10px 8px 14px;background:#15211c;border-bottom:1px solid #24382f}.terminal-dots{display:flex;gap:6px}.terminal-dots i{width:11px;height:11px;border-radius:50%;background:#ff6159}.terminal-dots i:nth-child(2){background:#ffbd2e}.terminal-dots i:nth-child(3){background:#28c941}.terminal-head strong{font-size:14px;color:#f1fff7}.terminal-meta{flex:1;min-width:0;font-size:12px;color:#8fb3a1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.terminal-tools{display:flex;gap:6px}.terminal-tools button{min-height:34px;padding:0 10px;border:1px solid #2f4a3d;border-radius:8px;background:#0f1a16;color:#cfe9db;font:600 12px/1 "Zen Kaku Gothic New",system-ui,sans-serif;cursor:pointer}.terminal-tools button[aria-pressed="false"]{color:#7d978a}#terminal-close{min-width:34px;font-size:18px}
.terminal-lines{flex:1;margin:0;padding:10px 14px 14px;overflow:auto;list-style:none;overscroll-behavior:contain}.terminal-lines li{display:grid;grid-template-columns:auto auto 1fr;gap:8px;padding:1px 0;white-space:pre-wrap;overflow-wrap:anywhere}.terminal-lines time{color:#5f8674}.terminal-lines .t-src{color:#6cc7ff}.terminal-lines .t-worker .t-src{color:#c8a2ff}.terminal-lines .t-ok .t-msg{color:#7ef0ae}.terminal-lines .t-err .t-msg{color:#ff8f86}.terminal-lines .t-wait .t-msg{color:#ffd479}.terminal-lines .t-dim .t-msg{color:#78907f}.terminal-lines .t-empty{display:block;color:#7d978a}
.terminal-lines li.t-cursor::after{content:"▌";color:#3fd68a;animation:terminal-blink 1s steps(1) infinite}@keyframes terminal-blink{50%{opacity:0}}@media (prefers-reduced-motion:reduce){.terminal-lines li.t-cursor::after{animation:none}}
@media(max-width:700px){.terminal-panel{top:70px;right:8px;width:calc(100vw - 16px);height:48vh;font-size:12.5px}.terminal-meta{display:none}.terminal-lines li{grid-template-columns:auto 1fr}.terminal-lines .t-src{display:none}}
.line-job-banner [hidden],.auto-submit-dialog [hidden],.terminal-panel [hidden]{display:none!important}
/* Terminal: docked beside the workspace on wide screens so it never covers the controls. */
@media(min-width:1100px){body.terminal-docked .workspace{margin-right:min(440px,34vw)}body.terminal-docked .terminal-panel{top:74px;right:0;bottom:var(--bottom-menu-height,72px);height:auto;width:min(440px,34vw);border-radius:0;border-width:0 0 0 1px;box-shadow:none}body.terminal-docked .line-job-banner{left:calc((100vw - min(440px,34vw)) / 2)}body.terminal-docked .bottom-menu{right:min(440px,34vw)}}
@media(max-width:1099px){.terminal-panel{top:auto;bottom:calc(var(--bottom-menu-height,72px) + 8px);height:min(58vh,520px)}}
@media(max-width:700px){.terminal-trigger{padding:0 11px;min-width:44px;justify-content:center}.terminal-trigger span:last-child{display:none}}
/* The selection tray sits under the workspace tabs; tabs below it move down while it is shown. */
@media(max-width:899px){.selection-tray{top:74px}body:has(#selection-tray:not([hidden])) .mobile-workspace-tabs{top:128px}body:has(#selection-tray:not([hidden])) .setting-tabs{top:179px}body:has(#selection-tray:not([hidden])) .word-method-navigation{top:243px}}
@media(max-width:700px){.selection-tray{top:62px}body:has(#selection-tray:not([hidden])) .mobile-workspace-tabs{top:116px}body:has(#selection-tray:not([hidden])) .setting-tabs{top:167px}body:has(#selection-tray:not([hidden])) .word-method-navigation{top:227px}}
.recipe-trigger{display:grid;gap:4px;width:100%;margin:0 0 14px;padding:14px 16px;border:2px solid #16241f;border-radius:14px;background:#16241f;color:#fff;text-align:left;cursor:pointer;box-shadow:0 4px 0 #0b1310}.recipe-trigger strong{font-size:16px}.recipe-trigger small{font-size:13px;color:#b7d8c7;font-weight:600}.recipe-trigger:active{transform:translateY(2px);box-shadow:0 2px 0 #0b1310}
.recipe-dialog{max-width:min(760px,calc(100vw - 24px))}.recipe-content{position:relative;display:grid;gap:10px}.recipe-dialog h2{margin:0;font-size:21px}.recipe-dialog .recipe-lead{margin:0;font-size:14px;color:#426657}.recipe-dialog textarea{min-height:240px;font:13.5px/1.6 ui-monospace,SFMono-Regular,Menlo,Consolas,"Zen Kaku Gothic New",monospace}
.recipe-preview{padding:12px 14px;border-radius:12px;background:#f2fbf5;border:2px solid #99ccb2;font-size:14px;line-height:1.6;color:#174d3b;white-space:pre-line}.recipe-preview.has-errors{background:#fff5ef;border-color:#e99975;color:#8b351d}.recipe-help summary{font-size:14px;font-weight:700;cursor:pointer}.recipe-help p{font-size:13px}
.recipe-actions{display:flex;gap:10px;flex-wrap:wrap}.recipe-actions button{min-height:50px;font-size:16px;font-weight:800;margin:0}.recipe-actions .primary-button{flex:1 1 220px}.recipe-actions .secondary-button{flex:0 1 180px}
.recipe-ai{display:grid;gap:8px;padding:14px;border-radius:14px;background:#f7f4ff;border:2px solid #cbbcf0}.recipe-ai h3{margin:0;font-size:16px;color:#3d2a7a}.recipe-ai label{margin:0;font-size:14px}.recipe-ai textarea{min-height:0}.recipe-ai-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.recipe-ai-row select{width:auto;min-height:46px;font-size:16px}.recipe-ai-row button{min-height:46px;margin:0;font-size:15px;font-weight:800;flex:1 1 180px}.recipe-ai-status{margin:0;font-size:14px;color:#3d2a7a}.recipe-ai-status:empty{display:none}
.recipe-dialog .dialog-close{width:44px;height:44px;right:-6px;top:-6px}.recipe-dialog textarea,.recipe-dialog select{font-size:16px}.recipe-dialog label{font-size:14px}.recipe-help summary{min-height:44px;display:flex;align-items:center}.recipe-text-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}.recipe-text-head .secondary-button{min-height:44px;margin:0;font-size:14px;font-weight:800}.recipe-file-help{margin:0;font-size:13px;line-height:1.5;color:#678074}.recipe-dialog #recipe-text.drag-over{border-color:#087f64;box-shadow:0 0 0 3px #bfe7d5}.recipe-actions{position:sticky;bottom:-25px;margin:0 -25px -25px;padding:12px 25px 25px;background:linear-gradient(#fff0,#fff 18px);z-index:2}
/* Recipe dialog: override the generic .app-dialog paragraph/status/button rules (higher specificity). */
.visually-hidden{position:absolute!important;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.recipe-dialog p.recipe-lead,.recipe-dialog p.recipe-file-help,.recipe-dialog .recipe-help p{font-size:14px;line-height:1.6;color:#426657}
.recipe-dialog p.recipe-ai-status{font-size:14px;line-height:1.6;color:#3d2a7a;margin:0;min-height:0}
.recipe-dialog .recipe-preview{margin:0;min-height:0;color:#174d3b;font-size:14px}.recipe-dialog .recipe-preview.has-errors{color:#8b351d}
.recipe-dialog .recipe-actions .primary-button,.recipe-dialog .recipe-ai-row .primary-button{margin:0}
#submission-result-store{display:flex;margin:16px 0 4px;text-decoration:none;min-height:48px}#submission-result-store[hidden]{display:none}
