/* PROBIAS venue cards v6.3: grade + meeting-day in ONE frame.
   Stage names come only from verified program race subtitles; no extra badge row.
   Grade, not semi-final/final status, determines the frame accent.
   Exact border colours copied from the installed styles.css grade rules. */
#homeView #venueGrid .vnext-grade-day{
  display:inline-flex;align-items:stretch;justify-content:center;
  max-width:100%;min-width:0;white-space:nowrap;overflow:hidden;
  border:1px solid var(--vnext-grade-accent,#60758c);border-radius:4px;
  background:#111f30;line-height:1;vertical-align:middle;
}
#homeView #venueGrid .vnext-grade-day .venue-grade{
  flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;
  border:none;border-radius:0;margin:0;min-height:16px;padding:1px 3px;
}
#homeView #venueGrid .vnext-grade-day .venue-day-label{
  flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;
  margin:0;border:0;border-radius:0;background:transparent;
  padding:1px 3px;font-size:10px;line-height:14px;letter-spacing:-.25px;
  color:#e4eaf2;white-space:nowrap;
}
/* This is the frame color. The grade chip itself retains the installed
   .grade-* rules; substitute these tokens with the exact installed palette
   during integration if the palette differs. */
#homeView #venueGrid .vnext-grade-sg{--vnext-grade-accent:#fa6b7a}
#homeView #venueGrid .vnext-grade-pg1{--vnext-grade-accent:#c18cf0}
#homeView #venueGrid .vnext-grade-g1{--vnext-grade-accent:#f4d880}
#homeView #venueGrid .vnext-grade-g2{--vnext-grade-accent:#ffb978}
#homeView #venueGrid .vnext-grade-g3{--vnext-grade-accent:#66c895}
#homeView #venueGrid .vnext-grade-regular{--vnext-grade-accent:#98a4b4}
/* Preserve the approved four-column height and other badge area. */
@media(max-width:375px){
 #homeView #venueGrid .vnext-grade-day .venue-grade{padding-left:2px;padding-right:2px}
 #homeView #venueGrid .vnext-grade-day .venue-day-label{padding-left:2px;padding-right:2px;font-size:9px}
}
/* Integration: the installed v6.3 metadata track is 10px on phones and
   16px on PC. Keep that track, card height and venue-name size unchanged. */
#homeView #venueGrid .vnext-grade-day{height:16px;box-sizing:border-box;gap:0}
#homeView #venueGrid .vnext-grade-day .venue-grade{min-height:0;padding-block:0;line-height:14px}
#homeView #venueGrid .vnext-grade-day .venue-day-label{padding-block:0;font-size:11px;line-height:14px}
@media(max-width:740px){
 #homeView #venueGrid .vnext-grade-day{height:10px;border-radius:3px}
 #homeView #venueGrid .vnext-grade-day .venue-grade{min-height:0;padding:0 2px;font-size:8px;line-height:8px}
 #homeView #venueGrid .vnext-grade-day .venue-day-label{padding:0 2px;font-size:8px;line-height:8px;letter-spacing:0}
}

/* Corner tabs: independent decoration; the same two-row central group on
   every card. No dedicated badge row and no data/READY behavior changes. */
