/* Approved social calendar and scheduled creation UI; artwork styles are untouched. */
:root { --studio-purple:#783fc3; --studio-green:#27804f; --studio-green-border:#2c9656; --studio-chat-bg:radial-gradient(ellipse 95% 55% at 0% 0%,#e4d5f5 0%,transparent 85%),radial-gradient(ellipse 90% 55% at 105% 85%,#e9dcf8 0%,transparent 83%),#fcfbfe; }
html[data-chat-app-view="schedule"] body { background:#fff; }
.social-plan-eyebrow,.social-plan-context:empty { display:none; }
.social-plan-platforms { display:flex; gap:18px; justify-content:center; margin:14px 0 24px; }
.social-plan-platforms > span { width:52px; height:52px; }
.social-plan-platforms svg { width:34px; height:34px; display:block; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
#day-schedule .day-month { display:none; }
.social-plan-header { text-align:center; }
html.has-chat-app .day-list { row-gap:16px; }
/* Keep an open date and all of its materials inside one continuous frame.
   An inset stroke preserves the width used by the portaled, pinned heading. */
html.has-chat-app .day-schedule .day-item.day-is-expanded {
  border-radius:6px;
  background:var(--studio-chat-bg);
  box-shadow:inset 0 0 0 2px var(--studio-green-border);
}
html.has-chat-app .day-schedule .day-item.day-is-expanded > .day-body {
  padding:16px 12px 14px;
  box-sizing:border-box;
}
html.has-chat-app .day-heading[data-state][aria-expanded="true"]:not(.day-is-pinned) {
  border-radius:6px 6px 0 0;
}
@media(max-width:370px) {
  html.has-chat-app .day-schedule .day-item.day-is-expanded > .day-body { padding-inline:8px; }
}
/* Native taps on calendar controls must survive fast consecutive choices. */
.day-heading, .day-actions button, .scheduled-day-bar button { touch-action:manipulation; }
html.has-chat-app .day-heading[data-state] { border:2px solid var(--studio-green-border); border-radius:6px; background:#fff; color:#202723; padding:0 10px 0 0; min-height:78px; cursor:pointer; position:relative; }
html.has-chat-app .day-heading[data-state][data-state="ready"],html.has-chat-app .day-heading[data-state][data-state="published"] { background:#edf8ef; color:#202723; }
html.has-chat-app .day-heading[data-state] .day-number { background:var(--studio-green); color:#fff; border-radius:3px 0 0 3px; min-width:65px; align-self:stretch; display:grid; place-items:center; font:900 38px/1 system-ui; padding:14px 8px; }
.day-heading .day-summary { align-self:stretch; align-items:center; gap:10px; }
.day-heading .day-label { position:relative; }
html.has-chat-app .day-heading[data-state] .day-date { font:750 20px/1.2 system-ui; text-transform:capitalize; }
.day-heading .day-full-date { display:block; font:11px/1.5 system-ui; color:#66746b; }
html.has-chat-app .day-heading[data-state] .day-today-kicker { background:#fff; color:var(--studio-purple); font:750 8px/1.4 system-ui; padding:2px 5px; border-radius:3px; position:absolute; left:-64px; bottom:-14px; transform:rotate(-8deg); box-shadow:0 1px 4px #17321c22; }
html.has-chat-app .day-heading[data-state] .day-stat { display:inline-flex; align-items:center; justify-content:center; gap:4px; padding:7px 6px; min-width:36px; border:1px solid #dce6dd; border-radius:4px; background:#fff; color:#66756a; font:650 12px/1 system-ui; cursor:pointer; }
html.has-chat-app .day-heading[data-state] .day-stat[data-empty="false"] { background:var(--studio-green); color:white; }
html.has-chat-app .day-heading[data-state] .day-stats { gap:5px; }
html.has-chat-app .day-heading[data-state] .day-stat-icon { width:16px; height:18px; }
html.has-chat-app .day-heading[data-state][data-state="published"]:after,
html.has-chat-app .day-heading[data-state][data-state="overdue"]:after { content:attr(data-publication-label); position:absolute; right:14px; top:-10px; transform:rotate(5deg); background:var(--studio-green); color:white; font:700 9px/1 system-ui; padding:5px 7px; border-radius:3px; }
html.has-chat-app .day-heading[data-state][data-state="overdue"]:after { background:#c53b45; }
html.has-chat-app .day-heading[data-state].day-is-pinned:after { top:5px; }
.day-actions .day-action,.day-preview-publish { background:var(--studio-purple); color:#fff; border:1px solid var(--studio-purple); border-radius:5px; font-size:12px; padding:10px 13px; min-height:38px; width:auto; flex:initial; }
html.has-chat-app .day-schedule .day-actions .day-action,
html.has-chat-app .day-schedule .day-actions .day-action:not(:disabled):hover { background:#fff; color:var(--studio-purple); border-color:#ded7e8; }
html.has-chat-app .day-schedule .day-actions .day-action[aria-pressed="true"],
html.has-chat-app .day-schedule .day-actions .day-action[aria-pressed="true"]:not(:disabled):hover { background:var(--studio-purple); border-color:var(--studio-purple); color:#fff; }
html.has-chat-app .day-schedule .day-action[data-kind="story"]::before { mask-image:var(--studio-icon-story); -webkit-mask-image:var(--studio-icon-story); }
html.has-chat-app .day-schedule .day-action[data-kind="post"]::before { mask-image:var(--studio-icon-post); -webkit-mask-image:var(--studio-icon-post); }
html.has-chat-app .day-schedule .day-action[data-kind="video"]::before { mask-image:var(--studio-icon-reel); -webkit-mask-image:var(--studio-icon-reel); }
.day-story-preview { position:relative; border:2px solid #e0d8eb; border-radius:6px; padding:10px; }
.day-story-preview.is-published { border-color:var(--studio-green); }
.day-story-preview.is-published .day-preview-publish { background:var(--studio-green); border-color:var(--studio-green); color:white; }
.material-published-badge { position:absolute; right:10px; top:7px; background:var(--studio-green); color:#fff; transform:rotate(7deg); border-radius:4px; padding:5px 8px; z-index:1; font:700 11px/1.2 system-ui; }
.publication-hint { font-size:12px; color:#647067; }
.scheduled-chat.brand-chat__dialog { background:var(--studio-chat-bg); }
.scheduled-chat .brand-chat__messages,.scheduled-chat .brand-chat__composer,.scheduled-chat .chat-app__header { background:transparent; }
.chat-app__header.is-scheduled { display:block; padding:12px 14px; background:transparent; }
.scheduled-day-bar { display:flex; align-items:stretch; border:2px solid var(--studio-green-border); background:#fff; border-radius:6px; min-height:76px; width:100%; }
.scheduled-day-date { border:0; padding:0; background:transparent; display:flex; align-items:stretch; flex:1; min-width:0; text-align:left; color:#202723; cursor:pointer; }
.scheduled-day-number { position:relative; background:var(--studio-green); color:#fff; font:900 40px/1 system-ui; width:66px; flex:none; display:grid; place-items:center; border-radius:3px 0 0 3px; }
.scheduled-today { position:absolute; bottom:3px; right:-5px; transform:rotate(-9deg); color:var(--studio-purple); background:#fff; border-radius:3px; padding:3px 5px; font:800 8px/1 system-ui; }
.scheduled-day-words { display:flex; flex-direction:column; justify-content:center; padding:9px; min-width:0; }
.scheduled-day-words strong { font:750 20px/1.25 system-ui; text-transform:capitalize; }
.scheduled-day-words small { color:#748077; font:10px/1.6 system-ui; }
.scheduled-formats { display:flex; gap:4px; align-items:center; padding:6px; }
.scheduled-format { border:1px solid #e1dce9; border-radius:4px; background:white; display:flex; gap:3px; align-items:center; justify-content:center; min-width:33px; height:36px; padding:4px; color:#6d6575; cursor:pointer; }
.scheduled-format[aria-pressed="true"] { background:var(--studio-purple); border-color:var(--studio-purple); color:#fff; }
.scheduled-format-icon { font:22px/1 system-ui; }.scheduled-format-count { font:600 11px/1 system-ui; }
.scheduled-chat .brand-chat__message { max-width:100%; }
.scheduled-chat:has(.chat-studio[data-start="true"]) .brand-chat__messages { display:none; }
.scheduled-chat .chat-studio[data-start="true"] { min-height:calc(100dvh - 180px); display:flex; justify-content:center; align-items:center; }
.chat-studio[data-start="true"] .chat-studio__surface { width:100%; }
.studio-start { width:100%; max-width:540px; margin:0 auto; padding:20px 12px; text-align:center; box-sizing:border-box; }
.studio-start-heading { font:650 clamp(25px,5vw,34px)/1.2 system-ui; letter-spacing:-.8px; margin:0 auto 25px; max-width:420px; color:#241f2a; }
.studio-start-actions { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; }
.studio-start-button { background:#fff; border:1px solid #ded7e6; border-radius:6px; padding:14px 3px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:9px; min-height:85px; color:#312938; font:550 11px/1.2 system-ui; box-shadow:0 3px 14px #32234605; cursor:pointer; }
.studio-start-button svg { width:28px; height:28px; }
.studio-products-caption { font:500 11px/1.4 system-ui; color:#7d7387; margin:16px 0 7px; }
.studio-start-actions + .studio-industry-rail { margin-top:24px; }
.studio-industry-rail.is-static { justify-content:center; cursor:default; }
.studio-industry-rail.is-tap-choice { touch-action:pan-x pan-y; }
.studio-industry-rail.is-tap-choice .studio-industry-choice { min-height:44px; padding:10px 12px; font-size:13px; }
.studio-products-rail.is-static:not(.is-single) .studio-product-choice { max-width:calc(50% - 4px); }
.studio-product-choice { max-width:min(260px,85%); overflow:hidden; text-overflow:ellipsis; }
.studio-industry-rail { position:relative; display:flex; gap:6px; overflow-x:auto; scrollbar-width:none; padding:3px 0; touch-action:pan-y; overscroll-behavior-x:contain; user-select:none; -webkit-user-select:none; cursor:grab; }
.studio-industry-choice { min-width:48px; box-sizing:border-box; white-space:nowrap; flex:none; background:#fff; color:#776b81; border:1px solid #e1dae8; border-radius:4px; font:500 10px/1.3 system-ui; padding:7px 9px; cursor:pointer; }
.studio-industry-rail.is-dragging,.studio-industry-rail.is-dragging .studio-industry-choice { cursor:grabbing; }
.studio-industry-rail::-webkit-scrollbar { display:none; }
.studio-industry-choice[aria-pressed="true"] { background:var(--studio-purple); color:white; border-color:var(--studio-purple); }
.chat-studio[data-video="true"] .chat-studio__video { width:100%; max-width:560px; margin:0 auto; border:0; box-shadow:none; background:transparent; padding:22px 12px; }
.chat-studio[data-video="true"] .chat-studio__video-heading { font:650 26px/1.2 system-ui; text-align:center; letter-spacing:-.5px; margin:8px 0 22px; }
.chat-studio[data-video="true"] .chat-studio__video-fields { display:block; }
.chat-studio[data-video="true"] .chat-studio__video-square,.chat-studio[data-video="true"] .chat-studio__video-source-info { display:none; }
.studio-bank-strip { display:flex; gap:10px; overflow-x:auto; padding:4px 2px 12px; scrollbar-width:thin; }
.studio-bank-photo { flex:none; width:104px; height:136px; border:2px solid #dfd6e9; padding:0; border-radius:5px; overflow:hidden; background:white; cursor:pointer; }
.studio-bank-photo img { width:100%; height:100%; object-fit:cover; }
.studio-bank-photo:focus { border-color:var(--studio-purple); outline:2px solid var(--studio-purple); }
.chat-studio[data-video="true"] .chat-studio__video-options { display:flex; flex-wrap:nowrap; align-items:center; justify-content:center; gap:10px; margin:10px 0 22px; }
.chat-studio__video-durations,.studio-sound { display:flex; gap:4px; }
.chat-studio[data-video="true"] .chat-studio__video-durations button,.studio-sound button,.studio-resolution { border:1px solid #dcd4e5; background:white; border-radius:4px; min-width:0; width:auto; min-height:32px; height:32px; padding:6px 9px; font:600 11px/18px system-ui; box-sizing:border-box; }
.studio-sound button { display:grid; place-items:center; padding:5px 8px; }.studio-sound svg { width:18px; height:18px; }
.chat-studio[data-video="true"] button[aria-pressed="true"] { background:var(--studio-purple); color:white; border-color:var(--studio-purple); }
.chat-studio[data-video="true"] .chat-studio__video-plan-label { font:600 13px/1.5 system-ui; }
.chat-studio[data-video="true"] .chat-studio__video-plan { background:white; border:1px solid #ddd5e6; border-radius:6px; font:400 14px/1.6 system-ui; min-height:140px; }
.chat-studio[data-video="true"] .chat-studio__button { border-radius:5px; width:auto; min-height:36px; padding:9px 12px; font-size:12px; }
.chat-studio__video-actions { flex-wrap:wrap; }
.scheduled-chat .chat-studio__button--primary { background:var(--studio-purple); color:white; }
@media(max-width:370px) { .scheduled-day-number { width:51px; font-size:35px; }.scheduled-day-words strong {font-size:17px;}.scheduled-day-words {padding:6px;}.scheduled-day-words small{font-size:9px;}.scheduled-format{min-width:29px}.scheduled-formats{gap:3px;padding:4px}html.has-chat-app .day-heading[data-state] .day-date{font-size:16px}html.has-chat-app .day-heading[data-state] .day-number{min-width:46px;font-size:32px}html.has-chat-app .day-heading[data-state] .day-stat{min-width:29px;padding:6px 3px}.day-heading .day-full-date{font-size:9px} }
@media(max-width:350px) {
  .scheduled-day-number { width:48px; }
  .scheduled-day-words strong { font-size:16px; }
  .scheduled-formats { flex:none; gap:2px; padding:4px 3px; }
  .scheduled-format { padding:4px 3px; }
}
[hidden] { display:none!important; }
.studio-composer-suppressed { display:none!important; }

html.has-chat-app .day-heading[data-state] .day-date::after { content:none; }
html.has-chat-app .day-heading[data-state] .day-number { width:58px; flex:0 0 58px; height:auto; }
html.has-chat-app .day-heading[data-state] .day-label {min-width:0;}
html.has-chat-app .day-heading[data-state] .day-summary {flex:1;min-width:0;}
html.has-chat-app .day-heading[data-state] .day-chevron {display:none;}
html.has-chat-app .day-heading[data-state] .day-date {font-size:18px;}
.scheduled-chat:has(.chat-studio[data-start="true"]) .brand-chat__history > :not(.chat-studio) {display:none;}
@media(max-width:370px) {html.has-chat-app .day-heading[data-state] .day-date {font-size:15px;} html.has-chat-app .day-heading[data-state] .day-number{width:48px;flex-basis:48px;} html.has-chat-app .day-heading[data-state] .day-today-kicker{left:-54px;}}
html.has-chat-app .day-downloads { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; padding:14px 0; }
.day-material-card { position:relative; min-width:0; border:2px solid #e3ddec; padding:7px; border-radius:6px; background:white; }
.day-material-card.is-published {border-color:var(--studio-green);}
.day-material-thumbnail {display:block; width:100%; aspect-ratio:9/16; object-fit:contain; background:#f5f3f7; border-radius:3px; cursor:pointer;}
html.has-chat-app .day-material-card .day-download {display:block; width:fit-content; min-width:0; min-height:34px; margin:9px auto 2px; padding:8px 9px; background:var(--studio-purple); color:white; border:1px solid var(--studio-purple); border-radius:5px; font:600 10px/1.3 system-ui; }
html.has-chat-app .day-material-card.is-published .day-download {background:var(--studio-green); border-color:var(--studio-green); color:#fff;}
.day-material-card .day-material-family {font-size:9px; opacity:.8; margin-top:4px;}
@media(min-width:700px){html.has-chat-app .day-downloads{grid-template-columns:repeat(3,minmax(0,1fr));}}
.scheduled-format svg {width:19px;height:21px;flex:none;}
.chat-studio[data-video="true"] .studio-sound button {border-radius:4px;width:34px;height:32px;min-height:32px;}
.chat-studio[data-video="true"] .chat-studio__video-plan {height:160px;min-height:140px;}
html.has-chat-app .day-heading[data-state] .day-number {padding:0;box-sizing:border-box;}
html.has-chat-app .day-heading[data-state].day-is-pinned {position:fixed;top:0;z-index:90;padding:0 10px 0 0;border-radius:6px;background:#fff;}
html.has-chat-app #day-schedule .day-materials .day-downloads {grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;padding:14px 0;}
html.has-chat-app #day-schedule .day-material-card .day-download {height:auto;min-height:34px;max-width:100%;font-size:10px;grid-column:auto;white-space:normal;}
html.has-chat-app #day-schedule .day-material-family {color:#647168;font-size:9px;text-align:center;margin:7px 0 2px;}
.day-material-card .material-published-badge { font-size:9px; padding:5px 6px; left:5px; right:auto; top:5px; max-width:calc(100% - 52px); box-sizing:border-box; white-space:normal; transform:none; }
@media(min-width:700px){html.has-chat-app #day-schedule .day-materials .day-downloads{grid-template-columns:repeat(3,minmax(0,1fr));}}
@media(max-width:359px){html.has-chat-app #day-schedule .day-materials .day-downloads{grid-template-columns:minmax(0,1fr);}}

/* One visual language for onboarding, brand knowledge and creative threads. */
html.has-chat-app #brand-chat-dialog { background:var(--studio-chat-bg); }
html.has-chat-app #brand-chat-dialog .chat-app__header,
html.has-chat-app #brand-chat-dialog .brand-chat,
html.has-chat-app #brand-chat-dialog .brand-chat__history,
html.has-chat-app #brand-chat-dialog .brand-chat__messages { background:transparent; }
html.has-chat-app #brand-chat-dialog :is(input,textarea,select,.brand-chat__composer,.brand-chat__choice,.brand-chat__ready-actions button) { border-radius:5px; background-color:#fff; }
html.has-chat-app #brand-chat-dialog :is(.brand-chat__send,.brand-chat__ready-actions button:first-child) { background:var(--studio-purple); color:#fff; border-color:var(--studio-purple); }
html.has-chat-app #brand-chat-dialog :is(.chat-studio__proposals,.chat-studio__carousel,.chat-studio__carousel-footer) { background:transparent; }
html.has-chat-app #brand-chat-dialog :is(.chat-studio__composer,.chat-studio__button,.chat-studio__icon-button,.chat-studio__upload-square,.chat-studio__reveal-next,.brand-chat__button,.brand-chat__input) { border-radius:5px; }
html.has-chat-app #brand-chat-dialog .chat-studio__composer { background:#fff; }
html.has-chat-app #brand-chat[data-workspace="create"] .brand-chat__messages,
html.has-chat-app #brand-chat[data-workspace="create"] .brand-chat__fresh-welcome { display:none; }
.scheduled-switch-status { font:500 12px/1.5 system-ui; color:#66557a; padding:6px 14px; margin:0; }
html.has-chat-app .chat-app__header:has(.scheduled-switch-status:not([hidden])) { flex-wrap:wrap; }
.scheduled-switch-status:not([hidden]) { flex-basis:100%; }
.photo-bank__button[aria-busy="true"] { opacity:.8; }
.photo-bank__status[aria-busy="true"] { display:flex; align-items:center; gap:8px; }

/* One clear action owns saving a creation to its already selected day. */
html.has-chat-app .chat-studio__editor-actions,
html.has-chat-app .chat-studio__save-actions { justify-content:center; }
html.has-chat-app .chat-studio :is(.chat-studio__editor-actions,.chat-studio__save-actions) .chat-studio__button { max-width:100%; }
html.has-chat-app .chat-studio .chat-studio__button.is-saved { background:#247f4d; border-color:#247f4d; color:#fff; }

html.has-chat-app .chat-studio :is([data-studio-action=save],[data-studio-action=video-save]) { touch-action:manipulation; }

/* Progress belongs to the material the user opened, not its download action. */
.day-material-preview { position:relative; min-width:0; }
.day-material-progress:not([hidden]) { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; padding:10px; background:rgb(250 248 255 / .88); color:#61408b; font:600 12px/1.4 system-ui,sans-serif; pointer-events:none; text-align:center; }
.day-material-progress.mango-loading::before { width:38px; height:38px; margin:0; }
.day-material-progress[hidden] { display:none; }
#brand-chat[data-creation-pending="true"] .brand-chat__conversation { display:grid; place-items:center; min-height:45dvh; }
#brand-chat[data-creation-pending="true"] .brand-chat__connection { justify-content:center; font-size:14px; }

.day-material-play { position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); z-index:2; display:grid; place-items:center; width:44px; height:44px; padding:0; border:1px solid #fff; border-radius:50%; background:#7840bf; color:white; font-size:19px; box-shadow:0 2px 12px #29154135; cursor:pointer; }
.day-material-play:disabled { opacity:1; }
.day-material-play.mango-loading { font-size:0; }
.day-material-play.mango-loading::before { width:30px; height:30px; margin:0; }
.day-material-player { display:block; width:100%; aspect-ratio:9/16; object-fit:contain; border-radius:3px; background:#f5f3f7; opacity:1; filter:none; transition:none; }
.day-material-stop { position:absolute; top:6px; right:6px; z-index:2; padding:5px 7px; border:1px solid #e2d9ef; border-radius:4px; background:white; color:#69379f; font:600 10px/1.3 system-ui,sans-serif; }
.day-material-play[hidden], .day-material-stop[hidden], .day-material-thumbnail[hidden], .day-material-player[hidden] { display:none; }
.day-thumbnail-progress:not([hidden]) { position:absolute; bottom:8px; left:8px; right:8px; display:flex; align-items:center; justify-content:center; padding:6px; background:rgb(255 255 255 / .94); border-radius:4px; color:#654478; font:500 11px/1.3 system-ui,sans-serif; pointer-events:none; }
.day-thumbnail-progress[hidden] { display:none; }

/* The card delete control occupies the upper corner independently of playback. */
.day-material-card .day-material-stop { top:auto; bottom:6px; }

/* Loading placeholders: never show a broken-image icon or alt text before a thumbnail arrives. */
.day-material-preview { background:#f1eef5; border-radius:3px; }
.day-material-thumbnail:not([src]) { visibility:hidden; }
/* Publication badge sits above the design instead of covering its copy. */
html .day-material-card .material-published-badge { position:static; display:block; width:fit-content; max-width:100%; margin:0 auto 6px; transform:none; }
html .day-material-card .material-published-badge[hidden] { display:none; }
html .day-material-card .day-material-preview .material-published-badge { position:absolute; left:50%; top:50%; z-index:1; display:block; box-sizing:border-box; width:max-content; max-width:90%; margin:0; padding:7px 10px; border-radius:4px; background:var(--studio-green); color:#fff; font:750 12px/1.2 system-ui; text-align:center; white-space:normal; text-wrap:balance; transform:translate(-50%,-50%) rotate(-7deg); box-shadow:0 2px 10px #17321c40; pointer-events:none; }
html .day-material-card[data-kind="video"] .day-material-preview .material-published-badge { top:24%; }
html .day-material-card .day-material-preview .material-published-badge[hidden] { display:none; }

/* A day's materials sit in one row; more than fit are reached with a swipe.
   Two cards show at a time with a sliver of the next one as a hint. */
html.has-chat-app #day-schedule .day-materials .day-downloads { display:flex; gap:12px; overflow-x:auto; overflow-y:hidden; overscroll-behavior-x:contain; scroll-snap-type:x mandatory; scrollbar-width:none; padding:14px 2px; margin-inline:-2px; }
html.has-chat-app #day-schedule .day-materials .day-downloads::-webkit-scrollbar { display:none; }
html.has-chat-app #day-schedule .day-materials .day-downloads > .day-material-card { flex:0 0 calc((100% - 12px) * .46); scroll-snap-align:start; }
/* The last card snaps to the end, so a wide last card is reachable too. */
html.has-chat-app #day-schedule .day-materials .day-downloads > .day-material-card:last-child { scroll-snap-align:end; }
@media(min-width:700px){ html.has-chat-app #day-schedule .day-materials .day-downloads > .day-material-card { flex-basis:calc((100% - 24px) * .31); } }
html .day-material-card.is-new { border-color:var(--studio-purple); }
@media (prefers-reduced-motion: no-preference) { html .day-material-card.is-new { animation:day-material-new 1.2s ease-out 1; } }
@keyframes day-material-new { 0% { transform:scale(.96); } 35% { transform:scale(1.02); } 100% { transform:none; } }
/* Carousel materials (three slides in one image) take a post's place in the row: the first slide in front,
   the other two behind it like a small stack of prints (all cut from the same thumbnail). */
html .day-material-card[data-carousel] .day-material-preview { padding:14px 14px 6px 6px; }
html .day-material-card[data-carousel] .day-material-thumbnail { position:relative; z-index:1; aspect-ratio: 4 / 5; object-fit: cover; object-position: 0 50%; box-shadow:0 2px 8px #0000004d; }
html .day-carousel-print { position:absolute; left:6px; right:14px; aspect-ratio:4 / 5; box-sizing:border-box; border:1px solid #00000026; background:var(--carousel-image, none) no-repeat 50% 0 / 300% 100%, #e7e2ec; box-shadow:0 1px 5px #0000003d; transform-origin:30% 100%; pointer-events:none; }
html .day-carousel-print--2 { translate:5px -5px; rotate:2deg; }
html .day-carousel-print--3 { translate:10px -10px; rotate:4deg; background-position:100% 0, 0 0; }
/* Next to taller story cards the strip sits centred on the same grey as a
   letterboxed post, so every card in the row keeps one height. */
html.has-chat-app #day-schedule .day-materials .day-downloads > .day-material-card[data-carousel]:not([hidden]) { display:flex; flex-direction:column; }
html.has-chat-app #day-schedule .day-material-card[data-carousel] > .day-material-preview { flex:1 1 auto; display:flex; flex-direction:column; justify-content:center; background:#f5f3f7; }
html .day-material-card .day-material-carousel { position: absolute; z-index: 2; top: 8px; left: 8px; padding: 5px 9px; border-radius: 999px; background: rgba(17, 17, 17, .78); color: #fff; font: 600 12px/1.2 system-ui, -apple-system, sans-serif; pointer-events: none; }

html #day-schedule .day-cta-note { margin:8px 0 0; font:500 11px/1.4 system-ui; color:#574c66; overflow-wrap:anywhere; }
html #day-schedule .day-cta-note[hidden] { display:none; }
html #day-schedule .day-cta-note p { margin:0; }
html #day-schedule .day-cta-open { width:100%; min-height:44px; margin-top:6px; border:1px solid var(--studio-purple); border-radius:6px; background:#fff; color:var(--studio-purple); font:650 11px/1.2 system-ui; }
html #day-schedule .day-cta-open[hidden] { display:none; }
html #day-schedule .day-caption-tools .day-caption-save { background:var(--studio-purple); color:#fff; }
html #day-schedule .day-caption-panel { position:relative; margin:2px 0 14px; padding:12px; border:1px solid #ddd1ee; border-radius:10px; background:#fff; box-shadow:0 2px 10px #2c16480f; scroll-margin:calc(var(--day-header-height, 80px) + 12px) 0 16px; }
html #day-schedule .day-caption-panel[hidden] { display:none; }
html #day-schedule .day-caption-head { display:flex; align-items:center; justify-content:space-between; gap:8px; margin:0 0 8px; }
html #day-schedule .day-caption-title { margin:0; color:#261b33; font:750 14px/1.3 system-ui; text-transform:none; letter-spacing:0; }
html #day-schedule .day-caption-close { display:grid; place-items:center; flex:0 0 44px; width:44px; height:44px; margin:-8px -6px -8px 0; padding:0; border:0; border-radius:6px; background:transparent; color:#4d4356; font:400 24px/1 system-ui; cursor:pointer; }
html #day-schedule .day-caption-status { margin:0 0 8px; color:#574c66; font:500 12px/1.4 system-ui; }
html #day-schedule .day-caption-status[hidden] { display:none; }
html #day-schedule .day-caption-status.is-error { color:#b3261e; }
html #day-schedule .day-caption-text { display:block; box-sizing:border-box; width:100%; min-height:170px; margin:0; padding:10px 12px; border:1px solid #d6cbe5; border-radius:8px; background:#fdfcff; color:#1f1729; font:400 16px/1.45 system-ui; resize:vertical; }
html #day-schedule .day-caption-text[hidden] { display:none; }
html #day-schedule .day-caption-text:focus-visible { outline:2px solid var(--studio-purple); outline-offset:1px; }
html #day-schedule .day-caption-tools { display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
html #day-schedule .day-caption-tools button { display:inline-flex; align-items:center; justify-content:center; gap:6px; min-height:44px; margin:0; padding:8px 14px; border:1px solid var(--studio-purple); border-radius:6px; background:#fff; color:var(--studio-purple); font:650 13px/1.2 system-ui; cursor:pointer; }
html #day-schedule .day-caption-tools .day-caption-copy { background:#fff; color:var(--studio-purple); }
html #day-schedule .day-caption-tools .day-caption-undo { border-color:transparent; text-decoration:underline; text-underline-offset:3px; }
html #day-schedule .day-caption-tools button[hidden] { display:none; }
html #day-schedule .day-caption-tools button:disabled { opacity:.5; cursor:default; }
html #day-schedule .day-caption-translate-icon { font:700 12px/1 system-ui; }
html #day-schedule .day-caption-menu { position:static; z-index:auto; width:auto; max-width:none; max-height:280px; margin:10px 0 0; box-shadow:none; border:1px solid #e3d9f1; }
@media (min-width:520px) { html #day-schedule .day-caption-menu .translate-menu__list { grid-template-columns:repeat(3,minmax(0,1fr)); } }

/* Schedule: an open day's materials, like clips in a video editor. A strip of tiles (a tap selects one,
   a tap on the selected one opens it), ONE toolbar of small icon tools for the selected material under
   the strip, and that material's description sheet under the toolbar. Structure only; the Noir theme skins it. */
:root {
  --cm-ic-download: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='square'%3E%3Cpath d='M12 3.5v11.5M7 10.5l5 5 5-5M4 20h16'/%3E%3C/svg%3E");
  --cm-ic-publish: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='square'%3E%3Cpath d='M4.75 4.75h14.5v14.5H4.75z'/%3E%3C/svg%3E");
  --cm-ic-caption: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='square'%3E%3Cpath d='M4 6.5h16M4 11.5h16M4 16.5h10'/%3E%3C/svg%3E");
  --cm-ic-caption-ready: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='square'%3E%3Cpath d='M4 6.5h16M4 11.5h10M4 16.5h6M13.5 16.5l3 3 5-6'/%3E%3C/svg%3E");
  --cm-ic-link: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='square'%3E%3Cpath d='M10 14l4-4M8.2 11.8l-2.1 2.1a3.1 3.1 0 004.4 4.4l2.1-2.1M15.8 12.2l2.1-2.1a3.1 3.1 0 00-4.4-4.4l-2.1 2.1'/%3E%3C/svg%3E");
  --cm-ic-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='square'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
  --cm-ic-edit: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='square'%3E%3Cpath d='M4.5 19.5h4l10-10-4-4-10 10zM12.5 7.5l4 4'/%3E%3C/svg%3E");
  --cm-ic-delete: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='square'%3E%3Cpath d='M4.5 7h15M9.5 7V4.5h5V7M6.5 7l1 12.5h9l1-12.5M10 10.5v6M14 10.5v6'/%3E%3C/svg%3E");
  --cm-ic-play: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='square'%3E%3Cpath d='M8 5.5v13l10.5-6.5z' fill='black' stroke='none'/%3E%3C/svg%3E");
  --cm-ic-copy: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='square'%3E%3Cpath d='M8.5 8.5h11v11h-11zM15.5 8.5v-4h-11v11h4'/%3E%3C/svg%3E");
  --cm-ic-regenerate: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='square'%3E%3Cpath d='M19.5 12a7.5 7.5 0 11-2.2-5.3M19.5 3.5v4.5H15'/%3E%3C/svg%3E");
  --cm-ic-undo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='square'%3E%3Cpath d='M9 14.5L4.5 10 9 5.5M4.5 10h10a5 5 0 010 10h-3'/%3E%3C/svg%3E");
  --cm-ic-plus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='square'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
}
html.has-chat-app #day-schedule .day-materials .day-downloads { --tile-h:148px; display:flex; align-items:flex-end; gap:8px; margin:0 -4px; padding:4px; overflow-x:auto; overflow-y:hidden; scroll-snap-type:x proximity; scroll-padding-inline:4px; }
html.has-chat-app #day-schedule .day-materials .day-downloads > .day-material-card { flex:0 0 auto; width:calc(var(--tile-h) * 9 / 16); height:var(--tile-h); padding:0; border:0; border-radius:0; background:transparent; box-shadow:none; scroll-snap-align:start; }
html.has-chat-app #day-schedule .day-materials .day-downloads > .day-material-card[data-material="post"] { width:calc(var(--tile-h) * 4 / 5); }
html.has-chat-app #day-schedule .day-materials .day-downloads > .day-material-card[data-carousel] { width:calc(var(--tile-h) * 4 / 5 + 12px); }
html.has-chat-app #day-schedule .day-downloads > .day-material-card > .day-material-preview { position:relative; width:100%; height:100%; padding:0; }
html.has-chat-app #day-schedule .day-downloads > .day-material-card .day-material-thumbnail { width:100%; height:100%; aspect-ratio:auto; object-fit:contain; cursor:pointer; }
html.has-chat-app #day-schedule .day-downloads > .day-material-card.is-selected > .day-material-preview { outline:2px solid currentColor; outline-offset:2px; }
.day-downloads, .day-material-actions button, .day-caption-tools button { touch-action:manipulation; }
.day-toolbar[hidden], .day-material-tools[hidden], .day-material-stage[hidden] { display:none; }
.day-material-context { margin:10px 0 2px; font:600 11px/1.3 system-ui; }
html.has-chat-app #day-schedule .day-material-tools .day-material-actions[role="toolbar"] { display:flex; justify-content:space-between; gap:2px; margin:0; padding:0; border:0; background:none; }
html.has-chat-app #day-schedule .day-material-tools .day-material-actions > button { display:flex; flex:0 1 auto; flex-direction:column; align-items:center; justify-content:center; gap:4px; min-width:44px; min-height:52px; margin:0; padding:6px 4px; border:0; border-radius:0; background:none; color:inherit; font:500 11.5px/1.15 system-ui; white-space:nowrap; cursor:pointer; }
html.has-chat-app #day-schedule .day-material-tools .day-material-actions > button[hidden] { display:none; }
html.has-chat-app #day-schedule .day-material-tools .day-material-actions > button::before { content:""; flex:none; width:22px; height:22px; background:currentColor; -webkit-mask:var(--tool-icon) center / contain no-repeat; mask:var(--tool-icon) center / contain no-repeat; }
.day-material-actions .day-download { --tool-icon:var(--cm-ic-download); }
.day-material-actions .day-publish { --tool-icon:var(--cm-ic-publish); }
.day-material-actions .day-caption { --tool-icon:var(--cm-ic-caption); }
.day-material-actions .day-caption.has-caption { --tool-icon:var(--cm-ic-caption-ready); }
.day-material-actions .day-cta-link { --tool-icon:var(--cm-ic-link); }
.day-material-actions .day-cta-link.is-confirmed { --tool-icon:var(--cm-ic-check); }
.day-material-actions .day-material-edit { --tool-icon:var(--cm-ic-edit); }
.day-material-actions .day-material-delete { --tool-icon:var(--cm-ic-delete); }
html.has-chat-app #day-schedule .day-material-tools .day-material-actions > button:disabled { opacity:.45; cursor:default; }
.day-material-stage { margin:10px 0 0; }
.day-material-stage .day-material-player { display:block; width:min(100%, 220px); aspect-ratio:9 / 16; }
.day-material-stage .day-material-stop { position:static; display:block; margin:8px 0 0; min-height:44px; }
.day-material-play::before { content:""; display:block; width:18px; height:18px; margin:auto; background:currentColor; -webkit-mask:var(--cm-ic-play) center / contain no-repeat; mask:var(--cm-ic-play) center / contain no-repeat; }
html #day-schedule .day-caption-head { display:flex; align-items:center; gap:10px; }
html #day-schedule .day-caption-thumb { flex:none; width:auto; height:32px; aspect-ratio:9 / 16; object-fit:cover; object-position:0 50%; }
html #day-schedule .day-caption-thumb[hidden] { display:none; }
html #day-schedule .day-caption-head[data-material="post"] .day-caption-thumb, html #day-schedule .day-caption-head[data-material="carousel"] .day-caption-thumb { aspect-ratio:4 / 5; }
html #day-schedule .day-caption-title { flex:1; min-width:0; }
