/* La Bétaillère — finite, lightweight visual feedback. No layout changes. */
html[data-lb-v4-live="1"] body.lb-v3 #home .home-dashboard > .home-card[aria-label]{
  border-color:rgba(104,237,247,.19)!important;
  background:linear-gradient(150deg,rgba(10,35,47,.96),rgba(3,17,27,.98))!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.045),0 6px 18px rgba(0,0,0,.14)!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
}
html[data-lb-v4-live="1"] body.lb-v3 #home #homeFavSlot .home-fav-row{
  border-color:rgba(104,237,247,.23)!important;
  background:linear-gradient(150deg,rgba(12,43,56,.97),rgba(3,20,31,.99))!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.035)!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
}
html[data-lb-v4-live="1"] body.lb-v3 #home #homeFavSlot .home-fav-row:is(.is-active,.is-live){
  border-color:rgba(73,232,155,.48)!important;
  box-shadow:inset 3px 0 0 rgba(73,232,155,.65),0 0 12px rgba(73,232,155,.07)!important;
}
html[data-lb-v4-live="1"] body.lb-v3 #home :is(.home-fav-route,.home-fav-train-no,.lb-chat-row-message,.lb-chat-row-meta,.home-fav-empty,.home-fav-note){
  font-family:system-ui,-apple-system,"Segoe UI",sans-serif!important;
  text-shadow:none!important;
  letter-spacing:normal!important;
}
html[data-lb-v4-live="1"] body.lb-v3 #home .lb-chat-row-message{
  font-size:11px!important;
  line-height:1.25!important;
  color:#d9e9ee!important;
}
html[data-lb-v4-live="1"] body.lb-v3 #home .lb-chat-row-meta{
  font-size:10px!important;
}
html[data-lb-v4-live="1"] body.lb-v3 #home #homeLiveWallFeed .lb-chat-row{
  border-color:rgba(104,237,247,.09)!important;
}
html[data-lb-v4-live="1"] body.lb-v3 #home .lb-comment-actions{
  align-items:center!important;
  gap:3px!important;
}
html[data-lb-v4-live="1"] body.lb-v3 #home .lb-comment-action{
  border-color:transparent!important;
  background:transparent!important;
  opacity:.8!important;
}
html[data-lb-v4-live="1"] body.lb-v3 #home .lb-comment-reaction-summary{
  border-color:rgba(104,237,247,.26)!important;
  background:rgba(29,93,109,.22)!important;
  opacity:1!important;
}
/* The count already opens the same picker; keep one reaction entry per row. */
html[data-lb-v4-live="1"] body.lb-v3 #home .lb-comment-actions:has(.lb-comment-reaction-summary[data-comment-react]) .lb-comment-react{
  display:none!important;
}
html[data-lb-v4-live="1"] body.lb-v3 #home :is(.home-fav-row,.home-quick-presets__btn,button,a):focus-visible{
  outline:2px solid #78edfa!important;
  outline-offset:3px!important;
}
html[data-lb-v4-live="1"] body.lb-v3 #favTrainsWidget .fav-route-stop{
  font-family:system-ui,-apple-system,"Segoe UI",sans-serif!important;
  letter-spacing:normal!important;
}
html[data-lb-v4-live="1"] body.lb-v3 #favTrainsWidget .fav-route-row.is-next .fav-route-node{
  box-shadow:0 0 8px rgba(89,239,249,.4)!important;
  animation:none!important;
}
/* Only an actual time/status change triggers a short opacity wash. */
html[data-lb-v4-live="1"] body.lb-v3 #home #homeFavSlot .home-fav-row.lb-polish-updated::after{
  content:"";
  position:absolute;
  inset:0;
  border-radius:inherit;
  pointer-events:none;
  background:linear-gradient(110deg,rgba(104,237,247,.16),transparent 75%);
  animation:lb-polish-update .32s ease-out both;
}
@keyframes lb-polish-update{from{opacity:1}to{opacity:0}}
@media (hover:hover) and (pointer:fine){
  html[data-lb-v4-live="1"] body.lb-v3 #home #homeFavSlot .home-fav-row:hover{
    border-color:rgba(104,237,247,.55)!important;
  }
  html[data-lb-v4-live="1"] body.lb-v3 #home .lb-comment-action:hover{
    background:rgba(104,237,247,.1)!important;
    opacity:1!important;
  }
}
@media (prefers-reduced-motion:no-preference){
  html[data-lb-v4-live="1"] body.lb-v3 #home :is(.home-quick-presets__btn,.lb-comment-action,.lb-comment-reaction-summary){
    transition:transform .14s ease-out,opacity .14s ease-out!important;
  }
  html[data-lb-v4-live="1"] body.lb-v3 #home :is(.home-quick-presets__btn,.lb-comment-action,.lb-comment-reaction-summary):active{
    transform:scale(.97)!important;
  }
}
@media (prefers-reduced-motion:reduce){
  html[data-lb-v4-live="1"] body.lb-v3 #home *,
  html[data-lb-v4-live="1"] body.lb-v3 #home *::before,
  html[data-lb-v4-live="1"] body.lb-v3 #home *::after,
  html[data-lb-v4-live="1"] body.lb-v3 #favTrainsWidget :is(.fav-route-node,.fav-route-node::before,.fav-route-node::after){
    animation:none!important;
    transition:none!important;
    scroll-behavior:auto!important;
  }
}