html body #homeView #venueGrid .venue-item.vtab-card{
 position:relative;box-sizing:border-box;padding:0;row-gap:0;
 grid-template-rows:minmax(0,1fr) 16px;height:112px;min-height:112px;
}
html body #homeView #venueGrid .vtab-card .venue-central{
 grid-row:1;align-self:center;justify-self:stretch;display:grid;
 grid-template-rows:30px 16px;row-gap:3px;min-width:0;min-height:0;
}
html body #homeView #venueGrid .vtab-card .venue-central .venue-card-head{
 grid-row:1;align-self:stretch;display:flex;align-items:center;
 justify-content:center;box-sizing:border-box;min-height:0;margin:0;padding:0;
}
html body #homeView #venueGrid .vtab-card .venue-card-head strong,
html body #homeView #venueGrid .vtab-card .venue-card-head[data-name-length] strong{
 font-size:27px;line-height:30px;font-weight:900;letter-spacing:0;
}
html body #homeView #venueGrid .vtab-card .venue-card-head[data-name-length="2"] strong{letter-spacing:1px}
html body #homeView #venueGrid .vtab-card .venue-central .venue-info{
 grid-row:2;align-self:stretch;display:flex;align-items:center;
 justify-content:center;height:16px;min-height:0;margin:0;padding:0;
}
html body #homeView #venueGrid .vtab-card .venue-clock.v41-area-d{
 grid-row:2;align-self:end;box-sizing:border-box;height:16px;min-height:16px;
 margin:0;padding:0;display:flex;flex-wrap:nowrap;align-items:center;
 justify-content:center;gap:4px;
}
html body #homeView #venueGrid .vtab-card .venue-clock-key{
 display:inline-flex;flex-direction:row;align-items:center;gap:0;white-space:nowrap;
}
html body #homeView #venueGrid .vtab-card .venue-clock time{font-size:12px;line-height:14px;letter-spacing:0}
html body #homeView #venueGrid .vtab-card .venue-clock-key b,
html body #homeView #venueGrid .vtab-card .venue-cutoff-label{font-size:7px;line-height:8px}
html body #homeView #venueGrid .vtab-card .venue-tab-rail{
 position:absolute;inset:0 0 auto;height:14px;pointer-events:none;
 border-radius:7px 7px 0 0;overflow:clip;
}
html body #homeView #venueGrid .vtab-card .venue-tabs-left,
html body #homeView #venueGrid .vtab-card .venue-tabs-right{
 position:absolute;top:0;display:flex;gap:0;align-items:flex-start;white-space:nowrap;
}
html body #homeView #venueGrid .vtab-card .venue-tabs-left{left:0}
html body #homeView #venueGrid .vtab-card .venue-tabs-right{right:0}
html body #homeView #venueGrid .vtab-card .venue-tab-label{
 display:block;box-sizing:border-box;min-width:0;height:14px;
 font-size:9px;font-weight:850;line-height:14px;letter-spacing:0;
 white-space:nowrap;color:white;text-shadow:0 1px 1px #09244880;
}
html body #homeView #venueGrid .vtab-card .venue-tab-left{
 padding:0 6px 0 3px;clip-path:polygon(0 0,100% 0,calc(100% - 5px) 100%,0 100%);
}
html body #homeView #venueGrid .vtab-card .venue-tab-right{
 padding:0 3px 0 6px;clip-path:polygon(5px 0,100% 0,100% 100%,0 100%);
}
#homeView #venueGrid .venue-tab-morning{background:linear-gradient(110deg,#21c6d1,#0b909a)}
#homeView #venueGrid .venue-tab-nighter{background:linear-gradient(110deg,#514cf5,#2923b8)}
#homeView #venueGrid .venue-tab-midnight{background:linear-gradient(110deg,#9548cf,#592592)}
#homeView #venueGrid .venue-tab-ladies{background:linear-gradient(110deg,#e85b9f,#b82872)}
#homeView #venueGrid .venue-tab-rookie{background:linear-gradient(110deg,#2988ec,#1052c5)}
#homeView #venueGrid .venue-tab-summer{background:linear-gradient(110deg,#c5a44d,#89681f)}
#homeView #venueGrid .venue-ended .venue-tab-label,
#homeView #venueGrid .venue-closed .venue-tab-label{opacity:.64}
@media(max-width:740px){
 html:root{--v6h:70px;--v41-height:70px;--vc-h:70px}
 html body #homeView #venueGrid{grid-auto-rows:70px}
 html body #homeView #venueGrid .venue-item.vtab-card{
  height:70px;min-height:70px;max-height:70px;grid-template-rows:minmax(0,1fr) 16px;
 }
 html body #homeView #venueGrid .vtab-card .venue-central{
  grid-template-rows:22px 10px;row-gap:1.5px;
 }
 html body #homeView #venueGrid .vtab-card .venue-card-head strong,
 html body #homeView #venueGrid .vtab-card .venue-card-head[data-name-length] strong{
  font-size:var(--vtab-name-size,21px);line-height:22px;
 }
 html body #homeView #venueGrid .vtab-card .venue-central .venue-info{height:10px}
 html body #homeView #venueGrid .vtab-card .vnext-grade-day{height:10px;gap:0;overflow:visible}
 html body #homeView #venueGrid .vtab-card .vnext-grade-day .venue-grade{
  min-height:0;padding:0 2px;font-size:7px;line-height:8px;
 }
 html body #homeView #venueGrid .vtab-card .vnext-grade-day .venue-day-label{
  min-height:0;padding:0 2px;font-size:8px;line-height:8px;letter-spacing:0;
 }
 html body #homeView #venueGrid .vtab-card .venue-clock.v41-area-d{
  height:16px;min-height:16px;gap:3px;
 }
 html body #homeView #venueGrid .vtab-card .venue-clock time{
  font-size:12px;line-height:14px;letter-spacing:0;
 }
 html body #homeView #venueGrid .vtab-card .venue-clock-key b,
 html body #homeView #venueGrid .vtab-card .venue-cutoff-label{font-size:7px;line-height:8px}
 html body #homeView #venueGrid .vtab-card .venue-tab-rail{
  height:9px;border-radius:5px 5px 0 0;
 }
 html body #homeView #venueGrid .vtab-card .venue-tab-label{
  height:9px;font-size:6.5px;line-height:9px;
 }
 html body #homeView #venueGrid .vtab-card .venue-tab-left{
  padding:0 3px 0 1px;clip-path:polygon(0 0,100% 0,calc(100% - 3px) 100%,0 100%);
 }
 html body #homeView #venueGrid .vtab-card .venue-tab-right{
  padding:0 1px 0 3px;clip-path:polygon(3px 0,100% 0,100% 100%,0 100%);
 }
}
@media(max-width:380px){
 html body #homeView #venueGrid .vtab-card:has(.venue-tabs-left .venue-tab-label):has(.venue-tabs-right .venue-tab-label) .venue-tab-label{font-size:6px}
}
@media(max-width:350px){
 html body #homeView #venueGrid .vtab-card:has(.venue-tabs-left .venue-tab-label):has(.venue-tabs-right .venue-tab-label) .venue-tab-label{font-size:5.5px}
}

