/* Scoped density and result-display update; grade/READY logic and nav unchanged. */
body.home-layout .layout{display:block;min-height:100dvh}
body.home-layout .sidebar{position:static;height:auto;max-width:1120px;margin:auto;padding:10px 12px 6px;display:flex;flex-direction:row;align-items:center;justify-content:space-between;border:0;background:transparent;gap:8px}
body.home-layout .brand{padding:0;gap:9px;min-width:0}
body.home-layout .brand-emblem{flex:0 0 34px;width:34px;height:34px}
body.home-layout .brand-type{font-size:20px}
body.home-layout .brand-type small{font-size:6px;letter-spacing:1px;margin-top:4px}
.global-date{display:flex;align-items:center;gap:5px;color:var(--muted);font-size:10px;white-space:nowrap}
.global-date input{width:139px;min-height:33px;padding:4px 6px;font-size:12px}
body:not(.home-layout) .global-date{margin:0 9px}
body.home-layout .main{max-width:1120px;margin:0 auto;padding:0 12px calc(70px + env(safe-area-inset-bottom,0px))}
#homeView .venue-directory{padding:0;border:0;background:transparent;box-shadow:none}
#homeView .home-tabs{display:grid;grid-template-columns:1fr 1fr;margin:0 0 8px}
#homeView .home-tabs button{min-height:34px;padding:5px 8px;font-size:13px}
#homeView .venue-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;grid-auto-rows:108px}
#homeView .venue-item{height:100%;min-height:0;max-height:none}
#homeView .venue-card-head{padding:5px 2px;line-height:1.2;flex:0 0 auto}
#homeView .venue-item strong{font-size:clamp(18px,4.8vw,26px);line-height:1.25;letter-spacing:-.02em}
#homeView .venue-card-body{padding:4px 2px;gap:2px;min-height:0}
#homeView .venue-day-line{gap:3px;font-size:10px;line-height:1.2;min-height:12px}
#homeView .venue-marks{min-height:11px;gap:3px;font-size:11px;line-height:1}
#homeView .venue-next-hint{font-size:8px;line-height:1.2}
#homeView .venue-next{font-size:12px;line-height:1.25;gap:2px;white-space:nowrap}
#homeView .venue-progress{font-size:8px;line-height:1.2}
#homeView .venue-empty{font-size:9px}
#homeView .venue-legend{padding-top:8px;gap:4px 10px;font-size:9px}
#homeView .venue-grade-legend{margin-top:6px;gap:6px}
#homeView .venue-note{font-size:9px;line-height:1.5;margin-top:6px}
.ad-space{display:flex;align-items:center;justify-content:center;min-height:78px;margin:12px 0 0;border:1px solid #253349;border-radius:9px;background:#0d1727;color:#72829b;font-size:11px;letter-spacing:.08em}
#homeView .home-legends{margin-top:8px}
body.home-layout .footer{margin:8px 0 0;padding:4px 0;text-align:center}
@media(min-height:900px) and (min-width:741px){.ad-space{min-height:100px}}
@media(max-width:740px){#homeView .venue-grid{gap:6px;grid-auto-rows:106px}#homeView .venue-item strong{font-size:clamp(17px,4.8vw,22px)}#homeView .venue-grade{font-size:7px}body.home-layout .sidebar{padding:9px 9px 6px}body.home-layout .main{padding-left:9px;padding-right:9px}}
@media(max-width:340px){body.home-layout .brand-type{font-size:17px}body.home-layout .brand-type small{font-size:5px}.global-date{font-size:0}.global-date input{font-size:11px;width:126px}#homeView .venue-grid{gap:5px;grid-auto-rows:105px}#homeView .venue-day-line{font-size:9px}#homeView .venue-next{font-size:10px}#homeView .venue-item strong{font-size:17px}}
.race-countdown{font-size:10px;color:var(--cyan);font-variant-numeric:tabular-nums;white-space:nowrap}
#resultView .result-summary-panel{margin-bottom:8px}
#resultView .result-facts-panel{min-width:0}
#resultView .result-facts-panel h2{margin:0;font-size:15px}
#resultView .result-facts-panel .section-top{margin-bottom:7px}
#resultView .result-table{width:100%;border-collapse:collapse;font-variant-numeric:tabular-nums;min-width:0;table-layout:fixed}
#resultView .result-table th,#resultView .result-table td{padding:7px 3px;border-bottom:1px solid #27354b;vertical-align:middle;font-size:12px;text-align:center}
#resultView .result-table thead th{font-size:10px;color:var(--muted);background:#17263a}
#resultView .result-table tbody th{font-size:12px;font-weight:700}
#resultView .result-table .frame{display:inline-grid;place-items:center;width:22px;height:25px;font-size:15px;font-weight:800;border-radius:3px}
#resultView .payout-table .col-kind{width:20%}#resultView .payout-table .col-bet{width:35%}#resultView .payout-table .col-pay{width:30%}#resultView .payout-table .col-pop{width:15%}
#resultView .payout-amount{text-align:right!important;white-space:nowrap;font-size:16px!important;font-weight:800}
#resultView .payout-amount.is-manshu{color:#ffd26a;text-decoration:underline;text-underline-offset:3px}
#resultView .payout-combination{white-space:nowrap}.payout-combination .result-dash{margin:0 1px}
#resultView .result-missing{font-size:11px;color:var(--muted);font-weight:400;line-height:1.6}
#resultView .finish-table .col-place{width:9%}#resultView .finish-table .col-frame{width:10%}#resultView .finish-table .col-name{width:31%}#resultView .finish-table .col-course{width:10%}#resultView .finish-table .col-st{width:14%}#resultView .finish-table .col-time{width:26%}
#resultView .finish-table td{font-size:11px;padding:7px 2px;white-space:nowrap}
#resultView .finish-name{white-space:normal!important;overflow-wrap:anywhere;line-height:1.35}
#resultView .finish-name strong{font-weight:800;font-size:12px}
#resultView .finish-table small{display:block;color:var(--muted);font-size:9px}
.result-slit-row{display:grid;grid-template-columns:27px minmax(0,1fr) 44px;gap:5px;align-items:center;min-height:32px;font-size:12px}
.result-slit-row .frame{display:inline-grid;place-items:center;width:23px;height:25px;border-radius:3px;font-weight:800}
.result-slit-water{position:relative;height:29px;border-bottom:1px solid #263b52;background:#102133;overflow:hidden}
.result-start-line{position:absolute;left:78%;height:100%;border-left:2px solid #e1c65f}
.result-boat-marker{position:absolute;top:4px;transform:translateX(-50%);width:27px;height:19px;clip-path:polygon(0 8%,75% 8%,100% 50%,75% 92%,0 92%);font-style:normal;font-size:11px;font-weight:800;text-align:center;padding-right:4px;background:var(--cyan)}
.result-boat-marker.craft-1{background:#f4f5f7;color:#10141b}.result-boat-marker.craft-2{background:#171c24;color:white;filter:drop-shadow(0 0 1px #fff)}.result-boat-marker.craft-3{background:#c92c38;color:white}.result-boat-marker.craft-4{background:#2362ba;color:white}.result-boat-marker.craft-5{background:#efc541;color:#201a0b}.result-boat-marker.craft-6{background:#176d47;color:white}
.result-detail-source{font-size:10px;line-height:1.5;color:var(--muted);margin:7px 0 0}
@media(max-width:340px){#resultView .result-table .frame{width:19px;height:23px;font-size:14px}#resultView .payout-amount{font-size:14px!important}#resultView .result-table td,#resultView .result-table tbody th{font-size:11px}#resultView .finish-name strong{font-size:11px}#resultView .finish-table td{font-size:10px}}

.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip-path:inset(50%)!important;white-space:nowrap!important;border:0!important}

@media(min-width:741px){#homeView .venue-grid{grid-auto-rows:110px}}

/* Responsive landscape cards. Header/date and bottom navigation are unchanged. */
#homeView .venue-grid{grid-auto-rows:auto;align-items:stretch}
#homeView .venue-item{height:auto;aspect-ratio:2.6;min-height:min-content;display:flex;flex-direction:column}
#homeView .venue-card-head{padding:3px 2px 1px}
#homeView .venue-card-body{padding:2px;gap:1px;justify-content:flex-start;flex:1}
#homeView .venue-day-line{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:2px;min-height:11px;font-size:9px}
#homeView .venue-marks{display:inline-flex;min-height:0;gap:1px;font-size:10px}
#homeView .venue-next{font-variant-numeric:tabular-nums;line-height:1.15}
#homeView .venue-progress{line-height:1.2}
#homeView .venue-empty{margin:auto 0;line-height:1.25;white-space:normal}
@media(max-width:740px){
 #homeView .venue-item{aspect-ratio:1.14}
 #homeView .venue-item strong{font-size:clamp(16px,4.45vw,20px);line-height:1.15}
 #homeView .venue-card-head{padding:3px 1px 1px}
 #homeView .venue-arrow{display:none}
 #homeView .venue-card-body{padding:1px 2px 3px;gap:1px}
 #homeView .venue-day-line{font-size:clamp(8px,2.1vw,9px);line-height:1.1;min-height:10px}
 #homeView .venue-marks{font-size:clamp(8px,2.4vw,10px)}
 #homeView .venue-grade{font-size:7px;padding:0 2px;line-height:1.3}
 #homeView .venue-next{font-size:clamp(10px,2.8vw,12px);line-height:1.15;gap:2px}
 #homeView .venue-progress{font-size:clamp(7px,1.95vw,9px)}
 #homeView .venue-empty{font-size:clamp(8px,2.3vw,10px)}
}
