/* Stories has its own layout: page-level header rules must never stack its controls. */
html body:is(.mm-app,.cs-app) {
  --story-accent:#5263ef;
  --story-bg:var(--mm-bg,var(--cs-bg,#f6f7ff));
  --story-surface:var(--mm-surface,var(--cs-card,#fff));
  --story-text:var(--mm-text,var(--cs-ink,#24243c));
  --story-muted:var(--mm-muted,var(--cs-muted,#686980));
  --story-edge:var(--mm-border,var(--cs-line,#e4e5f5));
  --story-soft:var(--mm-soft,var(--cs-soft,#eeedff));
  --story-glass:var(--glass-fill,var(--story-surface));
  --story-highlight:var(--glass-highlight,#ffffff9c);
  --story-sheen:var(--glass-sheen,linear-gradient(145deg,#ffffff36,#ffffff00));
  --story-action:linear-gradient(115deg,#356bf4,#8149ec);
  --story-ring:conic-gradient(from 205deg,#4389ff,#7055ee 44%,#a36aef 75%,#4389ff);
}
html body:is(.mm-app,.cs-app) #pb-updates.up-screen {
  box-sizing:border-box;position:fixed;inset:0;width:min(660px,calc(100vw - 32px));
  height:min(920px,calc(var(--mm-height,100dvh) - 32px));max-height:calc(var(--mm-height,100dvh) - 32px);
  margin:auto;padding:0;overflow:hidden;border:1px solid var(--story-edge);border-radius:30px;
  background:radial-gradient(ellipse at top right,#7459ef0c,transparent 50%),var(--story-bg);color:var(--story-text);box-shadow:inset 0 1px 0 var(--story-highlight),0 24px 80px #07112640;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
html body:is(.mm-app,.cs-app) #pb-updates.up-screen[open] {display:flex;flex-direction:column}
html body:is(.mm-app,.cs-app) #pb-updates.up-screen>.up-header {
  display:grid;grid-template-columns:44px minmax(0,1fr) 44px 44px;grid-auto-flow:column;
  flex:none;flex-direction:row;flex-wrap:nowrap;align-items:center;justify-content:initial;
  position:relative;inset:auto;gap:8px;box-sizing:border-box;width:100%;height:auto;min-height:78px;
  margin:0;padding:14px 18px;border:0;border-bottom:1px solid var(--story-edge);border-radius:0 0 26px 26px;
  background:radial-gradient(ellipse at 0% 0%,color-mix(in srgb,var(--story-accent) 16%,transparent),transparent 72%),var(--story-sheen),var(--story-glass)!important;box-shadow:inset 0 1px 0 var(--story-highlight),0 8px 24px #161e4807;
  backdrop-filter:var(--glass-blur,blur(18px));-webkit-backdrop-filter:var(--glass-blur,blur(18px));z-index:2;
}
html body:is(.mm-app,.cs-app) #pb-updates.up-screen .up-brand-heading {min-width:0;text-align:left;line-height:1.2}
html body:is(.mm-app,.cs-app) #pb-updates.up-screen .up-brand-heading>span {display:block;font-size:14px;font-weight:750;letter-spacing:1.2px;color:var(--story-accent);margin-bottom:3px}
html body:is(.mm-app,.cs-app) #pb-updates.up-screen .up-header h1 {font-size:28px;font-weight:750;letter-spacing:-1px;line-height:1.15;margin:0;padding:0;color:var(--story-text)}
html body:is(.mm-app,.cs-app) #pb-updates.up-screen .up-header>button,
html body:is(.mm-app,.cs-app) #pb-updates.up-screen .up-section-actions>button {
  display:grid;place-items:center;box-sizing:border-box;flex:none;width:44px;height:44px;min-width:44px;min-height:44px;
  margin:0;padding:10px;line-height:1;border:1px solid var(--story-edge);border-radius:16px;
  background:var(--story-sheen),var(--story-surface);color:var(--story-text);box-shadow:inset 0 1px 0 var(--story-highlight),0 3px 9px #18265308;
}
html body:is(.mm-app,.cs-app) #pb-updates.up-screen .up-header svg,
html body:is(.mm-app,.cs-app) #pb-updates.up-screen .up-section-actions svg {width:22px;height:22px;display:block}
html body:is(.mm-app,.cs-app) #pb-updates.up-screen .up-header>button:first-child {background:transparent;border-color:transparent;box-shadow:none}
html body:is(.mm-app,.cs-app) #pb-updates.up-screen>.up-content {flex:1;min-height:0;padding:0 20px 20px;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:thin}
html body:is(.mm-app,.cs-app) #pb-updates.up-screen #up-search {min-height:48px;margin:18px 0 0;padding:12px 16px;border:1px solid var(--story-edge);border-radius:18px;background:var(--story-sheen),var(--story-surface);box-shadow:inset 0 1px 0 var(--story-highlight),0 3px 12px #15234d05;color:var(--story-text);font-size:16px}
html body:is(.mm-app,.cs-app) #pb-updates.up-screen #up-state {margin:12px 0;font-size:13px;color:var(--story-muted);line-height:1.5}
html body:is(.mm-app,.cs-app) #pb-updates.up-screen #up-state:empty {display:none}
html body:is(.mm-app,.cs-app) #pb-updates.up-screen .up-section-title {display:flex;flex-direction:row;justify-content:space-between;align-items:center;gap:12px;margin:22px 0 14px;padding:0}
html body:is(.mm-app,.cs-app) #pb-updates.up-screen .up-section-title h2 {font-size:21px;font-weight:720;line-height:1.3;letter-spacing:-.5px;margin:0;color:var(--story-text)}
html body:is(.mm-app,.cs-app) #pb-updates.up-screen .up-stories-heading>div:first-child>span {display:block;margin-top:3px;font-size:14px;color:var(--story-muted)}
html body:is(.mm-app,.cs-app) #pb-updates.up-screen .up-section-actions {display:flex;flex-direction:row;gap:4px;align-items:center}
html body:is(.mm-app,.cs-app) #pb-updates.up-screen .up-section-actions>button {background:transparent;border-color:transparent;box-shadow:none}
html body:is(.mm-app,.cs-app) #pb-updates.up-screen #up-privacy-open {font-size:26px}
html body:is(.mm-app,.cs-app) #pb-updates.up-screen .up-stories {
  display:flex;align-items:flex-start;gap:16px;min-height:138px;margin:0 -20px;padding:4px 20px 15px;
  overflow-x:auto;overflow-y:hidden;scrollbar-width:none;scroll-snap-type:x proximity;scroll-padding-inline:20px;border-bottom:1px solid var(--story-edge);
}
html body:is(.mm-app,.cs-app) #pb-updates.up-screen .up-stories::-webkit-scrollbar {display:none}
html body:is(.mm-app,.cs-app) #pb-updates.up-screen .up-story,
html body:is(.mm-app,.cs-app) #pb-updates.up-screen #up-my-new {
  display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:0;flex:0 0 88px;width:88px;height:auto;min-height:126px;
  padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none;overflow:visible;text-align:center;color:var(--story-text)!important;scroll-snap-align:start;
}
html body:is(.mm-app,.cs-app) #pb-updates.up-screen .up-story::after {display:none}
html body:is(.mm-app,.cs-app) #pb-updates.up-screen .up-story .up-ring,
html body:is(.mm-app,.cs-app) #pb-updates.up-screen #up-my-new .up-ring {
  position:relative;display:grid;place-items:center;box-sizing:border-box;width:80px;height:80px;margin:0 0 9px;padding:3px;
  border:0;outline:0;border-radius:50%;background:var(--story-ring);box-shadow:0 4px 12px #526bc31a,inset 0 1px 0 #ffffff70;isolation:isolate;
}
html body:is(.mm-app,.cs-app) #pb-updates.up-screen .up-story.seen .up-ring {background:var(--story-edge);box-shadow:none}
html body:is(.mm-app,.cs-app) #pb-updates.up-screen #up-my-new .up-ring {background:linear-gradient(140deg,#4b83ff88,#9765ed88);box-shadow:inset 0 1px 0 var(--story-highlight)}
html body:is(.mm-app,.cs-app) #pb-updates.up-screen .up-story-avatar {
  box-sizing:border-box;position:relative;display:grid;place-items:center;width:100%;height:100%;overflow:hidden;
  border:3px solid var(--story-bg);border-radius:50%;background:var(--story-sheen),var(--story-soft);color:var(--story-accent);font-size:23px;font-weight:650;
}
html body :is(#pb-updates,#up-viewer) .up-avatar-photo {position:absolute;inset:0;width:100%;height:100%;max-height:none;object-fit:cover;border-radius:50%}
html body:is(.mm-app,.cs-app) #pb-updates.up-screen .up-story-add {
  position:absolute;right:0;bottom:0;display:grid;place-items:center;width:25px;height:25px;border:3px solid var(--story-bg);border-radius:50%;background:var(--story-action);color:#fff;font-size:22px;font-weight:400;line-height:1;
}
html body:is(.mm-app,.cs-app) #pb-updates.up-screen .up-story strong {position:static;display:block;max-width:100%;font-size:14px;font-weight:600;line-height:1.4;color:var(--story-text)!important;text-shadow:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html body:is(.mm-app,.cs-app) #pb-updates.up-screen .up-story small {display:block;margin-top:2px;font-size:14px;line-height:1.3;color:var(--story-accent)}
html body:is(.mm-app,.cs-app) #pb-updates.up-screen .up-story.seen small,
html body:is(.mm-app,.cs-app) #pb-updates.up-screen .up-story-self small {color:var(--story-muted)}
html body:is(.mm-app,.cs-app) #pb-updates.up-screen .up-hint {font-size:14px;line-height:1.6;color:var(--story-muted);margin:10px 0 16px}
html body:is(.mm-app,.cs-app) #pb-updates.up-screen #up-discover {min-height:44px;padding:8px 14px;border:1px solid var(--story-edge);border-radius:24px;background:var(--story-sheen),var(--story-soft);color:var(--story-accent);font-size:14px;font-weight:650}
html body:is(.mm-app,.cs-app) #pb-updates.up-screen .up-channel-row {min-height:84px;gap:12px;padding:14px;margin-bottom:10px;border:1px solid var(--story-edge);border-radius:22px;background:var(--story-sheen),var(--story-surface);box-shadow:inset 0 1px 0 var(--story-highlight),0 4px 12px #14234e05;color:var(--story-text)}
html body:is(.mm-app,.cs-app) #pb-updates.up-screen .up-channel-avatar {width:48px;height:48px;background:var(--story-sheen),var(--story-soft);color:var(--story-accent);font-size:20px;border:1px solid var(--story-edge)}
html body:is(.mm-app,.cs-app) #pb-updates.up-screen .up-channel-open {color:var(--story-text)}
html body:is(.mm-app,.cs-app) #pb-updates.up-screen .up-channel-open strong {font-size:15px;line-height:1.3;font-weight:650}
html body:is(.mm-app,.cs-app) #pb-updates.up-screen .up-channel-open small {margin-top:4px;font-size:14px;line-height:1.4;color:var(--story-muted)}
html body:is(.mm-app,.cs-app) #pb-updates.up-screen .up-follow {min-height:44px;padding:9px 12px;border-radius:20px;font-size:14px;background:var(--story-soft);color:var(--story-accent);font-weight:650}
html body:is(.mm-app,.cs-app) #pb-updates.up-screen .up-badge {font-size:12px;padding:4px 7px;background:var(--story-action);color:#fff}
html body:is(.mm-app,.cs-app) #pb-updates.up-screen .up-empty {padding:24px 20px;border:1px solid var(--story-edge);border-radius:24px;background:var(--story-sheen),var(--story-surface);font-size:14px;line-height:1.65;box-shadow:inset 0 1px 0 var(--story-highlight);color:var(--story-muted)}
html body:is(.mm-app,.cs-app) #pb-updates.up-screen #up-create-channel {min-height:44px;margin:14px 0 0;padding:10px 0;border:0;background:transparent;color:var(--story-accent);font-size:14px;font-weight:650}
html body:is(.mm-app,.cs-app) #pb-updates.up-screen #up-discovery h3 {font-size:15px;margin:22px 0 8px;color:var(--story-text)}
html body:is(.mm-app,.cs-app) #pb-updates.up-screen>.up-floating {
  position:relative;inset:auto;display:flex;flex:none;justify-content:stretch;align-items:center;gap:10px;padding:12px 16px calc(12px + env(safe-area-inset-bottom,0px));margin:0;border:0;border-top:1px solid var(--story-edge);background:var(--story-sheen),var(--story-glass);z-index:2;
}
html body:is(.mm-app,.cs-app) #pb-updates.up-screen .up-floating button {display:grid;place-items:center;flex:none;width:50px;height:50px;min-height:50px;padding:0;border:1px solid var(--story-edge);border-radius:50%;background:var(--story-sheen),var(--story-glass);color:var(--story-text);box-shadow:inset 0 1px 0 var(--story-highlight),0 5px 20px #07112618;backdrop-filter:var(--glass-blur,blur(18px));-webkit-backdrop-filter:var(--glass-blur,blur(18px))}
html body:is(.mm-app,.cs-app) #pb-updates.up-screen .up-floating #up-photo {display:flex;align-items:center;justify-content:center;flex:1;width:auto;min-width:0;min-height:50px;height:50px;padding:0 20px;gap:10px;border-radius:26px;background:var(--story-sheen),var(--story-action);color:#fff;font-size:16px;font-weight:700;box-shadow:inset 0 1px 0 #ffffff40,0 7px 22px #07112626}
html body:is(.mm-app,.cs-app) #pb-updates.up-screen>.up-nav {
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));align-items:center;gap:3px;flex:none;
  box-sizing:border-box;width:calc(100% - 20px);min-height:66px;margin:0 10px calc(10px + env(safe-area-inset-bottom,0px));padding:5px;border:1px solid var(--story-edge);border-radius:34px;
  background:var(--story-sheen),var(--story-glass)!important;box-shadow:inset 0 1px 0 var(--story-highlight),inset 0 -1px 0 var(--story-edge),0 8px 28px #19255414;backdrop-filter:var(--glass-blur,blur(18px));-webkit-backdrop-filter:var(--glass-blur,blur(18px));
}
html body:is(.mm-app,.cs-app) #pb-updates.up-screen .up-nav button {display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:0;min-height:54px;margin:0;padding:5px 1px;gap:3px;border:0;border-radius:27px;background:transparent;color:var(--story-muted)}
html body:is(.mm-app,.cs-app) #pb-updates.up-screen .up-nav button[aria-current] {background:var(--story-action);color:#fff;box-shadow:inset 0 1px 0 #ffffff38,0 3px 8px #26377918}
html body:is(.mm-app,.cs-app) #pb-updates.up-screen .up-nav span {font-size:14px;line-height:1.3;white-space:normal}
html body:is(.mm-app,.cs-app) #pb-updates.up-screen [hidden] {display:none!important}
/* Viewer and secondary sheets keep their header horizontal at every width. */
html body:is(.mm-app,.cs-app) :is(.up-dialog,#up-viewer)>header {display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center;width:100%;box-sizing:border-box}
html body:is(.mm-app,.cs-app) .up-dialog>header h2 {flex:1;min-width:0;line-height:1.3}
html body:is(.mm-app,.cs-app) #up-viewer>header {background:linear-gradient(#0003,transparent);gap:10px}
html body:is(.mm-app,.cs-app) #up-viewer>header>div {min-width:0;flex:1}
html body:is(.mm-app,.cs-app) #up-viewer .up-view-avatar {position:relative;display:grid;place-items:center;flex:0 0 38px;width:38px;height:38px;overflow:hidden;border:1px solid #ffffff65;border-radius:50%;background:#ffffff1a;color:#fff;font-size:13px;font-weight:650}
html body:is(.mm-app,.cs-app) #up-viewer .up-view-avatar:empty {display:none}
html body:is(.mm-app,.cs-app) #up-viewer :is(.up-view-controls button,#up-reply-story,.up-react-story,#up-comments-open) {border:1px solid #ffffff45;background:#13203666;box-shadow:inset 0 1px 0 #ffffff25;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px)}
html body:is(.mm-app,.cs-app) #up-viewer .up-view-controls button {border-radius:22px;min-width:44px;min-height:44px;font-size:14px}
html body:is(.mm-app,.cs-app) #up-viewer :is(header>button,.up-view-controls button,.up-story-tools button) {min-width:44px;min-height:44px;touch-action:manipulation}
html body:is(.mm-app,.cs-app) #up-viewer>header>div {overflow:hidden}
html body:is(.mm-app,.cs-app) #up-view-name {display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:16px;line-height:1.4;text-shadow:0 1px 8px #0009}
html body:is(.mm-app,.cs-app) #up-view-time {font-size:12px;color:#fff;opacity:1;text-shadow:0 1px 6px #0009}
html body:is(.mm-app,.cs-app) #up-viewer button:focus-visible {outline:2px solid #fff;outline-offset:3px}
html body:is(.mm-app,.cs-app) #pb-updates.up-screen :is(button,input):focus-visible {outline:2px solid var(--story-accent);outline-offset:3px}
@media(max-width:700px) {
  html body:is(.mm-app,.cs-app) #pb-updates.up-screen {inset:var(--mm-viewport-top,0px) 0 auto;width:100%;max-width:100vw;height:var(--mm-height,100dvh);max-height:var(--mm-height,100dvh);margin:0;border:0;border-radius:0}
  html body:is(.mm-app,.cs-app) #pb-updates.up-screen>.up-header {min-height:72px;padding:calc(10px + env(safe-area-inset-top,0px)) 12px 10px;gap:6px}
  html body:is(.mm-app,.cs-app) #pb-updates.up-screen>.up-content {padding-inline:16px}
  html body:is(.mm-app,.cs-app) #pb-updates.up-screen .up-stories {margin-inline:-16px;padding-inline:16px;scroll-padding-inline:16px}
}
@media(max-width:359px) {
  html body:is(.mm-app,.cs-app) #pb-updates.up-screen>.up-header {padding-inline:8px;gap:4px}
  html body:is(.mm-app,.cs-app) #pb-updates.up-screen .up-header h1 {font-size:24px}
  html body:is(.mm-app,.cs-app) #pb-updates.up-screen .up-stories-heading>div:first-child>span {font-size:14px}
  html body:is(.mm-app,.cs-app) #pb-updates.up-screen>.up-nav {grid-template-columns:repeat(2,minmax(0,1fr));border-radius:24px}
  html body:is(.mm-app,.cs-app) #pb-updates.up-screen .up-nav button {flex-direction:row;gap:8px;min-height:44px;border-radius:18px}
}
@media(prefers-reduced-transparency:reduce),(prefers-reduced-motion:reduce),(prefers-contrast:more) {
  html body:is(.mm-app,.cs-app) #pb-updates.up-screen :is(.up-header,.up-nav,.up-floating button) {backdrop-filter:none;-webkit-backdrop-filter:none}
  html body:is(.mm-app,.cs-app) #pb-updates.up-screen>.up-header,html body:is(.mm-app,.cs-app) #pb-updates.up-screen>.up-nav {background:var(--story-surface)!important}
  html body:is(.mm-app,.cs-app) #up-viewer :is(.up-view-controls button,#up-reply-story,.up-react-story,#up-comments-open) {backdrop-filter:none;-webkit-backdrop-filter:none;background:#132036}
}

/* The action row keeps its own space; neither an empty list nor a short screen can cover it. */
html body:is(.mm-app,.cs-app) #pb-updates.up-screen .up-floating svg {width:23px;height:23px;display:block;flex:none}
html body:is(.mm-app,.cs-app) #pb-updates.up-screen .up-floating #up-photo span {display:block;line-height:1.3}
html body:is(.mm-app,.cs-app) #pb-updates.up-screen #up-stories-empty {padding:16px;margin:12px 0 20px;border:1px solid var(--story-edge);border-radius:20px;background:var(--story-surface);font-size:14px;line-height:1.6}
html body.cs-app #pb-updates.up-screen>.up-nav {display:none}

/* The media owns the frame. Secondary actions live in a menu rather than over the story. */
html body:is(.mm-app,.cs-app) #up-viewer.up-viewer {width:100%;max-width:none;inset:var(--mm-viewport-top,0px) 0 auto;height:var(--mm-height,100dvh);max-height:var(--mm-height,100dvh);background:#050508;display:none}
html body:is(.mm-app,.cs-app) #up-viewer.up-viewer[open] {display:block}
html body:is(.mm-app,.cs-app) #up-viewer.up-viewer>header {gap:8px;padding:6px max(12px,env(safe-area-inset-right,0px)) 12px max(12px,env(safe-area-inset-left,0px));background:linear-gradient(#0505088c,transparent);min-height:64px}
html body:is(.mm-app,.cs-app) #up-viewer #up-view-time {font-size:12px;line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;opacity:.85}
html body:is(.mm-app,.cs-app) #up-viewer>header>button {width:44px;height:44px;min-width:44px;padding:0;border:0;background:#11122255;box-shadow:inset 0 1px 0 #ffffff1f;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px)}
html body:is(.mm-app,.cs-app) #up-viewer .up-story-menu {position:relative;flex:none;z-index:9;color:#fff}
html body:is(.mm-app,.cs-app) #up-viewer .up-story-menu:not(:has(button:not([hidden]))) {display:none}
html body:is(.mm-app,.cs-app) #up-viewer .up-story-menu>summary {display:grid;place-items:center;width:44px;height:44px;list-style:none;cursor:pointer;border-radius:50%;background:#11122255;box-shadow:inset 0 1px 0 #ffffff1f;touch-action:manipulation;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px)}
html body:is(.mm-app,.cs-app) #up-viewer .up-story-menu>summary::-webkit-details-marker {display:none}
html body:is(.mm-app,.cs-app) #up-viewer .up-story-menu>summary svg {width:22px;height:22px;fill:currentColor}
html body:is(.mm-app,.cs-app) #up-viewer .up-story-menu[open]>summary {background:#4f52a9b3}
html body:is(.mm-app,.cs-app) #up-viewer .up-story-menu-items {position:absolute;top:52px;right:0;width:210px;max-width:calc(100vw - 24px);padding:6px;border:1px solid #ffffff2e;border-radius:20px;background:#151526f5;box-shadow:0 14px 40px #0006;backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px)}
html body:is(.mm-app,.cs-app) #up-viewer .up-story-menu-items>button {display:block;width:100%;min-height:48px;padding:12px 14px;border:0;border-radius:14px;background:transparent;color:#fff;font-size:14px;text-align:left;line-height:1.4}
html body:is(.mm-app,.cs-app) #up-viewer .up-story-menu-items>button:hover {background:#ffffff12}
html body:is(.mm-app,.cs-app) #up-viewer .up-story-menu-items>#up-delete-status {color:#ffb5c4}
html body:is(.mm-app,.cs-app) #up-viewer .up-view-controls {position:absolute;inset:calc(50% - 24px) 8px auto;padding:0;margin:0;max-width:none;height:48px;pointer-events:none;display:flex;justify-content:space-between;z-index:4}
html body:is(.mm-app,.cs-app) #up-viewer .up-view-controls>button {display:grid;place-items:center;width:44px;min-width:44px;height:48px;padding:0;border:0;background:#10102030;border-radius:24px;box-shadow:none;pointer-events:auto;opacity:.62;backdrop-filter:none;-webkit-backdrop-filter:none}
html body:is(.mm-app,.cs-app) #up-viewer .up-view-controls>button:disabled {visibility:hidden}
html body:is(.mm-app,.cs-app) #up-viewer .up-view-controls>button:hover,html body:is(.mm-app,.cs-app) #up-viewer .up-view-controls>button:focus-visible {opacity:1;background:#12122a9c}
html body:is(.mm-app,.cs-app) #up-viewer .up-view-controls svg {width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
html body:is(.mm-app,.cs-app) #up-viewer .up-story-tools {max-height:32%;padding:8px max(12px,env(safe-area-inset-right,0px)) calc(12px + env(safe-area-inset-bottom,0px)) max(12px,env(safe-area-inset-left,0px));gap:8px;background:linear-gradient(transparent,#050508bf);align-items:center}
html body:is(.mm-app,.cs-app) #up-viewer #up-comments-open,html body:is(.mm-app,.cs-app) #up-viewer #up-viewers-open {display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;max-width:calc(100% - 12px);padding:9px 14px;border:1px solid #ffffff32;border-radius:24px;background:#11122266;color:#fff;font-size:14px;line-height:1.35;text-align:center}
html body:is(.mm-app,.cs-app) #up-viewer #up-comments-open svg {width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none}
html body:is(.mm-app,.cs-app) #up-viewer .up-reply-actions {flex-basis:100%;max-width:720px}
html body:is(.mm-app,.cs-app) #up-viewer .up-view-body:has(:is(#up-view-image,#up-view-video):not([hidden])) #up-view-text {bottom:calc(140px + env(safe-area-inset-bottom,0px));max-height:30%;font-size:18px}
html body:is(.mm-app,.cs-app) #up-viewer #up-view-music {bottom:calc(132px + env(safe-area-inset-bottom,0px));max-width:560px;background:#111222b3;padding:8px 12px}
html body:is(.mm-app,.cs-app) #up-viewer:has(#up-reply-actions[hidden]) #up-view-music {bottom:calc(78px + env(safe-area-inset-bottom,0px))}
html body:is(.mm-app,.cs-app) #up-viewer:has(#up-reply-actions[hidden]) .up-view-body:has(:is(#up-view-image,#up-view-video):not([hidden])) #up-view-text {bottom:calc(90px + env(safe-area-inset-bottom,0px))}
html body:is(.mm-app,.cs-app) #up-viewer #up-view-state {bottom:calc(194px + env(safe-area-inset-bottom,0px));font-size:14px}
html body:is(.mm-app,.cs-app) #up-viewer #up-member-retry {position:absolute;z-index:8;left:50%;top:55%;transform:translateX(-50%);min-height:48px;padding:12px 20px;border:1px solid #ffffff4d;border-radius:24px;background:var(--story-action);box-shadow:0 8px 28px #0004;font-size:14px}
html body:is(.mm-app,.cs-app) #up-viewer .up-story-menu>summary:focus-visible {outline:2px solid #fff;outline-offset:3px}
html body:is(.mm-app,.cs-app) #up-viewer .up-reaction-picker {background:#18172af5;border-color:#ffffff38}

/* Personal stories use the same surfaces and blue-violet identity as the stories home. */
html body:is(.mm-app,.cs-app) #up-mine.up-mine {position:fixed;inset:0;margin:auto;width:min(580px,calc(100vw - 24px));height:min(780px,calc(var(--mm-height,100dvh) - 24px));max-height:calc(var(--mm-height,100dvh) - 24px);padding:0;border:1px solid var(--story-edge);border-radius:28px;background:radial-gradient(ellipse at top right,#7855ef12,transparent 55%),var(--story-bg);color:var(--story-text);overflow:hidden;box-shadow:0 24px 80px #07112640;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
html body:is(.mm-app,.cs-app) #up-mine.up-mine[open] {display:flex;flex-direction:column}
html body:is(.mm-app,.cs-app) #up-mine.up-mine>header {flex:none;position:relative;display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:84px;padding:18px 20px;border-bottom:1px solid var(--story-edge);background:var(--story-sheen),var(--story-glass);color:inherit;box-shadow:inset 0 1px 0 var(--story-highlight);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)}
html body:is(.mm-app,.cs-app) #up-mine .up-mine-brand {display:block;font-size:14px;font-weight:700;color:var(--story-accent);letter-spacing:1px;margin-bottom:4px}
html body:is(.mm-app,.cs-app) #up-mine #up-mine-title {font-size:24px;line-height:1.2;letter-spacing:-.7px;margin:0;font-weight:750}
html body:is(.mm-app,.cs-app) #up-mine>header button {width:44px;min-width:44px;height:44px;padding:0;border:1px solid var(--story-edge);border-radius:15px;background:var(--story-soft);color:var(--story-text);font-size:27px}
html body:is(.mm-app,.cs-app) #up-mine .up-mine-intro {display:flex;align-items:center;gap:14px;flex:none;margin:20px;padding:18px;border:1px solid var(--story-edge);border-radius:22px;background:var(--story-sheen),var(--story-surface);box-shadow:inset 0 1px 0 var(--story-highlight)}
html body:is(.mm-app,.cs-app) #up-mine .up-mine-symbol {display:grid;place-items:center;width:52px;height:52px;flex:none;border-radius:18px;color:#fff;background:var(--story-action);box-shadow:0 6px 18px #5263ef24}
html body:is(.mm-app,.cs-app) #up-mine .up-mine-symbol svg {width:28px;height:28px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
html body:is(.mm-app,.cs-app) #up-mine .up-mine-intro strong {font-size:16px;line-height:1.4}
html body:is(.mm-app,.cs-app) #up-mine .up-mine-intro p {font-size:14px;line-height:1.5;margin:5px 0 0;color:var(--story-muted)}
html body:is(.mm-app,.cs-app) #up-mine #up-mine-list {flex:1;min-height:0;padding:0 20px 16px;overflow-y:auto;overscroll-behavior:contain}
html body:is(.mm-app,.cs-app) #up-mine .up-mine-row {display:flex;align-items:center;gap:14px;width:100%;min-height:92px;margin:0 0 10px;padding:16px;border:1px solid var(--story-edge);border-radius:20px;background:var(--story-sheen),var(--story-surface);color:var(--story-text);text-align:left;box-shadow:inset 0 1px 0 var(--story-highlight)}
html body:is(.mm-app,.cs-app) #up-mine .up-person-avatar {width:48px;height:56px;border-radius:15px;background:var(--story-soft);color:var(--story-accent);font-size:22px;border:1px solid var(--story-edge)}
html body:is(.mm-app,.cs-app) #up-mine .up-mine-row>span:nth-child(2) {min-width:0;flex:1}
html body:is(.mm-app,.cs-app) #up-mine .up-mine-row strong {font-size:15px;line-height:1.4;font-weight:650}
html body:is(.mm-app,.cs-app) #up-mine .up-mine-row small {display:block;font-size:14px;line-height:1.5;color:var(--story-muted);margin-top:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html body:is(.mm-app,.cs-app) #up-mine .up-mine-bottom {flex:none;padding:12px 20px calc(20px + env(safe-area-inset-bottom,0px));border-top:1px solid var(--story-edge);background:var(--story-sheen),var(--story-glass)}
html body:is(.mm-app,.cs-app) #up-mine .up-hint {font-size:14px;line-height:1.5;color:var(--story-muted);margin:8px 0 14px}
html body:is(.mm-app,.cs-app) #up-mine #up-mine-new {display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:52px;padding:13px 20px;border:1px solid #ffffff36;border-radius:26px;background:var(--story-action);color:#fff;font-size:16px;font-weight:650;box-shadow:inset 0 1px 0 #ffffff40,0 6px 18px #5263ef1f}
html body:is(.mm-app,.cs-app) #up-mine #up-mine-new>span {font-size:24px;line-height:1}
html body:is(.mm-app,.cs-app) #up-mine button:focus-visible {outline:2px solid var(--story-accent);outline-offset:3px}
@media(max-width:700px) {html body:is(.mm-app,.cs-app) #up-mine.up-mine {inset:var(--mm-viewport-top,0px) 0 auto;margin:0;width:100%;max-width:100vw;height:var(--mm-height,100dvh);max-height:var(--mm-height,100dvh);border:0;border-radius:0}html body:is(.mm-app,.cs-app) #up-mine.up-mine>header {padding-top:calc(18px + env(safe-area-inset-top,0px))}}
@media(max-width:360px) {html body:is(.mm-app,.cs-app) #up-viewer .up-view-avatar {flex-basis:32px;width:32px;height:32px}html body:is(.mm-app,.cs-app) #up-viewer.up-viewer>header {gap:4px;padding-inline:8px}html body:is(.mm-app,.cs-app) #up-viewer #up-comments-open,html body:is(.mm-app,.cs-app) #up-viewer #up-viewers-open {font-size:13px;padding-inline:10px}html body:is(.mm-app,.cs-app) #up-mine .up-mine-intro {margin:16px;padding:14px}}
@media(prefers-reduced-transparency:reduce),(prefers-contrast:more) {html body:is(.mm-app,.cs-app) #up-viewer .up-story-menu-items,html body:is(.mm-app,.cs-app) #up-viewer .up-story-menu>summary,html body:is(.mm-app,.cs-app) #up-viewer #up-view-music {background:#151526;backdrop-filter:none;-webkit-backdrop-filter:none}}
html body.cs-app #pb-updates.up-screen>.up-floating {padding-bottom:calc(14px + env(safe-area-inset-bottom,0px))}
@media(max-height:600px) {
  html body:is(.mm-app,.cs-app) #pb-updates.up-screen>.up-header {min-height:64px;padding-top:8px;padding-bottom:8px}
  html body:is(.mm-app,.cs-app) #pb-updates.up-screen .up-section-title {margin:16px 0 10px}
  html body:is(.mm-app,.cs-app) #pb-updates.up-screen .up-stories {min-height:126px;padding-bottom:10px}
  html body:is(.mm-app,.cs-app) #pb-updates.up-screen .up-story,html body:is(.mm-app,.cs-app) #pb-updates.up-screen #up-my-new {min-height:116px}
  html body:is(.mm-app,.cs-app) #pb-updates.up-screen .up-story .up-ring,html body:is(.mm-app,.cs-app) #pb-updates.up-screen #up-my-new .up-ring {width:70px;height:70px}
  html body:is(.mm-app,.cs-app) #pb-updates.up-screen>.up-floating {padding-top:8px;padding-bottom:8px}
  html body:is(.mm-app,.cs-app) #pb-updates.up-screen>.up-nav {min-height:58px;margin-bottom:calc(6px + env(safe-area-inset-bottom,0px))}
  html body:is(.mm-app,.cs-app) #pb-updates.up-screen .up-nav button {min-height:46px}
}
