/* No permanent dark surfaces on light-mode discovery. */
html:not([data-theme="dark"]) body.app-shell.app-shell--discover{--discover-surface:#fff;--discover-navy:#172438;background:#fff!important;color:#172438!important}
html:not([data-theme="dark"]) body.app-shell.app-shell--discover .app-shell__content,
html:not([data-theme="dark"]) body.app-shell.app-shell--discover .discovery-v3-feed,
html:not([data-theme="dark"]) body.app-shell.app-shell--discover .discovery-v3-slide--post{background:#fff!important;color:#172438!important}
html:not([data-theme="dark"]) body.app-shell.app-shell--discover .discovery-v3-slide--post:after{background:none!important}
html:not([data-theme="dark"]) body.app-shell.app-shell--discover .discovery-v3-slide--post .discovery-v3-media-surface,
html:not([data-theme="dark"]) body.app-shell.app-shell--discover .discovery-v3-slide--post .discovery-v3-media-item :is(img,video){background:#fff!important}
html:not([data-theme="dark"]) body.app-shell.app-shell--discover .cd-tabs{background:#edf2f8!important;border-color:#dce4ee!important;box-shadow:none!important}
html:not([data-theme="dark"]) body.app-shell.app-shell--discover .cd-tabs a:not([aria-current]){color:#526278!important}
html:not([data-theme="dark"]) body.app-shell.app-shell--discover .cd-tabs a[aria-current]{color:#fff!important}
html:not([data-theme="dark"]) body.app-shell.app-shell--discover .discovery-v3-copy{background:#fffffff2!important;color:#172438!important;text-shadow:none!important}
html:not([data-theme="dark"]) body.app-shell.app-shell--discover .discovery-v3-slide--post :is(.discovery-v3-head strong,.discovery-v3-head a,.discovery-v3-copy>p,.discovery-v3-likers,.discovery-v3-more summary){color:#172438!important;text-shadow:none!important}
html:not([data-theme="dark"]) body.app-shell.app-shell--discover .discovery-v3-head small{color:#68798d!important;text-shadow:none!important}
html:not([data-theme="dark"]) body.app-shell.app-shell--discover .discovery-v3-slide--post .discovery-v3-rail :is(a,button){color:#172438!important;background:#ffffffc9!important;text-shadow:none!important}
html:not([data-theme="dark"]) body.app-shell.app-shell--discover .discovery-v3-slide--post .discovery-v3-rail button.is-liked{color:#ff008a!important}
html:not([data-theme="dark"]) body.app-shell.app-shell--discover .discovery-v3-slide--post .discovery-v3-action-count{color:#172438!important;text-shadow:0 1px 3px #fff!important}
html:not([data-theme="dark"]) body.app-shell.app-shell--discover :is(.discovery-v3-empty,.discovery-v3-empty p,.discovery-v3-toolbar){color:#172438!important;text-shadow:none!important}

/* Media overlays stay transparent; only the page chrome follows light mode. */
html:root body.app-shell.app-shell--discover .discovery-v3-slide--post:after{content:""!important;position:absolute;inset:0;z-index:2;pointer-events:none;background:linear-gradient(180deg,transparent 62%,rgba(0,0,0,.68) 100%)!important}
html:root body.app-shell.app-shell--discover .discovery-v3-slide--post .discovery-v3-copy{background:transparent!important;box-shadow:none!important;border:0!important;border-radius:0!important;color:#fff!important}
html:root body.app-shell.app-shell--discover .discovery-v3-slide--post :is(.discovery-v3-head strong,.discovery-v3-head a,.discovery-v3-copy>p,.discovery-v3-likers,.discovery-v3-more summary){color:#fff!important;text-shadow:0 1px 4px #0009!important}
html:root body.app-shell.app-shell--discover .discovery-v3-slide--post .discovery-v3-head small{color:#e0e7ef!important;text-shadow:0 1px 4px #0009!important}
html:root body.app-shell.app-shell--discover .discovery-v3-slide--post .discovery-v3-rail :is(a,button){background:transparent!important;border:0!important;box-shadow:none!important;backdrop-filter:none!important;color:#fff!important;text-shadow:0 1px 4px #0009!important}
html:root body.app-shell.app-shell--discover .discovery-v3-slide--post .discovery-v3-rail button.is-liked{color:#ff008a!important}
html:root body.app-shell.app-shell--discover .discovery-v3-slide--post .discovery-v3-action-count{color:#fff!important;text-shadow:0 1px 4px #0009!important}
/* Reserve tab and caption space instead of covering the source photograph. */
html:root body.app-shell--discover .cd-tabs{position:relative!important;top:auto!important;left:auto!important;right:auto!important;margin:calc(10px + env(safe-area-inset-top)) 14px 10px!important;width:auto!important}
html:root body.app-shell--discover .discovery-v3-toolbar{display:none}
html:root body.app-shell--discover .discovery-v3-slide--post{display:grid;grid-template-rows:minmax(0,1fr) auto}
html:root body.app-shell--discover .discovery-v3-slide--post>.discovery-v3-media-surface{width:100%!important;height:100%!important;min-height:0;aspect-ratio:auto!important;margin:0!important;max-height:100%}
html:root body.app-shell.app-shell--discover .discovery-v3-slide--post .discovery-v3-copy{position:relative!important;inset:auto!important;max-height:135px!important;margin:0 54px 22px 0;padding:10px 16px!important;overflow-y:auto;background:transparent!important;color:var(--discover-caption-color,#172438)!important}
html:root body.app-shell.app-shell--discover .discovery-v3-slide--post:after{content:none!important}
html:root body.app-shell.app-shell--discover .discovery-v3-slide--post :is(.discovery-v3-head strong,.discovery-v3-head a,.discovery-v3-head small,.discovery-v3-copy>p,.discovery-v3-likers,.discovery-v3-more summary){color:var(--discover-caption-color,#172438)!important;text-shadow:none!important}
html[data-theme=dark] body.app-shell--discover{--discover-caption-color:#fff}
html:root body.app-shell--discover .discovery-v3-slide--post>.discovery-v3-more{bottom:30px}
html:root body.app-shell--discover .discovery-v3-slide--native .discovery-v3-head{top:14px!important}
html:root body.app-shell--discover .discovery-v3-slide--post .discovery-v3-media-item :is(img,video){width:100%!important;height:100%!important;min-height:0;object-fit:contain!important;object-position:center}
html:root.discover-edge-to-edge body.app-shell.app-shell--discover .discovery-v3-slide--post .discovery-v3-media-item :is(img,video){width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important;object-position:center!important}