/* Shared rows align both tickets even when only one has a date or delay. */
html[data-lb-v4-live="1"] body.lb-v3 #home #homeFavSlot .home-fav-time{
  align-self:start!important;
}
@supports (grid-template-rows:subgrid){
  html[data-lb-v4-live="1"] body.lb-v3 #home #homeFavSlot:has(>.home-fav-row){
    grid-template-rows:repeat(4,auto)!important;
    row-gap:4px!important;
    align-items:stretch!important;
  }
  html[data-lb-v4-live="1"] body.lb-v3 #home #homeFavSlot>.home-fav-row{
    grid-row:span 4!important;
    grid-template-rows:subgrid!important;
    row-gap:4px!important;
  }
  @media (max-width:720px),(hover:none) and (pointer:coarse) and (max-width:900px){
    html[data-lb-v4-live="1"] body.lb-v3 #home #homeFavSlot:has(>.home-fav-row),
    html[data-lb-v4-live="1"] body.lb-v3 #home #homeFavSlot>.home-fav-row{
      row-gap:2px!important;
    }
  }
}
@supports not (grid-template-rows:subgrid){
  html[data-lb-v4-live="1"] body.lb-v3 #home #homeFavSlot .home-fav-time{min-height:42px!important;}
  @media (max-width:720px){
    html[data-lb-v4-live="1"] body.lb-v3 #home #homeFavSlot .home-fav-time{min-height:32px!important;}
  }
}
/* Static light only; the rail represents the route, never an invented position. */
html[data-lb-v4-live="1"] body.lb-v3 #home #homeFavSlot .home-fav-row{
  box-shadow:inset 0 1px 0 rgba(255,255,255,.07),inset 0 2px 0 color-mix(in srgb,var(--lb-fav-accent,#68edf7) 18%,transparent)!important;
}
html[data-lb-v4-live="1"] body.lb-v3 #home #homeFavSlot .home-fav-row .home-fav-route{
  --lb-rail:var(--lb-fav-accent,#68edf7);
  background:
    radial-gradient(circle at 5px 3px,var(--lb-rail) 0 2px,color-mix(in srgb,var(--lb-rail) 22%,transparent) 2.5px 4px,transparent 4.5px),
    radial-gradient(circle at calc(100% - 5px) 3px,var(--lb-rail) 0 2px,color-mix(in srgb,var(--lb-rail) 22%,transparent) 2.5px 4px,transparent 4.5px),
    linear-gradient(90deg,color-mix(in srgb,var(--lb-rail) 70%,transparent),color-mix(in srgb,var(--lb-rail) 40%,transparent)) 5px 3px/calc(100% - 10px) 1px no-repeat!important;
}
html[data-lb-v4-live="1"] body.lb-v3 #home #homeFavSlot .home-fav-row:has(.fav-state-running){
  --lb-fav-accent:#49e89b;
  border-color:rgba(73,232,155,.4)!important;
}

html[data-lb-v4-live="1"] body.lb-v3 #home #homeFavSlot .home-fav-row::before{
  /* Pas de traits flottants aux coins des cartes : halo discret uniquement. */
  background:linear-gradient(120deg,rgba(104,237,247,.025),transparent 40%,rgba(104,237,247,.012))!important;
  opacity:.65;
}

/* The banner flows behind favourites; opacity grows towards the lower content. */
html[data-lb-v4-live="1"] body.lb-v3 #home .home-dashboard>.home-card[aria-label="Mes Bétaillères favorites"]{
  background:linear-gradient(180deg,rgba(6,31,44,.68) 0%,rgba(5,28,41,.78) 20%,rgba(3,22,34,.94) 66%,rgba(2,18,29,.99) 100%)!important;
  border-top-color:rgba(104,237,247,.22)!important;
  border-right-color:rgba(104,237,247,.19)!important;
  border-left-color:rgba(104,237,247,.19)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.045),inset 0 -1px 0 rgba(104,237,247,.12)!important;
}
html[data-lb-v4-live="1"] body.lb-v3 #home #homeFavSlot .home-fav-row{
  background:linear-gradient(180deg,rgba(8,34,47,.88) 0%,rgba(4,25,37,.94) 44%,rgba(3,18,29,.98) 100%)!important;
}
html[data-lb-v4-live="1"] body.lb-v3 #home .lb-home-hero::before{
  -webkit-mask-image:linear-gradient(180deg,#000 0%,#000 50%,rgba(0,0,0,.88) 65%,rgba(0,0,0,.4) 84%,transparent 100%);
  mask-image:linear-gradient(180deg,#000 0%,#000 50%,rgba(0,0,0,.88) 65%,rgba(0,0,0,.4) 84%,transparent 100%);
}
@media(min-width:1025px){
  html[data-lb-v4-live="1"] body.lb-v3 #home .lb-home-hero::before{
    height:calc(clamp(220px,18vw,280px) + 180px)!important;
  }
}
@media(max-width:1024px){
  html[data-lb-v4-live="1"] body.lb-v3 #home .lb-home-hero::before{
    height:calc(clamp(100px,27vw,240px) + 112px)!important;
  }
}

html[data-lb-v4-live="1"] body.lb-v3 #home .home-dashboard>.home-card[aria-label="Mes Bétaillères favorites"]>h2{
  background:none!important;
  text-shadow:0 1px 2px #02121d,0 0 6px #02121d!important;
}