/* V02: fixed half-width tabs and a two-line cutoff footer. Only card
   presentation changes; the model, READY gates and deadline list are intact. */
html body #homeView #venueGrid .venue-item.vtab-card{grid-template-rows:minmax(0,1fr) 22px}
html body #homeView #venueGrid .vtab-card .venue-clock.v41-area-d:not(.v3-status){
 height:22px;min-height:22px;display:grid;grid-template-rows:7px 14px;
 row-gap:1px;column-gap:0;align-items:center;justify-content:stretch;border-top:0;
}
html body #homeView #venueGrid .vtab-card .venue-clock.v3-status{height:22px;min-height:22px}
html body #homeView #venueGrid .vtab-card .venue-cutoff-heading{
 display:flex;align-items:center;justify-content:center;gap:3px;
 min-width:0;height:7px;font-size:7px;line-height:7px;white-space:nowrap;color:#bdcddd;
}
html body #homeView #venueGrid .vtab-card .venue-cutoff-heading::before,
html body #homeView #venueGrid .vtab-card .venue-cutoff-heading::after{
 content:"";flex:1 1 0;height:1px;max-width:30%;background:#3c5267;
}
html body #homeView #venueGrid .vtab-card .venue-cutoff-values{
 display:flex;align-items:center;justify-content:center;flex-wrap:nowrap;
 min-width:0;height:14px;gap:4px;white-space:nowrap;
}
html body #homeView #venueGrid .vtab-card .venue-tab-rail{
 inset:-1px -1px auto;border-top-left-radius:inherit;border-top-right-radius:inherit;
}
html body #homeView #venueGrid .vtab-card .venue-tabs-left,
html body #homeView #venueGrid .vtab-card .venue-tabs-right{width:50%;height:100%;min-width:0}
html body #homeView #venueGrid .vtab-card .venue-tab-label{
 position:relative;flex:1 1 0;width:100%;display:flex;align-items:center;
 justify-content:center;text-align:center;padding:0 1px;--vtab-cut:4px;
}
html body #homeView #venueGrid .vtab-card .venue-tab-left{
 clip-path:polygon(0 0,100% 0,calc(100% - var(--vtab-cut)) 100%,0 100%);
}
html body #homeView #venueGrid .vtab-card .venue-tab-right{
 clip-path:polygon(var(--vtab-cut) 0,100% 0,100% 100%,0 100%);
}
#homeView #venueGrid .venue-tab-morning{--vtab-tip:#21c6d1}
#homeView #venueGrid .venue-tab-nighter{--vtab-tip:#514cf5}
#homeView #venueGrid .venue-tab-midnight{--vtab-tip:#9548cf}
#homeView #venueGrid .venue-tab-ladies{--vtab-tip:#e85b9f}
#homeView #venueGrid .venue-tab-rookie{--vtab-tip:#2988ec}
#homeView #venueGrid .venue-tab-summer{--vtab-tip:#c5a44d}
/* The right tab fills the left tab's triangular cutout when both exist.
   Their measured boxes remain precisely 50%, without a central colour gap. */
