/* PROBIAS home v3: bulletin area (READY + news, equal weight; in normal flow, never over the cards) and the loader's visible loading label.
   Smartphone: two one-line rows in one box. Tablet / PC (>=741px): two equal columns. */
#homeView .bul{position:relative;display:grid;grid-template-columns:minmax(0,1fr);margin:4px 0 6px;padding:2px 8px;border:1px solid #23415f;border-radius:10px;background:linear-gradient(180deg,#0c2136,#081626);overflow:hidden}
#homeView .bul-row{display:grid;grid-template-columns:76px minmax(0,1fr) auto;align-items:center;column-gap:8px;min-width:0;height:31px}
#homeView .bul-row+.bul-row{border-top:1px solid #1d3651}
#homeView .bul-tag{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:850;letter-spacing:.03em;color:#e9f6ff;white-space:nowrap}
#homeView .bul-dot{flex:0 0 auto;width:7px;height:7px;border-radius:50%;background:#56717f}
#homeView .bul-row.bul-has .bul-dot{background:#4de3de}
#homeView .bul-motion .bul-row.bul-has .bul-dot{animation:bul-pulse 2s ease-out infinite}
#homeView .bul-row.bul-warn .bul-dot{background:#e4c46d;animation:none}
#homeView .bul-body{display:flex;align-items:center;gap:6px;min-width:0;overflow-x:auto;scrollbar-width:none}
#homeView .bul-body::-webkit-scrollbar{display:none}
#homeView .bul-row.bul-has .bul-body{-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 14px),transparent);mask-image:linear-gradient(90deg,#000 calc(100% - 14px),transparent)}   /* items that scroll out fade at the edge instead of being cut */
#homeView .bul-meta{font-size:11px;color:#9fb3c8;white-space:nowrap;font-variant-numeric:tabular-nums}
#homeView .bul-row.bul-warn .bul-meta{color:#e4c46d}
#homeView .bul-empty{font-size:12px;color:#8fa3b8;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#homeView .bul-item{flex:0 0 auto;display:inline-flex;align-items:center;gap:5px;min-width:0;max-width:100%;height:24px;padding:0 8px;border:1px solid #2f8f93;border-radius:7px;background:#0a2a33;color:#e9fbff;font:inherit;font-size:12px;line-height:1;cursor:pointer;white-space:nowrap}
#homeView .bul-item b{font-size:12px;font-weight:850}
#homeView .bul-race{font-weight:800;color:#4de3de}
#homeView .bul-time{color:#b9cad9;font-variant-numeric:tabular-nums}
#homeView .bul-news{flex:1 1 auto}
#homeView .bul-title{min-width:0;overflow:hidden;text-overflow:ellipsis}
#homeView .bul-badge{flex:0 0 auto;font-style:normal;font-size:9.5px;font-weight:900;letter-spacing:.06em;padding:2px 4px;border-radius:4px;background:#f0c24b;color:#1a1300;line-height:1}
#homeView .bul-item.bul-new{border-color:#f0c24b;background:#2a2410}
#homeView .bul-motion .bul-row[data-kind="ready"] .bul-item.bul-new,#homeView .bul-motion .bul-item.bul-arrive{animation:bul-flash 1.2s ease-out 2}
#homeView .bul .pbl-bar{position:absolute;left:0;right:0;bottom:0;top:auto!important;width:auto!important;height:2px}   /* loader refresh bar: inside the area, never over the cards */
@keyframes bul-pulse{0%{box-shadow:0 0 0 0 #4de3de99}70%{box-shadow:0 0 0 6px #4de3de00}100%{box-shadow:0 0 0 0 #4de3de00}}
@keyframes bul-flash{0%{box-shadow:0 0 0 0 #f0c24bcc}100%{box-shadow:0 0 0 7px #f0c24b00}}
@media (prefers-reduced-motion:reduce){#homeView .bul-dot,#homeView .bul-item{animation:none!important}}
@media (min-width:741px){
 #homeView .bul{grid-template-columns:repeat(2,minmax(0,1fr));column-gap:10px;padding:0;border:0;background:none;overflow:visible;margin:8px 0 10px}
 #homeView .bul-row{height:44px;padding:0 12px;border:1px solid #23415f;border-radius:10px;background:linear-gradient(180deg,#0c2136,#081626);grid-template-columns:auto minmax(0,1fr) auto;column-gap:10px}
 #homeView .bul-row+.bul-row{border-top:1px solid #23415f}
 #homeView .bul-tag{font-size:13px;min-width:78px}
 #homeView .bul-meta{font-size:12px}
 #homeView .bul-empty,#homeView .bul-item,#homeView .bul-item b{font-size:13px}
 #homeView .bul-item{height:28px}
 #homeView .bul .pbl-bar{bottom:-4px}
}
/* loading screen label shown inside the skeleton layer */
.pbl-skel-label{position:absolute;left:0;right:0;top:10px;z-index:2;margin:0;text-align:center;font-size:13px;font-weight:700;color:#cfe3f5;letter-spacing:.03em}
.pbl-skel-label::after{content:"";display:inline-block;width:1.2em;text-align:left;animation:pbl-dots 1.2s steps(4,end) infinite}
@keyframes pbl-dots{0%{content:""}25%{content:"."}50%{content:".."}75%{content:"..."}}
@media (prefers-reduced-motion:reduce){.pbl-skel-label::after{animation:none;content:"…"}}
/* skeleton tiles follow the card grid (4 columns at every width), below the loading label */
body .pbl-skel-layer .pbl-skel-grid{padding-top:34px;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px 6px}
body .pbl-skel-layer .pbl-skel{min-height:var(--vc-h,82px);padding:8px 6px;gap:8px}
@media (min-width:741px){body .pbl-skel-layer .pbl-skel-grid{gap:8px}body .pbl-skel-layer .pbl-skel{min-height:112px}}
#homeView .split-head{display:none}
/* smartphone cards: 76px (compared with 82/78/72 at 375/390/430). Only the space around the text shrinks; type sizes stay as approved. */
@media (max-width:740px){html:root{--v41-height:76px;--vc-h:76px}body #homeView .venue-grid{grid-auto-rows:76px}body #homeView .venue-item{height:76px;grid-template-rows:27px minmax(0,1fr) 17px}}
/* smartphone, two badges on one card (e.g. ナイター + 女子戦): same 8px type, stacked, with an even 1px gap between grade row, badges and the status line */
@media (max-width:740px){
 body #homeView .v431-info-group:has(.v3-badge:nth-child(2)){grid-template-rows:9px minmax(0,1fr)}
 body #homeView .v431-info-group:has(.v3-badge:nth-child(2)) .venue-info .venue-grade{line-height:7px}
 body #homeView .v431-info-group:has(.v3-badge:nth-child(2)) .venue-day-label{line-height:9px}
 body #homeView .venue-info-badges.v41-area-c:has(.v3-badge:nth-child(2)){flex-direction:column;flex-wrap:nowrap;align-items:center;justify-content:flex-start;row-gap:1px;padding:1px 0 0}
 body #homeView .venue-info-badges.v41-area-c:has(.v3-badge:nth-child(2)) .v3-badge{line-height:7px}
}
/* smartphone card spacing (76px): the grade/day row sits lower under the venue name so that name, grade, badge and status line are evenly spaced
   (measured from the bottom of the name glyphs: one badge 4.5/4/4px, two badges 1.2/1.5/1.5/1.5px). Type sizes unchanged. */
@media (max-width:740px){
 body #homeView .v431-info-group:not(:has(.v3-badge:nth-child(2))){padding-top:2px;box-sizing:border-box}
 body #homeView .venue-info-badges.v41-area-c:not(:has(.v3-badge:nth-child(2))){padding:0;align-content:center}
 body #homeView .v431-info-group:has(.v3-badge:nth-child(2)){margin-top:-1.5px}
 body #homeView .venue-info-badges.v41-area-c:has(.v3-badge:nth-child(2)){padding-top:1.5px;row-gap:1.5px}
}
/* v6 (comparison candidate): wider, more compact smartphone cards. Four fixed rows - venue name / grade+day / badges / status - so 0, 1 and 2 badges
   keep the same layout; two badges sit side by side. Every gap (card top -> name glyphs -> grade -> badges -> status line -> status text -> card bottom)
   is the same value g, measured on the drawn glyphs, so the spacing ratio is kept at any card height: g = (H - 50.6px) / 6.
   Type sizes unchanged (name 21px, grade/day/badges 8px, status 12px). Badges: proportional kana and the label text are kept; with two badges the small icon
   is left out so both labels fit (colour and frame are kept). Below 360px four pairs cannot fit side by side at 8px (see report): there the cards stay 76px
   and those pairs stack. */
@media (max-width:740px){
 html:root{--v6h:70px;--v6g:calc((var(--v6h) - 50.6px) / 6);--v6s:calc(var(--v6h) - 40.7px - 4 * var(--v6g));--v41-height:var(--v6h);--vc-h:var(--v6h)}
 html body #homeView #venueGrid{grid-auto-rows:minmax(var(--v6h),auto)}
 html body #homeView #venueGrid .venue-item{height:auto;min-height:var(--v6h);padding:0;row-gap:0;grid-template-rows:calc(1.5 * var(--v6g) + 18.7px) calc(var(--v6g) + 10px) calc(1.5 * var(--v6g) + 10px) minmax(0,1fr)}
 html body #homeView #venueGrid .venue-item .v431-info-group,html body #homeView #venueGrid .venue-item .v431-info-group:has(.v3-badge:nth-child(2)),html body #homeView #venueGrid .venue-item .v431-info-group:not(:has(.v3-badge:nth-child(2))){display:contents}
 html body #homeView #venueGrid .venue-item .v41-area-a{grid-row:1;align-self:stretch;display:flex;align-items:flex-end;justify-content:center;padding:0 0 calc(var(--v6g) / 2 + .4px);margin:0;min-height:0}
 html body #homeView #venueGrid .venue-item .venue-card-head strong,html body #homeView #venueGrid .venue-item .venue-card-head[data-name-length] strong{line-height:18.7px}
 html body #homeView #venueGrid .venue-item .v41-area-b{grid-row:2;align-self:center;margin:0;padding:0;height:10px;display:flex;align-items:center;justify-content:center}
 html body #homeView #venueGrid .venue-item .v41-area-b .venue-grade,html body #homeView #venueGrid .venue-item .v431-info-group:has(.v3-badge:nth-child(2)) .venue-info .venue-grade{line-height:8px}
 html body #homeView #venueGrid .venue-item .v41-area-b .venue-day-label,html body #homeView #venueGrid .venue-item .v431-info-group:has(.v3-badge:nth-child(2)) .venue-day-label{line-height:10px}
 html body #homeView #venueGrid .venue-item .venue-info-badges.v41-area-c,html body #homeView #venueGrid .venue-item .venue-info-badges.v41-area-c:has(.v3-badge:nth-child(2)),html body #homeView #venueGrid .venue-item .venue-info-badges.v41-area-c:not(:has(.v3-badge:nth-child(2))){grid-row:3;align-self:start;margin:0;padding:calc(var(--v6g) / 2) 1px 0;height:auto;display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center;align-content:center;justify-content:center;gap:2px}
 html body #homeView #venueGrid .venue-item .venue-info-badges.v41-area-c .v3-badge,html body #homeView #venueGrid .venue-item .venue-info-badges.v41-area-c:has(.v3-badge:nth-child(2)) .v3-badge{font-feature-settings:"palt";letter-spacing:-.03em;line-height:8px;padding:0 1px;gap:1px;border-width:1px}
 html body #homeView #venueGrid .venue-item .venue-info-badges.v41-area-c .v3-badge svg,html body #homeView #venueGrid .venue-item .venue-info-badges.v41-area-c .v3-ladies svg{width:6px;height:6px}
 html body #homeView #venueGrid .venue-item .venue-info-badges.v41-area-c:has(.v3-badge:nth-child(2)) .v3-badge svg{display:none}
 html body #homeView #venueGrid .venue-item .venue-clock.v41-area-d{grid-row:4;align-self:end;height:var(--v6s);box-sizing:border-box;margin:0;padding:0 0 .6px;display:flex;align-items:center;justify-content:center}
}
/* Badges that need two lines: below 360px the four pairs that cannot sit side by side at 8px (モーニング+女子戦, モーニング+ルーキー, ナイター+ルーキー,
   モーニング+ナイター when two time categories are given).
   Same card height and type sizes; the stacked card spreads its free space evenly: top / name / grade / badge line 1 / badge line 2 / status line all get the same gap f.
   The status band keeps the same height as the neighbouring cards, so status lines stay aligned across a row. */
@media (max-width:359px){
 html:root{--v6h:76px}
 html body #homeView #venueGrid .venue-item:is(:has(.v3-morning):has(.v3-ladies),:has(.v3-morning):has(.v3-rookie),:has(.v3-nighter):has(.v3-rookie),:has(.v3-morning):has(.v3-nighter)):not(:has(.v3-badge:nth-child(3))){--v6f:calc((var(--v6h) - 2px - (2 * var(--v6g) + 10px) - 45.7px) / 5);grid-template-rows:calc(1.5 * var(--v6f) + 18.7px) calc(var(--v6f) + 9px) calc(2.5 * var(--v6f) + 18px) minmax(0,1fr)}
 html body #homeView #venueGrid .venue-item:is(:has(.v3-morning):has(.v3-ladies),:has(.v3-morning):has(.v3-rookie),:has(.v3-nighter):has(.v3-rookie),:has(.v3-morning):has(.v3-nighter)):not(:has(.v3-badge:nth-child(3))) .v41-area-a{padding-bottom:calc(var(--v6f) / 2 + .4px)}
 html body #homeView #venueGrid .venue-item:is(:has(.v3-morning):has(.v3-ladies),:has(.v3-morning):has(.v3-rookie),:has(.v3-nighter):has(.v3-rookie),:has(.v3-morning):has(.v3-nighter)):not(:has(.v3-badge:nth-child(3))) .v41-area-b{height:9px}
 html body #homeView #venueGrid .venue-item:is(:has(.v3-morning):has(.v3-ladies),:has(.v3-morning):has(.v3-rookie),:has(.v3-nighter):has(.v3-rookie),:has(.v3-morning):has(.v3-nighter)):not(:has(.v3-badge:nth-child(3))) .v41-area-b .venue-grade{line-height:7px}
 html body #homeView #venueGrid .venue-item:is(:has(.v3-morning):has(.v3-ladies),:has(.v3-morning):has(.v3-rookie),:has(.v3-nighter):has(.v3-rookie),:has(.v3-morning):has(.v3-nighter)):not(:has(.v3-badge:nth-child(3))) .v41-area-b .venue-day-label{line-height:9px}
 html body #homeView #venueGrid .venue-item:is(:has(.v3-morning):has(.v3-ladies),:has(.v3-morning):has(.v3-rookie),:has(.v3-nighter):has(.v3-rookie),:has(.v3-morning):has(.v3-nighter)):not(:has(.v3-badge:nth-child(3))) .venue-info-badges.v41-area-c{flex-wrap:wrap;align-content:flex-start;padding-top:calc(var(--v6f) / 2);row-gap:var(--v6f);column-gap:2px}
 html body #homeView #venueGrid .venue-item:is(:has(.v3-morning):has(.v3-ladies),:has(.v3-morning):has(.v3-rookie),:has(.v3-nighter):has(.v3-rookie),:has(.v3-morning):has(.v3-nighter)):not(:has(.v3-badge:nth-child(3))) .venue-info-badges.v41-area-c .v3-badge{line-height:7px}
}
/* Three or more labels (the data allows up to six: official time categories + series types + title match): the badges wrap onto as many lines
   as they need with the same gap g (no smaller type, no label left out), and the card grows by (10px + g) per extra line. Cards have a min-height
   and stretch to their grid row; the status band has a fixed height (--v6s) at the bottom, so every card in that row gets the same height and the
   same status line, and keeps its name / grade / first badge line where it was. Rows with 0-2 badges keep the v6 sizes. */
@media (max-width:740px){
 html body #homeView #venueGrid .venue-item:has(.v3-badge:nth-child(3)){grid-template-rows:calc(1.5 * var(--v6g) + 18.7px) calc(var(--v6g) + 10px) auto minmax(0,1fr)}
 html body #homeView #venueGrid .venue-item:has(.v3-badge:nth-child(3)) .venue-info-badges.v41-area-c{flex-wrap:wrap;align-content:flex-start;padding:calc(var(--v6g) / 2) 1px var(--v6g);row-gap:var(--v6g);column-gap:2px}
}
