/* Small, intentional motion; the existing editorial palette stays intact. */
html{background:white;scroll-behavior:smooth}
/* Paint above the viewport too: Safari can reveal this area under its collapsing chrome.
   The lower edge stays at the safe-area boundary, preserving the notch and hero layout. */
body:before{content:"";position:fixed;inset:-100lvh 0 auto;height:calc(100lvh + env(safe-area-inset-top,0px));background:white;z-index:100;pointer-events:none}
@supports not (height:100lvh){body:before{top:-100vh;height:calc(100vh + env(safe-area-inset-top,0px))}}
.fixed-frame{top:env(safe-area-inset-top,0px)}
.brand{font-size:21px;gap:7px;top:13px}
.brand .menu-icon{width:19px;height:19px;margin-left:2px}
.hero-slide{cursor:pointer}
.hero-try{background:#fffffff2;border:1px solid #ffffffb3;border-radius:22px;padding:9px 13px;font-size:14px;gap:6px;box-shadow:0 3px 12px #1724180b;transition:transform .25s,box-shadow .25s}
.hero-try svg{width:16px;height:16px}
.hero-bot{display:flex;align-items:center;gap:8px}
.hero-agent-avatar{width:27px;height:27px;border-radius:50%;object-fit:cover;flex:none;border:2px solid #fff}
.hero-proof .editor-result .after{position:relative;inset:auto}
.ready-post{position:absolute;right:6px;top:-14px;display:flex;align-items:center;gap:5px;padding:6px 9px;border-radius:18px;background:#fff;color:#244631;font-size:11px;font-weight:550;box-shadow:0 3px 12px #17241818;white-space:nowrap}
.ready-post svg{width:13px;height:13px}
.hero-proof .editor-result figcaption{font-size:11px;line-height:1.3;padding:7px 4px 5px;overflow-wrap:anywhere}
.request-thumbnails{display:flex;gap:4px;margin:0 0 8px}
.request-thumbnails img{width:calc(25% - 3px);aspect-ratio:1;object-fit:cover;border:2px solid white;border-radius:4px}
.hero-closing{position:static;margin:12px 0 0;color:#374033;font-size:13px;line-height:1.5;letter-spacing:-.1px;text-align:left;max-width:290px}
.offering .hero-slide[data-theme="director"] .offering-images img,.offering .hero-slide[data-theme="manager"] .offering-images img{height:112%;top:-12%;object-position:center bottom}
.offering .hero-slide[data-theme="editor"] .offering-images img{object-position:70% center}
.detail.profile-mode{background:#f7f8f14a;backdrop-filter:blur(22px) saturate(.85);-webkit-backdrop-filter:blur(22px) saturate(.85)}
.detail.profile-mode::backdrop{background:transparent;backdrop-filter:none}
.profile-mode .dialog-bg,.profile-mode .dialog-shade{display:none}
.profile-mode .dialog-scroll{overflow:hidden}
.profile-mode #profile-content{height:100%;display:flex;flex-direction:column;padding-top:48px}
.profile-track{display:flex;flex:1;min-height:0;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;scrollbar-width:none;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
.profile-track::-webkit-scrollbar{display:none}
.profile-page{flex:0 0 100%;min-width:0;overflow-y:auto;scroll-snap-align:start;scroll-snap-stop:always;overscroll-behavior-y:contain;padding:0 14px 10px}
.social-profile{width:100%;max-width:720px;margin:0 auto;background:#ffffffeb;border:1px solid #ffffffc9;border-radius:24px;animation:none;box-shadow:0 12px 40px #17251712;min-height:100%;touch-action:auto;display:flex;flex-direction:column}
.profile-cover{height:clamp(160px,29dvh,300px);flex:none}
.profile-body{padding:0 24px 20px;flex:1;display:flex;flex-direction:column;align-items:flex-start}
.profile-avatar{width:88px;height:88px;margin-top:-44px;border-width:4px}
.profile-handle{margin:8px 0 4px;font-size:13px}
.profile-body h2{font-size:30px;margin-bottom:12px}
.profile-bio{font-size:16px;line-height:1.5;max-width:none}
.profile-tags{gap:6px;margin:14px 0}
.profile-tags span{font-size:13px;padding:6px 10px}
.profile-note{font-size:12px;margin:0 0 12px}
.profile-work{display:flex;align-items:center;justify-content:flex-start;gap:16px;margin:auto 0 16px;padding-top:14px}
.profile-miniatures{display:flex;gap:8px}
.profile-miniatures button{position:relative;width:78px;height:98px;padding:3px;border:0;border-radius:4px;background:white;box-shadow:0 4px 14px #0002;overflow:hidden;transform:rotate(4deg)}
.profile-miniatures button:first-child{transform:rotate(-4deg)}
.profile-miniatures img{position:absolute;inset:3px;width:calc(100% - 6px);height:calc(100% - 6px);object-fit:cover;opacity:1;animation:none}
.profile-miniatures img+img{opacity:0}
.profile-miniatures .images-ready img{animation:mini-cycle 7s infinite}
.profile-miniatures .images-ready img+img{animation-delay:-3.5s}
.profile-start{width:fit-content;max-width:100%;display:flex;align-items:center;justify-content:center;gap:12px;background:#20271d;font-size:14px;min-height:38px;padding:9px 15px}
.channel-icons{display:flex;align-items:center;gap:7px}
.profile-start svg{width:18px;height:18px}
.profile-mode .profile-dots{flex:none;margin:0;padding:2px 0 max(8px,env(safe-area-inset-bottom));background:transparent}
.profile-mode .dialog-back{top:12px;left:15px;width:37px;height:37px;background:#ffffffd9;border-radius:50%}
.story-card,.remake-card{transition:opacity .6s,translate .6s}
.scroll-enter{opacity:0;translate:0 12px}
@keyframes mini-cycle{0%,42%{opacity:1}50%,92%{opacity:0}100%{opacity:1}}
@media(min-width:761px){.detail.profile-mode{left:var(--profile-left);top:var(--profile-top);right:auto;bottom:auto;width:var(--profile-width);height:var(--profile-height);border:1px solid #fff8;border-radius:24px}}
@media(hover:hover) and (pointer:fine){.hero-try:hover{transform:translateY(-2px);box-shadow:0 6px 18px #17241820}.profile-miniatures button,.profile-example,.profile-start{transition:translate .25s,filter .25s}.profile-miniatures button:hover,.profile-example:hover,.profile-start:hover{translate:0 -2px;filter:brightness(1.05)}.remake-picture img{transition:transform .6s}.remake-card:hover .remake-picture img{transform:scale(1.018)}}
@media(max-width:760px){.brand{font-size:20px;gap:6px}.profile-body{padding:0 20px 18px}.profile-page{padding:0 10px 8px}.profile-cover{height:clamp(190px,30dvh,280px)}.profile-avatar{width:82px;height:82px;margin-top:-41px}.profile-body h2{font-size:28px}.profile-tags span{font-size:12px}.hero-proof>.hero-bot{max-width:100%;font-size:12px;padding:8px 10px}.hero-agent-avatar{width:25px;height:25px}.offering .hero-slide[data-theme="editor"] .offering-images img{object-position:75% center}.offering .hero-slide[data-theme="director"] .hero-proof{height:265px}.hero-closing{font-size:11px}}
@media(max-width:760px){
 .profile-page{padding:0 12px 6px}
 .profile-cover{height:clamp(140px,24dvh,230px)}
 .profile-body{padding:0 18px 18px}
 .profile-avatar{width:72px;height:72px;margin-top:-36px;border-width:3px}
 .profile-handle{margin:5px 0 3px;font-size:12px}
 .profile-body h2{font-size:28px;line-height:1.12;margin-bottom:11px}
 .profile-bio{font-size:16px;line-height:1.4}
 .profile-tags{gap:5px;margin:10px 0}
 .profile-tags span{padding:5px 8px;font-size:12px}
 .profile-note{font-size:12px;line-height:1.35;margin-bottom:8px}
 .profile-work{margin:auto 0 14px;gap:12px;padding-top:12px}
 .profile-miniatures{gap:6px}
 .profile-miniatures button{width:60px;height:78px}
 .profile-example{font-size:14px;white-space:nowrap}
 .profile-start{padding:8px 13px;min-height:36px;font-size:14px;gap:10px}
 .profile-start svg{width:17px;height:17px}
 .profile-mode .profile-dots{padding-top:0;padding-bottom:max(4px,env(safe-area-inset-bottom))}
}
/* A single timeline: brief → artwork → reply → ready state → final pain points. */
.hero-slide .hero-request,.hero-slide .hero-output,.hero-slide .brand-result,.hero-slide .hero-bot,.hero-slide .ready-post,.hero-slide .hero-closing{animation:none!important;opacity:0}
.hero-slide.is-current.media-ready .hero-request{animation:fluid-rise .6s .15s both!important}
.hero-slide.is-current.media-ready .intro-outputs .hero-output,.hero-slide.is-current.media-ready .editor-result .after,.hero-slide.is-current.media-ready .direction-deck .hero-output,.hero-slide.is-current.media-ready .brand-result{animation:fluid-rise .65s .8s both!important}
.hero-slide.is-current.media-ready .brand-result .hero-output{opacity:1}
.hero-slide.is-current.media-ready .intro-outputs .output-two,.hero-slide.is-current.media-ready .direction-deck .direction-two{animation-delay:1s!important}
.hero-slide.is-current.media-ready .direction-deck .direction-three{animation-delay:1.2s!important}
.hero-slide.is-current.media-ready .hero-bot{animation:fluid-rise .5s 1.95s both!important}
.hero-slide.is-current.media-ready .ready-post{animation:fluid-copy .4s 2.5s both!important}
.hero-slide.is-current.media-ready .hero-closing{animation:fluid-copy .5s 3s both!important}
.hero-slide.media-error .ready-post{display:none}
@media(min-width:761px) and (max-height:700px){.hero-closing{font-size:11px;line-height:1.35;margin-top:8px}.profile-cover{height:150px}.profile-miniatures button{width:60px;height:78px}}
@media(max-width:360px){.profile-work{gap:8px}.profile-miniatures button{width:51px;height:66px}.profile-body{padding-left:14px;padding-right:14px}.profile-example{font-size:13px}}
@media(prefers-reduced-motion:reduce){.offering .hero-slide.is-current.media-ready .hero-proof *,.offering .hero-slide.is-current.media-ready .hero-closing{animation:none!important;opacity:1}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}.scroll-enter{opacity:1;translate:none}.profile-miniatures img:last-child{display:none}}

/* Desktop panels are independent, and remain inside their own columns. */
@media(min-width:761px){
 #profile-dialog{position:fixed;z-index:24;border:0;border-radius:24px;animation:none}
 #detail.story-mode{position:fixed;top:0;bottom:0;z-index:25}
 #profile-dialog #profile-content{padding-top:54px}
 #profile-dialog .social-profile{width:min(100%,520px);min-height:0;aspect-ratio:3/4;margin:0 auto;box-shadow:0 12px 32px #17251712}
 #profile-dialog .profile-cover{height:auto;aspect-ratio:5/2}
 #profile-dialog .profile-page{padding:0 24px 14px}
 #profile-dialog .profile-body{flex:1;padding:0 24px 20px}
 #profile-dialog .profile-work{margin-top:auto}
 #profile-dialog .profile-bio{font-size:16px}
 #profile-dialog .profile-dots{padding-bottom:10px}
}

/* Keep the approved phone layout; tune the larger profile surface separately. */
.profile-card-close,.profile-cta-desktop{display:none}
@media(min-width:761px){
 #profile-back{display:none}
 #profile-dialog #profile-content{padding-top:42px}
 #profile-dialog .profile-page{display:flex;flex-direction:column;padding:14px 24px;overflow-y:auto;min-height:0;scrollbar-width:thin;scrollbar-color:#69726055 transparent;-webkit-overflow-scrolling:touch}
 #profile-dialog .social-profile{position:relative;flex:none;margin:auto;aspect-ratio:auto;min-height:min(693px,calc(100dvh - 150px))}
 #profile-dialog .profile-card-close{display:grid;place-items:center;position:absolute;top:10px;right:10px;z-index:2;width:36px;height:36px;padding:7px;background:#18221935;color:white;border:0;border-radius:50%;backdrop-filter:blur(5px);cursor:pointer}
 .profile-card-close svg{width:22px;height:22px;filter:drop-shadow(0 1px 2px #0006)}
 .profile-card-close:focus-visible{outline:2px solid white;outline-offset:2px}
 #profile-dialog .profile-work{flex-direction:column;align-items:flex-start;gap:7px;margin-bottom:20px;padding-top:12px}
 #profile-dialog .profile-example{padding:0 0 4px}
 #profile-dialog .profile-miniatures{gap:12px}
 #profile-dialog .profile-miniatures button{width:88px;height:112px}
 #profile-dialog .profile-start{align-self:center;padding:8px 15px;min-height:36px;gap:10px}
 #profile-dialog .profile-cta-mobile{display:none}
 #profile-dialog .profile-cta-desktop{display:inline}
}
@media(min-width:761px) and (max-height:850px){
 #profile-dialog .profile-cover{height:clamp(110px,18dvh,153px);aspect-ratio:auto}
 #profile-dialog .profile-body{padding:0 22px 16px}
 #profile-dialog .profile-avatar{width:72px;height:72px;margin-top:-36px}
 #profile-dialog .profile-body h2{font-size:27px;margin-bottom:9px}
 #profile-dialog .profile-handle{margin:6px 0 4px}
 #profile-dialog .profile-bio{line-height:1.4}
 #profile-dialog .profile-tags{margin:10px 0;gap:5px}
 #profile-dialog .profile-note{margin-bottom:8px}
 #profile-dialog .profile-work{padding-top:8px;margin-bottom:14px}
 #profile-dialog .profile-miniatures button{width:82px;height:104px}
}

/* Scale the same portrait card to the available frame on laptops and tablets. */
.profile-card-surface{display:contents}
#image-close svg,.profile-card-close svg{stroke-width:2;transform:none;flex:none}
@media(min-width:761px){
 #profile-dialog .social-profile{width:min(100%,520px,calc((100dvh - 140px)*.75));aspect-ratio:3/4;min-height:0;display:block}
 #profile-dialog .profile-card-surface{display:flex;flex-direction:column;height:100%;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#69726055 transparent;-webkit-overflow-scrolling:touch}
 #profile-dialog .profile-cover{height:auto;aspect-ratio:5/2;flex-shrink:0}
 #profile-dialog .profile-body{flex:1 0 auto}
 #profile-dialog .profile-card-close{background:#17201999;box-shadow:0 1px 5px #0002;backdrop-filter:none}
}
/* Match the card controls on phones without changing its outer geometry. */
@media(max-width:760px){
 #profile-back{display:none}
 #profile-dialog .social-profile{position:relative}
 #profile-dialog .profile-card-close{display:grid;place-items:center;position:absolute;top:10px;right:10px;z-index:2;width:36px;height:36px;padding:7px;border:0;border-radius:50%;background:#17201999;color:white;box-shadow:0 1px 5px #0002;cursor:pointer}
 #profile-dialog .profile-card-close svg{width:22px;height:22px}
 #profile-dialog .profile-work{flex-direction:column;align-items:flex-start;gap:7px}
 #profile-dialog .profile-example{padding:0 0 4px}
 #profile-dialog .profile-miniatures{gap:10px}
 #profile-dialog .profile-miniatures button{width:68px;height:88px}
 #profile-dialog .profile-start{align-self:center}
 #profile-dialog .profile-cta-mobile{display:none}
 #profile-dialog .profile-cta-desktop{display:inline}
}

/* Keep the established hero geometry, with the action in its existing bottom rail. */
.hero-slide>.hero-try{position:absolute;right:6%;bottom:16px;z-index:6;margin:0;min-height:42px;padding:9px 15px}
.offering .carousel-controls{right:auto;max-width:55%}
.offering .hero-closing{font-size:clamp(13px,2.7cqw,16px);line-height:1.45;font-weight:500;color:#263425;max-width:90%;margin-top:14px;text-shadow:0 1px 8px #fff9}
.hero-agent-avatar{width:36px;height:36px}
.hero-proof .hero-output img{width:auto;height:auto;max-width:100%;aspect-ratio:auto;object-fit:contain;margin-inline:auto}
.story-card .story-image>img{transition:none}
.story-card .story-image:hover>img.active{transform:none}
.story-open{display:block}
.story-open .story-agent{position:absolute;top:11px;left:11px;width:38px;height:38px;border:2px solid white;border-radius:50%;overflow:hidden;box-shadow:0 3px 12px #0002;background:white}
.story-open .story-agent img{position:static;width:100%;height:100%;opacity:1;object-fit:cover;transform:none}
.story-open-arrow{position:absolute;right:11px;bottom:11px;width:32px;height:32px;display:grid;place-items:center;border-radius:50%;background:#fffffff0;color:#253924;box-shadow:0 3px 12px #0001}
.story-open-arrow svg{width:19px;height:19px}
.story-open:focus-visible{outline:3px solid #2349df;outline-offset:-4px;border-radius:inherit}
.remake-copy-card{display:block;width:100%;padding:0;border:0;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer;border-radius:19px}
.remake-copy-card:focus-visible{outline:2px solid #2349df;outline-offset:5px}
.remake-copy-card .remake-picture{display:block}
.remake-caption{display:flex;align-items:center;gap:8px;margin-top:11px}
.remake-label{min-width:0;flex:1}
.remake-title{display:block;font-size:16px;font-weight:500;margin-bottom:4px}
.remake-copy-icon{display:grid;place-items:center;width:32px;height:36px;flex:none;color:#35452e;transition:color .2s,transform .2s}
.remake-copy-icon svg{width:20px;height:20px}
.remake-copy-card.is-copied .remake-copy-icon{color:#2349df;transform:scale(1.12)}
.remake-copy-card code{user-select:none}
.story-mode .chat-top .avatar{width:46px;height:46px}
.story-mode .message.agent>.avatar{width:30px;height:30px;background:white;border:2px solid white}
.story-mode .message.agent>.avatar img{width:100%;height:100%}
.story-mode .grouped-message .bubble{max-width:min(360px,calc(100% - 38px))}
.story-mode .message-part+.message-part{margin-top:8px}
.story-mode .attachment-card{width:fit-content;max-width:100%;padding:5px;background:white;border-radius:5px;box-shadow:0 3px 10px #23332614}
.story-mode .attachment-card .chat-image-button{display:block;width:100%;max-width:220px}
.story-mode .attachment-card .chat-image-button img{display:block;width:auto;max-width:100%;height:auto;max-height:270px;margin:auto}
.story-mode .grouped-message .reference-bundle{max-width:270px;padding:5px;background:white;border-radius:5px}
.story-mode .grouped-message .reference-bundle small{display:block;color:#53604a;font-size:12px;padding-top:4px}
.story-mode .part-image+.part-text,.story-mode .part-markup+.part-text,.story-mode .part-text+.part-image{margin-top:7px}
.story-mode .bubble p{white-space:pre-line}
@media(max-width:760px){
 .hero-agent-avatar{width:33px;height:33px}
 .offering .hero-closing{font-size:13px;max-width:95%}
 .story-open .story-agent{width:32px;height:32px;top:9px;left:9px}
 .story-open-arrow{width:28px;height:28px;right:9px;bottom:9px}
 .remake-title{font-size:14px}
 .remake-caption{gap:3px}
 .remake-copy-icon{width:26px}
 .story-mode .chat-top .avatar{width:42px;height:42px}
 .story-mode .attachment-card .chat-image-button{max-width:185px}
 .story-mode .attachment-card .chat-image-button img{max-height:225px}
}

/* Separate floating attachments stay visually connected to their sender. */
.story-mode .grouped-message{margin:24px 0;align-items:flex-start}
.story-mode .grouped-message>.avatar{flex:none;margin-top:9px}
.story-mode .turn-content{display:flex;flex-direction:column;align-items:flex-start;width:min(360px,76%);min-width:0}
.story-mode .user .turn-content{align-items:flex-end}
.story-mode .grouped-message .bubble{width:fit-content;max-width:100%;position:relative}
.story-mode .turn-attachments{position:relative;z-index:1;max-width:100%;width:fit-content}
.story-mode .agent .bubble:has(+.turn-attachments){padding-bottom:19px}
.story-mode .agent .bubble+.turn-attachments{margin-top:-8px;margin-left:5px}
.story-mode .user .turn-attachments{margin-right:5px;margin-bottom:5px}
.story-mode .attachment-card,.story-mode .grouped-message .reference-bundle{box-shadow:0 9px 24px #23332625;transform:rotate(-1.2deg);transform-origin:top center}
.story-mode .user .attachment-card,.story-mode .user .reference-bundle{transform:rotate(1.2deg)}
.story-mode .turn-attachments .message-part+.message-part{margin-top:12px}
.story-mode .voice-row{min-width:0;max-width:100%}
.story-mode .waveform{min-width:0;overflow:hidden;flex:1}
.story-mode .play-voice{flex:none}
.story-mode .reply-bundle{min-width:0;max-width:100%}
.story-mode .reply-bundle>div{min-width:0;overflow-wrap:anywhere}
@media(max-width:760px){
 .story-mode .grouped-message{margin:22px 0;padding-right:12px}
 .story-mode .grouped-message.user{padding-left:12px;padding-right:0}
 .story-mode .turn-content{width:78%}
 .story-mode .attachment-card .chat-image-button{max-width:185px}
}

/* Agent identity lives with the action; the reply stays visually quiet. */
.hero-slide>.hero-try{gap:8px;padding:4px 5px 4px 15px;min-height:44px;border-radius:28px;bottom:15px}
.hero-try .hero-cta-avatar{display:block;width:38px;height:38px;object-fit:cover;border-radius:50%;border:2px solid white;flex:none;margin-left:1px}
.hero-proof>.hero-bot{min-height:40px;position:relative}
.hero-proof>.hero-bot:after{content:"";position:absolute;bottom:-6px;right:19px;border-top:7px solid #e7f6a2;border-left:7px solid transparent}

/* Size the entire print, not just its image. Keep the same white edge on every side. */
.hero-proof{--print-height:205px}
.hero-proof .hero-output{box-sizing:border-box;max-width:calc(var(--print-height)*var(--art-ratio) + 10px);max-height:none;padding:5px;background:white;overflow:hidden}
.hero-proof .hero-output img{display:block;width:100%;height:auto;max-width:100%;max-height:none;aspect-ratio:auto;margin:0;border-radius:1px}
.hero-proof .hero-output figcaption{padding:7px 3px 4px;line-height:1.25;overflow-wrap:anywhere}
.hero-proof>.direction-deck{container-type:size;align-items:flex-end;padding-top:4px;padding-bottom:5px}
.hero-proof .direction-deck .hero-output{flex:none;width:min(30%,calc((100cqh - 39px)*var(--art-ratio) + 10px));max-height:none}
.hero-proof>.editor-result,.hero-proof>.brand-result{max-width:calc(var(--print-height)*.8 + 10px)}
.hero-proof>.brand-result{max-width:calc(var(--print-height)*.75 + 10px)}

/* A light backing preserves contrast over both bright walls and dark hair. */
.offering .hero-closing{font-weight:650;color:#1c3024;text-shadow:none;line-height:1.45;max-width:95%}
.offering .hero-closing .hero-point{display:table;max-width:100%;padding:1px 6px;margin-left:-6px;border-radius:4px;background:#ffffffc9;opacity:0;clip-path:inset(0 100% 0 0)}
.offering .hero-slide.is-current.media-ready .hero-closing{animation:none!important;opacity:1}
.offering .hero-slide.is-current.media-ready .hero-point{animation:hero-type-point .7s steps(var(--letters),end) calc(3s + var(--point)*.9s) both}
@keyframes hero-type-point{from{opacity:1;clip-path:inset(0 100% 0 0)}to{opacity:1;clip-path:inset(0 0 0 0)}}
@media(max-width:760px){.hero-proof{--print-height:165px}.hero-try .hero-cta-avatar{width:36px;height:36px}.offering .hero-closing{font-size:13px}}
@media(min-width:761px) and (max-height:700px){.hero-proof{--print-height:130px}.offering .hero-closing{font-size:13px;line-height:1.35}}
@media(prefers-reduced-motion:reduce){.offering .hero-slide .hero-closing .hero-point{animation:none!important;opacity:1;clip-path:none}}

/* Gallery affordances: quiet white arrow above, agent portrait below. */
.story-open .story-agent{top:auto;left:auto;right:11px;bottom:11px}
.story-open-arrow{top:10px;right:10px;bottom:auto;background:transparent;color:white;box-shadow:none;filter:drop-shadow(0 1px 3px #0008)}
.story-open-arrow svg{width:22px;height:22px;transform:rotate(-45deg);stroke-width:2}
/* Captions wrap to the print width, so they cannot stretch its white frame. */
.story-mode .turn-attachments{max-width:calc(100% - 12px)}
.story-mode .turn-attachments .attachment-card{width:220px;max-width:100%;box-sizing:border-box;padding:5px}
.story-mode .turn-attachments .attachment-card .chat-image-button{width:100%;max-width:none}
.story-mode .turn-attachments .attachment-card .chat-image-button img{width:100%;height:auto;max-height:none;max-width:100%;margin:0;object-fit:contain}
.story-mode .turn-attachments .image-caption{overflow-wrap:anywhere}
.story-mode .agent .turn-attachments{margin-left:12px}
.story-mode .agent .bubble+.turn-attachments{margin-left:12px;margin-top:-6px}
.story-mode .agent .attachment-card,.story-mode .agent .reference-bundle{transform:rotate(-2deg);transform-origin:top center}
.story-mode .user .attachment-card,.story-mode .user .reference-bundle{transform:rotate(2deg);transform-origin:top center}
@media(max-width:760px){
 .story-open .story-agent{top:auto;left:auto;right:9px;bottom:9px}
 .story-open-arrow{top:8px;right:8px;bottom:auto}
 .story-mode .turn-attachments .attachment-card{width:185px}
}

/* Solid top strip gives Safari an opaque edge; the SVG below retains the logo notch.
   Keep the original 44px artwork and logo coordinates, outside the 10px strip. */
@media(max-width:760px){
 .fixed-frame{height:10px;background:#fff;overflow:visible}
 .fixed-frame .frame-shape{height:44px}
}

/* One shared destination for all agent entry points. */
.connect-panel{width:min(580px,calc(100% - 32px));padding:32px}
.connect-panel h2{margin:0 0 28px}
.connect-channels{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}
.connect-channel{min-width:0;text-align:center}
.connect-channel h3{font-size:18px;font-weight:550;margin:0 0 12px}
.connect-channel img{display:block;width:100%;height:auto;aspect-ratio:1;object-fit:contain;background:#fff;padding:10px;border-radius:14px}
.channel-link{display:flex;align-items:center;justify-content:center;gap:7px;margin-top:14px;padding:12px 8px;border-radius:24px;background:#187344;color:white;font-size:14px;font-weight:550;transition:transform .2s,filter .2s}
.telegram .channel-link{background:#2855c7}
.channel-link svg{width:16px;height:16px;flex:none}
.channel-link:hover{filter:brightness(1.08);transform:translateY(-2px)}
@media(max-width:760px){.connect-panel{padding:24px 20px}.connect-panel h2{font-size:30px}.connect-channels{gap:14px}.connect-channel h3{font-size:16px}.connect-channel img{padding:7px}.channel-link{font-size:13px}}

/* Compact capability copy; outer profile and artwork proportions stay unchanged. */
#profile-dialog .profile-body h2{margin-bottom:8px}
#profile-dialog .profile-bio{margin:0;line-height:1.35}
#profile-dialog .profile-handle{overflow-wrap:anywhere}
#profile-dialog .profile-tags{margin:9px 0;gap:5px}
.profile-skills{width:100%;margin:0 0 8px}
.profile-skills h3{font-size:13px;font-weight:650;margin:0 0 5px}
.profile-skills p{font-size:13px;line-height:1.4;margin:0 0 5px;color:#535b50}
.profile-skills strong{font-weight:650;color:#252d23}
#profile-dialog .profile-work{padding-top:6px;margin-bottom:12px}
@media(max-width:760px){
 #profile-dialog .social-profile{height:100%;min-height:0}
 #profile-dialog .profile-card-surface{display:flex;flex-direction:column;height:100%;overflow-y:auto;overscroll-behavior-y:contain;scrollbar-width:thin}
 #profile-dialog .profile-body{flex:1 0 auto}
}

/* Reclaim space for the profile action without resizing the card. */
#profile-dialog .profile-body h2{margin-bottom:6px}
#profile-dialog .profile-tags{margin:7px 0}
#profile-dialog .profile-tags span{padding-top:4px;padding-bottom:4px}
#profile-dialog .profile-skills{margin-bottom:3px}
#profile-dialog .profile-skills p{margin-bottom:4px;line-height:1.3}
#profile-dialog .profile-work{margin-top:0;margin-bottom:8px;padding-top:4px;gap:5px}
#profile-dialog .profile-start{position:sticky;bottom:0;z-index:1;flex-shrink:0;box-shadow:0 0 0 6px #fff}
