/* Reversible SEG local prototype. No rules apply to ordinary URLs or other stores. */
[data-video-browse-preview] { --browse-ink:#492033; --browse-line:#ead4df; --browse-accent:#a82f5c; --browse-bar-height:76px; }
[data-video-browse-preview] .public-site { background:#fffafd; }
.browse-context-top a { display:inline-flex; min-height:44px; align-items:center; color:var(--browse-accent); font-size:13px; }
[data-video-browse-preview] .video-library { max-width:1224px; padding:14px 24px 40px; margin:auto; }
[data-video-browse-preview] [data-video-library-content] { display:flex; flex-direction:column; }
[data-video-browse-preview] .video-filters { order:-3; margin:0 0 14px; border:0; gap:8px; padding:0; }
.browse-list-toolbar { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px; order:-2; min-height:44px; margin-bottom:4px; }
.browse-list-toolbar strong { color:var(--browse-ink); font-size:14px; }
body[data-video-browse-preview] .browse-view-tabs { display:grid; grid-template-columns:1fr 1fr; gap:4px; width:100%; max-width:360px; padding:4px; background:#f9edf2; border:1px solid var(--browse-line); border-radius:10px; }
body[data-video-browse-preview] .browse-view-tabs :is(a,button) { display:flex; align-items:center; justify-content:center; min-height:44px; padding:6px 10px; margin:0; color:var(--browse-accent); background:transparent; border:0; border-radius:7px; box-shadow:none; font:700 14px/1.4 var(--font-sans),sans-serif; white-space:nowrap; }
body[data-video-browse-preview] .browse-view-tabs .is-active { background:var(--browse-accent); color:white; }
body[data-video-browse-preview] .browse-view-tabs .is-active span { background:#fff; color:var(--browse-accent); }
.browse-library-options { order:-1; margin-bottom:10px; }
.browse-library-options summary { min-height:44px; padding:10px 0; cursor:pointer; color:var(--browse-accent); font-size:13px; }
.browse-library-options[open] summary { margin-bottom:8px; }
[data-video-browse-preview] .video-filters a { min-height:44px; padding:10px 18px; border-radius:9px; border:1px solid var(--browse-line); font-size:14px; }
[data-video-browse-preview] .video-search-row { order:-2; margin:0; gap:8px; }
[data-video-browse-preview] .video-search,[data-video-browse-preview] .video-search-submit { height:44px; min-height:44px; }
[data-video-browse-preview] .video-search { border-radius:9px; }
[data-video-browse-preview] .video-tools { order:-1; margin:8px 0 0; border:0; padding:8px 0; }
[data-video-browse-preview] .video-grid { margin-top:8px; gap:26px 24px; }
[data-video-browse-preview] .video-card-link { color:var(--browse-ink); }
[data-video-browse-preview] .video-poster { border-radius:10px; }
[data-video-browse-preview] .video-item-copy { display:flex; flex-direction:column; padding:10px 120px 0 0; }
[data-video-browse-preview] .video-item-copy strong { order:-1; font:700 19px/1.5 var(--font-sans),sans-serif; }
[data-video-browse-preview] .video-item-meta { margin-top:4px; font-size:12px; }
[data-video-browse-preview] .video-item-copy > span:last-child { display:none; }
[data-video-browse-preview] .video-favorite { top:auto; bottom:0; right:0; min-width:100px; min-height:44px; padding:8px 12px; box-shadow:none; background:white; border:1px solid var(--browse-line); border-radius:8px; color:var(--browse-accent); }
[data-video-browse-preview] .video-favorite b { font-size:14px; }
[data-video-browse-preview] .video-favorite.is-saved { background:#f9e8ef; border-color:#bf4770; color:var(--browse-accent); }
[data-video-browse-preview] .video-favorite.is-saved span { color:var(--browse-accent); }
.browse-card-duration { position:absolute; bottom:8px; right:8px; background:#261b23d9; color:white; font:13px/1.4 sans-serif; padding:3px 6px; border-radius:5px; }
[data-video-browse-preview] .video-detail { max-width:1176px; padding:14px 24px 32px; margin:auto; }
.browse-context { margin-bottom:12px; }
.browse-context-top { display:flex; align-items:center; gap:12px; min-height:44px; }
.browse-context-top > a { flex-shrink:0; }
.browse-desktop-categories { display:flex; flex:1; min-width:0; flex-wrap:wrap; gap:6px; }
.browse-desktop-categories a { display:flex; align-items:center; min-height:44px; padding:8px 12px; color:var(--browse-ink); font-size:13px; border:1px solid var(--browse-line); border-radius:8px; white-space:nowrap; }
.browse-desktop-categories a[aria-current] { background:var(--browse-accent); color:white; border-color:var(--browse-accent); font-weight:700; }
.browse-filter-summary { margin:8px 0 0; font-size:12px; color:#896d7c; overflow-wrap:anywhere; }
[data-video-browse-preview] .video-detail-layout { gap:32px; grid-template-columns:minmax(0,1.4fr) minmax(320px,1fr); }
[data-video-browse-preview] .video-detail-player { margin:0; box-shadow:none; border-radius:12px; }
.browse-carousel { position:relative; min-width:0; overflow:hidden; overflow-anchor:none; border-radius:12px; touch-action:pan-y pinch-zoom; }
.browse-carousel-track { position:absolute; inset:0; width:100%; }
.browse-carousel-panel { position:absolute; top:0; width:100%; display:grid; justify-items:center; }
/* Touch listeners stop only horizontal swipes; native vertical scroll/pinch stays available. */
.browse-carousel.uses-touch-swipe,.browse-carousel.uses-touch-swipe [data-single-player] { touch-action:auto; }
[data-video-browse-preview] .browse-carousel .video-detail-player { width:100%; }
[data-video-browse-preview] .browse-carousel [data-single-player] { transform:none; }
.browse-carousel-status:empty { display:none; }
.browse-carousel-status button,.browse-carousel-status a { display:inline-flex; align-items:center; min-height:44px; margin:0 8px; padding:6px 10px; color:var(--browse-accent); font:inherit; }
@media (prefers-reduced-motion:reduce) { .browse-carousel { transition:none !important; } }
[data-video-browse-preview] [data-single-player] { touch-action:pan-y pinch-zoom; transform:translateX(var(--browse-swipe-x,0)); }
[data-video-browse-preview] [data-single-player].is-swiping { will-change:transform; cursor:grabbing; }
[data-video-browse-preview] [data-single-player].is-swiping button { cursor:grabbing; }
[data-video-browse-preview] .single-player-no-script { position:absolute; bottom:12px; left:12px; right:12px; margin:0; background:white; border-radius:8px; text-align:center; }
[data-video-browse-preview] .single-player-no-script a { display:flex; align-items:center; justify-content:center; min-height:44px; color:var(--browse-accent); }
[data-video-browse-preview] .video-detail-copy { padding-top:0; min-width:0; }
[data-video-browse-preview] .video-detail-copy h1 { font:700 24px/1.4 var(--font-sans),sans-serif; letter-spacing:0; color:var(--browse-ink); margin:0 0 4px; }
[data-video-browse-preview] .video-detail-copy > p:first-child { font-size:12px; margin:0 0 5px; }
[data-video-browse-preview] .video-detail-facts { border:0; margin:8px 0; padding:0; }
.browse-description { margin-top:10px; }
.browse-description summary { min-height:44px; display:flex; align-items:center; cursor:pointer; color:#896d7c; font-size:13px; }
.browse-description summary::before { content:'＋'; margin-right:8px; }
.browse-description[open] summary::before { content:'−'; }
.browse-description .video-detail-description { margin:0 0 12px; line-height:1.8; }
.browse-description .browse-original { display:inline-flex; align-items:center; min-height:44px; font-size:12px; color:var(--browse-accent); }
.browse-video-meta { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:8px; }
.browse-video-meta > p { display:flex; flex-wrap:wrap; gap:4px 12px; margin:0; font-size:12px; color:#896d7c; min-width:0; }
.browse-video-meta > p span { white-space:nowrap; }
body[data-video-browse-preview] .browse-video-meta .video-detail-actions { margin:0; gap:4px; flex-shrink:0; }
body[data-video-browse-preview] .browse-video-meta .video-detail-actions > button { min-height:44px; padding:8px 10px; border:0; border-radius:8px; background:transparent; color:var(--browse-accent); box-shadow:none; font-size:13px; }
body[data-video-browse-preview] .browse-video-meta .video-detail-actions > .video-favorite { width:auto; min-width:100px; padding:8px 12px; border:1px solid var(--browse-line); background:white; }
body[data-video-browse-preview] .browse-video-meta .video-detail-actions > .video-favorite[aria-pressed="true"] { background:#f9e8ef; border-color:#bf4770; color:var(--browse-accent); }
body[data-video-browse-preview] .video-detail-page[data-favorite-store="segretario"] .browse-video-meta .video-detail-actions > [data-video-share-open] { border:1px solid #b56f89; background:#fff; color:var(--browse-accent); }
body[data-video-browse-preview] .video-detail-page[data-favorite-store="segretario"] .browse-video-meta .video-detail-actions > [data-video-share-open]:hover { border-color:var(--browse-accent); background:#f9e8ef; color:var(--browse-accent); transform:none; }
.browse-next { padding-top:8px; }
.browse-step-nav { display:grid; grid-template-columns:minmax(0,1fr) auto minmax(0,1fr); align-items:center; gap:10px; margin-bottom:8px; }
.browse-step-link { display:flex; align-items:center; justify-content:center; min-height:44px; padding:8px; margin:0; border:1px solid var(--browse-line); border-radius:8px; background:white; color:var(--browse-accent); font:600 13px/1.4 var(--font-sans),sans-serif; }
.browse-step-link.browse-step-next { color:white; background:var(--browse-accent); border-color:var(--browse-accent); }
.browse-step-link:disabled { color:#967d88; background:#f5f1f3; border-color:#e8dfe3; cursor:not-allowed; }
.browse-step-nav > span { min-width:46px; text-align:center; font-size:13px; color:var(--browse-ink); white-space:nowrap; }
.browse-next-card { display:grid; grid-template-columns:72px minmax(0,1fr); align-items:center; gap:8px; color:var(--browse-ink); min-height:64px; padding:8px; background:#fcf1f5; border-radius:10px; }
.browse-next-card img { width:72px; height:auto; aspect-ratio:16/9; object-fit:cover; border-radius:6px; }
.browse-next-card strong { font-size:14px; line-height:1.5; display:block; }
.browse-next p { font-size:12px; color:#896d7c; margin:10px 0 0; }
.browse-list-link { display:inline-flex; align-items:center; min-height:44px; color:var(--browse-accent); font-size:13px; }
[data-video-browse-preview] :focus-visible { outline:3px solid #b62e61; outline-offset:3px; }
/* Site-owned enlarged layer: above fixed navigation, below native dialog top layer.
   The video stays in its original DOM position, preserving iOS playback. */
.browse-large-header[hidden], .browse-large-open[hidden], .browse-large-list[hidden] { display:none!important; }
body[data-video-browse-preview] .browse-video-meta:has(.browse-large-open) { flex-wrap:wrap; }
body[data-video-browse-preview] .browse-video-meta .video-detail-actions:has(.browse-large-open) { display:flex; flex-wrap:nowrap; width:100%; gap:6px; }
body[data-video-browse-preview] .browse-video-meta .video-detail-actions:has(.browse-large-open) > button { flex:1 1 0; min-width:44px; white-space:nowrap; }
body[data-video-browse-preview] .browse-video-meta .video-detail-actions > .browse-large-open { border:1px solid var(--browse-accent); background:#fff8fb; font-weight:700; }
html.browse-large-active, body.browse-large-active { overflow:hidden; overscroll-behavior:none; }
body.browse-large-active :is(.mobile-contact-bar,.guide-chat-launcher,.consultation-resume) { visibility:hidden; }
/* Local DebugKit must not cover the enlarged viewer's bottom actions. */
body.browse-large-active iframe[src*="/debug-kit/toolbar/"] { visibility:hidden; }
body[data-video-browse-preview] .video-detail.is-large-view {
  --large-room:max(164px,calc(100dvh - 118px - env(safe-area-inset-top) - env(safe-area-inset-bottom)));
  position:fixed; z-index:2000; inset:0; width:100%; max-width:none; height:100vh; height:100dvh;
  padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom); margin:0;
  display:grid; grid-template-rows:44px minmax(0,1fr); gap:0; background:#fffafd; color:var(--browse-ink);
  overflow:auto; overscroll-behavior:contain; box-sizing:border-box;
}
.is-large-view .browse-large-header { display:grid; grid-template-columns:minmax(0,1fr) auto minmax(0,1fr); align-items:center; gap:6px; max-width:960px; width:100%; margin:auto; padding:0 6px; box-sizing:border-box; }
.browse-large-header button { justify-self:start; min-height:44px; margin:0; padding:6px; border:0; background:transparent; color:var(--browse-accent); font:700 13px/1.4 var(--font-sans),sans-serif; white-space:nowrap; cursor:pointer; }
.browse-large-brand { font:18px/1.2 var(--font-serif),serif; letter-spacing:.12em; color:var(--browse-accent); }
.browse-large-category { min-width:0; font-size:11px; line-height:1.3; text-align:right; overflow-wrap:anywhere; }
.is-large-view > .browse-context { display:none; }
body[data-video-browse-preview] .is-large-view .video-detail-layout { display:flex; flex-direction:column; gap:0; align-items:center; min-height:0; height:100%; width:100%; max-width:960px; margin:0 auto; }
body[data-video-browse-preview] .is-large-view .browse-carousel { flex:1 1 auto; width:100%; min-height:164px; border-radius:12px; transition:none!important; }
body[data-video-browse-preview] .is-large-view .browse-carousel-panel { height:100%; align-items:center; }
body[data-video-browse-preview] .is-large-view .video-detail-player[data-video-player][data-orientation] {
  width:min(100%,calc(var(--large-room) * var(--video-ratio))); height:auto; min-width:0;
  max-height:none; margin:auto; aspect-ratio:var(--video-ratio); background:transparent;
}
body[data-video-browse-preview] .is-large-view .single-player-preview { background:#fffafd; }
body[data-video-browse-preview] .is-large-view .video-detail-copy {
  flex:0 0 auto; position:relative; width:min(100%,640px); padding:4px 6px 0; margin:0;
  display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:0 4px;
  border:0; border-top:1px solid var(--browse-line); border-radius:0; background:#fff4f9f5;
  backdrop-filter:blur(12px); box-sizing:border-box;
}
body[data-video-browse-preview] .is-large-view .video-detail-copy h1 { grid-column:1 / -1; font-size:14px; line-height:1.4; margin:0; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:1; overflow:hidden; }
body[data-video-browse-preview] .is-large-view .browse-video-meta { margin:0; display:block; min-width:0; }
.is-large-view .browse-video-meta > p, .is-large-view .browse-description, .is-large-view .browse-next-card,
.is-large-view .browse-next > p, .is-large-view .browse-next > a { display:none; }
body[data-video-browse-preview] .is-large-view .browse-video-meta .video-detail-actions { display:flex; align-items:center; justify-content:flex-end; gap:0; }
body[data-video-browse-preview] .is-large-view .video-detail-actions > :is(button,.browse-large-list) { flex:1 1 0; min-width:44px; padding:4px; font-size:12px; }
body[data-video-browse-preview] .is-large-view .video-detail-actions > .browse-large-list { display:flex; align-items:center; justify-content:center; min-height:44px; color:var(--browse-accent); font:700 12px/1.4 var(--font-sans),sans-serif; }
body[data-video-browse-preview] .is-large-view .video-detail-actions > .video-favorite { min-width:54px; background:transparent; border:0; }
.is-large-view .browse-next { padding:0; min-width:0; }
.is-large-view .browse-step-nav { margin:0; gap:0; grid-template-columns:minmax(44px,1fr) auto minmax(44px,1fr); }
.is-large-view .browse-step-link { min-width:44px; padding:4px; border:0; background:transparent!important; color:var(--browse-accent)!important; font-size:11px; white-space:nowrap; }
.is-large-view .browse-step-link:disabled { opacity:.4; }
.is-large-view .browse-step-nav > span { font-size:11px; padding:0 2px; }
.is-large-view .browse-carousel-status { grid-column:1 / -1; padding:2px 0; }
@media (prefers-reduced-transparency:reduce) { body[data-video-browse-preview] .is-large-view .video-detail-copy { background:#fff4f9; backdrop-filter:none; } }
@media (max-height:500px) and (orientation:landscape) {
  body[data-video-browse-preview] .video-detail.is-large-view { --large-room:max(164px,calc(100dvh - 64px)); grid-template-rows:44px minmax(0,1fr); }
  body[data-video-browse-preview] .is-large-view .video-detail-layout { flex-direction:row; gap:12px; }
  body[data-video-browse-preview] .is-large-view .video-detail-copy { width:230px; flex-shrink:0; grid-template-columns:minmax(0,1fr); }
}
@media (max-width:760px) {
  [data-video-browse-preview] .public-site { padding-bottom:calc(var(--browse-bar-height) + env(safe-area-inset-bottom)); }
  [data-video-browse-preview] .video-library { padding:2px 16px 20px; }
  [data-video-browse-preview] .video-filters { flex-wrap:nowrap; overflow-x:auto; padding-bottom:4px; margin-bottom:10px; }
  [data-video-browse-preview] .video-filters a { flex-shrink:0; padding:8px 14px; }
  [data-video-browse-preview] .video-tools { flex-wrap:wrap; }
  body[data-video-browse-preview] .video-tools .video-sort { flex:1 1 100%; justify-content:flex-end; margin:0; padding-right:0; }
  [data-video-browse-preview] .video-sort select { min-width:0; max-width:230px; min-height:44px; }
  [data-video-browse-preview] .video-item-copy strong { font-size:17px; }
  [data-video-browse-preview] .video-grid { grid-template-columns:1fr; gap:22px; }
  /* Only the library uses two columns; detail/recommendation cards stay unchanged. */
  [data-video-browse-preview] .video-library .video-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:22px 12px; align-items:stretch; }
  [data-video-browse-preview] .video-library .video-item { display:flex; flex-direction:column; min-width:0; }
  [data-video-browse-preview] .video-library .video-card-link { flex:1; min-width:0; }
  [data-video-browse-preview] .video-library .video-item-copy { margin-top:0; padding:8px 0 0; gap:4px; overflow-wrap:anywhere; }
  [data-video-browse-preview] .video-library .video-item-copy strong { min-height:3em; font-size:15px; line-height:1.5; }
  [data-video-browse-preview] .video-library .video-item-meta { margin-top:0; line-height:1.5; }
  [data-video-browse-preview] .video-library .video-favorite { position:static; align-self:flex-end; margin-top:8px; max-width:100%; }
  [data-video-browse-preview] .video-detail { padding:2px 16px 24px; }
  .browse-context { margin-bottom:4px; }
  .browse-desktop-categories { flex-wrap:nowrap; overflow-x:auto; overscroll-behavior-inline:contain; scrollbar-width:thin; padding-block:3px; }
  .browse-desktop-categories a { flex-shrink:0; }
  [data-video-browse-preview] .video-detail-layout { grid-template-columns:1fr; gap:8px; }
  body[data-video-browse-preview] .video-detail-player[data-video-player][data-orientation="portrait"] { --player-room:max(200px,calc(100svh - 370px)); width:min(100%,calc(var(--player-room) * var(--video-ratio))); min-width:min(100%,164px); max-height:none; margin-inline:auto; aspect-ratio:var(--video-ratio); }
  [data-video-browse-preview] .video-detail-copy h1 { font-size:19px; margin-bottom:2px; }
  [data-video-browse-preview] .video-detail-facts { font-size:11px; }
  .browse-video-meta { margin-bottom:4px; }
  .browse-next { padding-top:0; }
}