html body #homeView #venueGrid .vtab-card .venue-tab-rail:has(.venue-tabs-left .venue-tab-label):has(.venue-tabs-right .venue-tab-label) .venue-tab-right{clip-path:none}
html body #homeView #venueGrid .vtab-card .venue-tab-rail:has(.venue-tabs-left .venue-tab-label):has(.venue-tabs-right .venue-tab-label) .venue-tab-right::before{
 content:"";position:absolute;left:calc(-1 * var(--vtab-cut));top:0;
 width:var(--vtab-cut);height:100%;background:var(--vtab-tip);
 clip-path:polygon(100% 0,100% 100%,0 100%);
}
@media(max-width:740px){
 html body #homeView #venueGrid .venue-item.vtab-card{grid-template-rows:minmax(0,1fr) 22px}
 html body #homeView #venueGrid .vtab-card .venue-central{grid-template-rows:20px 8px;row-gap:1px}
 html body #homeView #venueGrid .vtab-card .venue-card-head strong,
 html body #homeView #venueGrid .vtab-card .venue-card-head[data-name-length] strong{font-size:19px;line-height:20px}
 html body #homeView #venueGrid .vtab-card .venue-central .venue-info,
 html body #homeView #venueGrid .vtab-card .vnext-grade-day{height:8px}
 html body #homeView #venueGrid .vtab-card .vnext-grade-day .venue-grade,
 html body #homeView #venueGrid .vtab-card .vnext-grade-day .venue-day-label{font-size:6px;line-height:6px}
 html body #homeView #venueGrid .vtab-card .venue-cutoff-heading{font-size:6px;line-height:7px}
 html body #homeView #venueGrid .vtab-card .venue-tab-label{--vtab-cut:2px;font-size:var(--vtab-label-size,6.5px)}
 html body #homeView #venueGrid .vtab-card .venue-tab-rail:has(.venue-tabs-left .venue-tab-label):has(.venue-tabs-right .venue-tab-label) .venue-tab-label{font-size:var(--vtab-label-size,6.5px)}
}
@media(max-width:380px){
 html body #homeView #venueGrid .vtab-card .venue-tab-label.venue-tab-midnight,
 html body #homeView #venueGrid .vtab-card .venue-tab-label.venue-tab-summer{--vtab-label-size:6px}
}
@media(max-width:350px){
 html body #homeView #venueGrid .vtab-card .venue-tab-label.venue-tab-morning,
 html body #homeView #venueGrid .vtab-card .venue-tab-label.venue-tab-ladies{--vtab-label-size:6px}
 html body #homeView #venueGrid .vtab-card .venue-tab-label.venue-tab-midnight,
 html body #homeView #venueGrid .vtab-card .venue-tab-label.venue-tab-summer{--vtab-label-size:5px}
}

/* V02.1: phone-only 7px metadata and 20px footer. Card/model/labels unchanged. */
@media(max-width:740px){
 html body #homeView #venueGrid .venue-item.vtab-card{grid-template-rows:minmax(0,1fr) 20px}
 html body #homeView #venueGrid .vtab-card .venue-central{grid-template-rows:20px 9px;row-gap:1px}
 html body #homeView #venueGrid .vtab-card .venue-central .venue-info,
 html body #homeView #venueGrid .vtab-card .vnext-grade-day{height:9px}
 html body #homeView #venueGrid .vtab-card .vnext-grade-day .venue-grade,
 html body #homeView #venueGrid .vtab-card .vnext-grade-day .venue-day-label{font-size:7px;line-height:7px}
 html body #homeView #venueGrid .vtab-card .venue-clock.v41-area-d:not(.v3-status){
  height:20px;min-height:20px;grid-template-rows:6px 13px;row-gap:1px;
 }
 html body #homeView #venueGrid .vtab-card .venue-clock.v3-status{height:20px;min-height:20px}
 html body #homeView #venueGrid .vtab-card .venue-cutoff-heading{height:6px;line-height:6px}
 html body #homeView #venueGrid .vtab-card .venue-cutoff-values{height:13px}
 html body #homeView #venueGrid .vtab-card .venue-clock time{line-height:13px}
}

/* V02.2: move only the phone footer's lower line; keep its layout track. */
@media(max-width:740px){
 html body #homeView #venueGrid .vtab-card .venue-cutoff-values{transform:translateY(-1px)}
 html body #homeView #venueGrid .vtab-card .venue-clock time{font-size:11px}
}

