:root{color-scheme:light;font-family:"Segoe UI","Yu Gothic",Meiryo,sans-serif;color:#23322f;background:#fafbf9;line-height:1.3}
*{box-sizing:border-box}
body{margin:0;min-width:0}
.shell{max-width:420px;margin:auto;padding:0 16px}
.masthead{background:#fff;border-bottom:1px solid #dce6de;padding:7px 0}
.eyebrow{margin:0;color:#667e72;font-size:10px;letter-spacing:.13em;font-weight:600}
.heading{display:flex;gap:8px;align-items:center;min-width:0}
.brand-mark{display:block;flex:none;width:48px;height:48px;object-fit:contain}
h1{margin:0;font-size:20px;letter-spacing:.02em;white-space:nowrap}
.badge{border:1px solid #c6d8ca;color:#315e42;border-radius:5px;font-size:10px;padding:1px 5px;background:#f1f7f2;white-space:nowrap}
.notices{display:flex;flex-wrap:wrap;gap:0 12px;font-size:10px;color:#45524b}
.notices p{margin:0}
.muted{color:#68756f;font-size:11px}
#connection{margin:3px 0}
.intro{padding:5px 0 0}
.intro summary{font-size:11px;color:#506258;cursor:pointer}
.intro p{margin:4px 0;font-size:11px}
.race-card{background:#fff;border:1px solid #dce6de;border-radius:7px;margin:5px 0 10px;min-width:0}
.venue-tabbar{overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;border-bottom:1px solid #dce6de;background:#f7f9f7;border-radius:6px 6px 0 0}
.venue-tablist{display:flex;gap:2px;width:max-content;min-width:100%;padding:3px 4px}
.venue-tab{flex:1 0 auto;min-width:88px;min-height:36px;border:0;border-radius:4px;padding:6px 14px;background:transparent;color:#344f43;font-family:inherit;font-size:14px;font-weight:600;line-height:1.2;white-space:nowrap;cursor:pointer}
.venue-tab[aria-selected="true"]{background:#fff;box-shadow:inset 0 0 0 1px #a8bcb0;color:#1d5136}
.venue-tab.venue-finished{color:#87938c}
.venue-tab.venue-waiting{color:#68766e}
.venue-tab.venue-flashing:not(.venue-finished){animation:venue-notice 1.4s ease-in-out infinite}
.venue-tab.venue-t5:not(.venue-finished){color:#bd650d}
.venue-tab:focus-visible{outline:2px solid #245b9a;outline-offset:-2px}
@keyframes venue-notice{50%{opacity:.48}}
@media(prefers-reduced-motion:reduce){.venue-tab.venue-flashing:not(.venue-finished){animation:none}.venue-tab.venue-flashing:not(.venue-finished)::after{content:"●";font-size:7px;margin-left:3px;vertical-align:middle}}
.race-heading{padding:5px 7px 3px;border-bottom:1px solid #e8eee9;display:flex;justify-content:space-between;gap:6px;align-items:start}
.race-heading>div{min-width:0}
.race-heading h2{font-size:14px;line-height:1.15;margin:0;overflow-wrap:anywhere}
.race-heading p{margin:1px 0 0}
.version{background:#eef5ef;color:#375e45;border-radius:4px;font-size:10px;padding:2px 4px;white-space:nowrap}
.odds-note{font-size:10px;color:#566a5e}
.demo{color:#9a681e;font-size:10px}
.sleep-demo-card{border-color:#bdc9e2}
.venue-waiting-card .race-heading{min-height:46px;align-items:center}
.sleep-demo-card .race-heading{background:#f4f6ff}
.sleep-demo-label{display:block;flex:none;align-self:start;padding:3px 6px;border-radius:4px;background:#503e8e;color:#fff;font-size:11px;line-height:1.2}
.sleep-demo-explanation{color:#504473;font-size:11px;font-weight:600}
.cutoff-banner{color:#b12727;font-size:11px;font-weight:700;line-height:1.1;margin:1px 0 0}
.race-tabs{display:flex;gap:3px;padding:4px 5px 0;border-bottom:1px solid #ccd4db;background:#f8fafc}
.race-tablist{display:flex;gap:3px;flex:none}
.sort-hint{align-self:center;font-size:9px;line-height:1.1;color:#556473;white-space:nowrap}
.race-tab{min-height:26px;padding:3px 12px;border:1px solid #ccd4db;border-bottom:0;border-radius:4px 4px 0 0;background:#eef2f7;color:#345576;font-family:inherit;font-size:11px;font-weight:600;line-height:1.2;cursor:pointer}
.race-tab[aria-selected="true"]{background:#2d66ae;border-color:#2d66ae;color:#fff}
.race-tab:focus-visible{outline:2px solid #164c91;outline-offset:1px}
.table-wrap{width:100%;overflow:visible}
#races table{width:100%;table-layout:fixed;border-collapse:collapse;font-variant-numeric:tabular-nums}
#races thead th{padding:3px 2px;background:#edf1f5;color:#3e4c59;border-bottom:1px solid #bac5cf;font-size:10px;font-weight:600;line-height:1.1;text-align:center;overflow-wrap:anywhere}
#races .data-table thead th:nth-child(n+4){text-align:right}
#races .data-table thead th:nth-child(n+4) .sort-button{text-align:right;padding-right:7px}
#races thead th[aria-sort]{position:relative}
#races .sort-button{display:block;width:100%;border:0;padding:0;background:transparent;color:inherit;font:inherit;line-height:inherit;cursor:pointer;overflow-wrap:anywhere}
#races .sort-button:focus-visible{outline:2px solid #164c91;outline-offset:1px}
#races thead th[aria-sort="ascending"]::after,#races thead th[aria-sort="descending"]::after{position:absolute;right:0;top:0;font-size:7px;line-height:1;color:#2d66ae}
#races thead th[aria-sort="ascending"]::after{content:"▲"}
#races thead th[aria-sort="descending"]::after{content:"▼"}
#races .head-line{display:block}
#races tbody tr+tr{border-top:1px solid #dbe1e6}
#races tbody tr:nth-child(even){background:#fbfcfd}
#races tbody th,#races tbody td{padding:2px 2px;line-height:1.15;vertical-align:middle}
#races tbody th{font-size:12px;text-align:center}
#races .horse-name{text-align:left;overflow-wrap:anywhere}
#races .horse-label{display:block;font-size:12px;font-weight:600;line-height:1.15}
#races .rank-cell,#races .numeric-cell{font-family:Arial,"Segoe UI",sans-serif;font-size:12px;text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
#races .odds-cell{padding-right:4px}
#races .numeric-cell.odds-long{font-size:10px}
#races .ev-cell{padding-left:3px}
#races .ev-cell{color:#23322f;font-weight:400}
#races .ev-cell.ev-long{font-size:9px}
#races .ev-cell.ev-very-long{font-size:8px}
#races .ev-cell.ev-max-long{font-size:7px}
#races .number-cell.frame-1{background:#fff;color:#172018}
#races .number-cell.frame-2{background:#222;color:#fff}
#races .number-cell.frame-3{background:#c62828;color:#fff}
#races .number-cell.frame-4{background:#2456a6;color:#fff}
#races .number-cell.frame-5{background:#f1d44b;color:#172018}
#races .number-cell.frame-6{background:#167640;color:#fff}
#races .number-cell.frame-7{background:#e68a2e;color:#172018}
#races .number-cell.frame-8{background:#f3a2ba;color:#172018}
#races .data-table thead th:nth-child(6){font-size:9px;padding-left:0;padding-right:0}
#races .data-table thead th:nth-child(6) .sort-button{font-size:8px;letter-spacing:-1px;padding-right:5px}
#races .data-table thead th:nth-child(6)[aria-sort]::after{font-size:5px}
.place-prob-note{margin:0;padding:3px 7px;color:#61716a;font-size:10px}
.race-details{padding:2px 7px 4px;color:#65756b;font-size:10px}
.race-details summary{cursor:pointer}
.race-details p{margin:2px 0}
.empty{padding:14px;background:#fff;border:1px solid #e2e8e2;border-radius:7px;color:#63746a;font-size:12px}
footer{padding-top:6px!important;padding-bottom:12px!important}
[hidden]{display:none!important}
@media(max-width:600px){
  .shell{padding:0 7px}
  .masthead{padding:4px 0}
  .eyebrow{font-size:9px}
  .heading{gap:4px}
  .brand-mark{width:36px;height:36px}
  h1{font-size:17px}
  .badge{font-size:9px}
  .notices{font-size:9px;gap:0 7px}
  .race-heading h2{font-size:12px}
  .venue-tablist{padding:2px 3px}
  .venue-tab{min-width:90px;min-height:32px;padding:5px 10px;font-size:12px}
  .race-tab{min-height:25px;padding:3px 10px}
  #races .data-table thead th:nth-child(7) .sort-button{font-size:9px}
  #races tbody th,#races tbody td{padding:1px 1px}
  #races tbody th,#races .rank-cell,#races .numeric-cell,#races .horse-label{font-size:11px}
}
@media(min-width:601px){
  #races tbody .horse-name{padding-left:4px;padding-right:4px}
  #races tbody .rank-cell,#races tbody .numeric-cell{padding-left:3px;padding-right:3px}
  #races tbody .odds-cell{padding-right:4px}
}
@media(max-width:360px){h1{font-size:16px;letter-spacing:0}.badge{padding:1px 4px}}
@media(max-width:350px){#races .horse-label{font-size:10px}#races .numeric-cell.odds-long{font-size:9px}}
@media(max-width:340px) and (max-height:650px){
  .eyebrow{display:none}
  .masthead{padding:2px 0}
  .intro{padding-top:2px}
  #connection{margin:1px 0}
  .race-card{margin-top:2px}
  .race-heading{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:0 4px;padding:2px 4px}
  .race-heading>div{display:contents}
  .race-heading h2{grid-column:1;grid-row:1}
  .race-heading .version{grid-column:2;grid-row:1}
  .race-heading .muted{grid-column:1;grid-row:2}
  .race-heading .cutoff-banner{grid-column:2;grid-row:2;white-space:nowrap;align-self:center;margin:0;font-size:10px}
  .race-heading .odds-note{grid-column:1/-1;grid-row:3}
  .race-heading .demo{grid-column:1/-1;grid-row:4}
  .race-heading p{margin:0}
  .race-tab{min-height:24px;padding:2px 9px}
  #races tbody th,#races tbody td{padding-top:0;padding-bottom:0}
  .race-details{padding-top:0;padding-bottom:1px}
  .sleep-demo-card .race-heading{display:flex;flex-direction:column;align-items:stretch;gap:2px;padding:4px 6px}
  .sleep-demo-card .race-heading>div{display:block}
  .sleep-demo-card .sleep-demo-label{order:-1;align-self:flex-start;white-space:nowrap}
}
/* The expired morning demo keeps its separate wide-table presentation. */
.morning-demo{margin:28px 0;padding:20px 18px 0;border:2px solid #dfcfad;border-radius:12px;background:#fffdf7}
.morning-demo>h2{font-size:21px;margin:0 0 8px}
.morning-demo .race-heading h3{font-size:18px;margin:0}
.morning-demo .table-wrap{overflow-x:auto}
.morning-demo .table-wrap table{min-width:900px;table-layout:fixed;border-collapse:collapse}
.morning-demo .table-wrap table.odds-table{min-width:1300px}
.morning-demo th,.morning-demo td{padding:12px 14px;font-size:14px}
.morning-demo thead th{background:#f6f8f5;color:#63746a}

/* Desktop: keep the existing proportions and enlarge the complete board by 25%. */
@media(min-width:601px){.shell{zoom:1.25}}

/* Personal marks: keep frame contrast and EV backgrounds, emphasize selected horses. */
#races .mode-win th:nth-child(1){width:6%}
#races .mode-win th:nth-child(2){width:5.5%}
#races .mode-win th:nth-child(3){width:31%}
#races .mode-win th:nth-child(4){width:5.5%}
#races .mode-win th:nth-child(5){width:13%}
#races .mode-win th:nth-child(6){width:6%}
#races .mode-win th:nth-child(7){width:15%}
#races .mode-win th:nth-child(8){width:18%}
#races .mode-place th:nth-child(1){width:6%}
#races .mode-place th:nth-child(2){width:5.5%}
#races .mode-place th:nth-child(3){width:30.5%}
#races .mode-place th:nth-child(4){width:5.5%}
#races .mode-place th:nth-child(5){width:13%}
#races .mode-place th:nth-child(6){width:6%}
#races .mode-place th:nth-child(7){width:18.5%}
#races .mode-place th:nth-child(8){width:15%}
#races .horse-row{color:#17201c;font-weight:400}
#races .horse-label{font-weight:400;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#races .horse-row .ev-cell{color:inherit;font-weight:inherit}
#races .horse-row[data-mark="◎"]{color:#b52c2c;font-weight:700}
#races .horse-row[data-mark="〇"]{color:#17201c;font-weight:700}
#races .horse-row[data-mark="▲"],#races .horse-row[data-mark="△"],#races .horse-row[data-mark="☆"],#races .horse-row[data-mark="×"]{color:#17201c}
#races .horse-row[data-mark="消"]{color:#555e59;font-weight:400}
#races .horse-row[data-mark="消"]>th,#races .horse-row[data-mark="消"]>td{background:#d5dad7!important;color:#555e59;font-weight:400}
#races .horse-row .horse-label{font-weight:inherit}
#races .mark-cell{padding:0;text-align:center}
#races .mark-select{display:block;width:100%;min-width:0;height:18px;margin:0;padding:0;border:0;border-radius:2px;appearance:none;background:transparent;color:inherit;font:inherit;font-size:13px;line-height:1;text-align:center;cursor:pointer}
#races .mark-select:focus-visible{outline:2px solid #245b9a;outline-offset:-1px;background:#eef3fa}
#races .mark-select option{color:#17201c;background:#fff;font-weight:400}
#races .mark-select:disabled{cursor:default}
#races .horse-row[data-mark="消"] .number-cell{filter:saturate(.55)}
@media(max-width:600px){#races .mark-select{height:15px;font-size:12px}#races .data-table thead th:nth-child(2){font-size:9px;padding-left:0;padding-right:0}#races .data-table thead th:nth-child(4) .head-line{font-size:9px}#races .data-table thead th:nth-child(5) .sort-button{padding-right:3px}#races .data-table thead th:nth-child(7) .sort-button{padding-right:3px}}
@media(max-width:340px){#races .mark-select{height:14px}#races .horse-label{font-size:9px}#races .numeric-cell,#races .rank-cell{font-size:10px}}

/* Compact, race-scoped reset with an inline confirmation on the right. */
.mark-reset-bar{display:flex;align-items:center;gap:7px;padding:3px 6px;border-top:1px solid #e7ece8;min-width:0;font-size:10px;line-height:1.2}
.mark-reset-bar button{flex:none;min-height:24px;margin:0;padding:3px 7px;border:1px solid #c7d1ca;border-radius:4px;background:#f7f9f7;color:#45594c;font:inherit;line-height:1.2;white-space:nowrap;cursor:pointer}
.mark-reset-confirm{display:inline-flex;align-items:center;gap:5px;min-width:0}
.mark-reset-question{white-space:nowrap;color:#526158}
.mark-reset-bar .mark-reset-yes{background:#fff5f3;border-color:#d7b8b3;color:#963d32}
.mark-reset-bar .mark-reset-no{background:#fff}
.mark-reset-bar button:focus-visible{outline:2px solid #245b9a;outline-offset:1px}
@media(max-width:350px){.mark-reset-bar{gap:5px;padding:3px 4px;font-size:10px}.mark-reset-confirm{gap:4px}.mark-reset-bar button{padding:3px 6px}}

#races .place-private-table thead th:nth-child(1){width:6%}
#races .place-private-table thead th:nth-child(2){width:5.5%}
#races .place-private-table thead th:nth-child(3){width:31%}
#races .place-private-table thead th:nth-child(4){width:57.5%;text-align:center}
#races .place-private-table .horse-row>td.place-private-cell{padding:12px 8px;background:#f8faf9!important;color:#51665a!important;font-weight:600;vertical-align:middle;text-align:center;border-left:1px solid #e0e7e2}
#races .place-private-notice{margin:0;font-size:clamp(17px,4.8vw,22px);line-height:1.8;overflow-wrap:anywhere}
#races .mark-reset-bar[hidden],#races .sort-hint[hidden]{display:none}

#races .place-private-notice>span{display:block}

/* PLACE_EDIV: the prediction mark replaces rank only on the place tab. */
#races .mode-place.has-expected thead th:nth-child(4){width:9%}
#races .mode-place.has-expected thead th:nth-child(7){width:15%}
#races .c05-cell{font-family:Arial,sans-serif;font-size:10px;font-weight:600;color:#5b6745}
#races .expected-reference-table th:nth-child(1){width:10%}
#races .expected-reference-table th:nth-child(2){width:55%}
#races .expected-reference-table th:nth-child(3){width:35%}
#races .expected-reference-table td{font-size:11px}
@media(max-width:600px){#races .c05-cell{font-size:9px}#races .expected-reference-table .numeric-cell{font-size:10px}}

/* v2.3 PC contract: raw x1000 EV and a quieter lower-bound reference. */
#races .place-lower-reference{display:block;margin-top:1px;font-size:8px;line-height:1.1;font-weight:400;color:#53635c;white-space:nowrap}
#races .mode-place .ev-cell{vertical-align:middle}
#races .mode-place.has-expected thead th:nth-child(4){width:7%}
#races .mode-place.has-expected thead th:nth-child(8){width:17%}
@media(min-width:601px){#races .place-lower-reference{font-size:9px}}

@media(max-width:600px){#races .mode-place thead th:nth-child(7) .head-line,#races .mode-place thead th:nth-child(8) .head-line{font-size:8px;line-height:1.15;white-space:normal}#races .mode-place thead th:nth-child(8) button{padding-left:0;padding-right:0}}
@media(max-width:350px){#races .mode-place thead th:nth-child(8) .head-line{font-size:7.5px}}

@media(max-width:600px){#races .mode-place.has-expected .horse-row>.odds-cell{font-size:9px;letter-spacing:-.15px;padding-left:1px;padding-right:1px}}

/* Final secret place table: seven columns; no lower EV or automatic flag column. */
#races .mode-place.has-expected thead th:nth-child(1){width:6%}
#races .mode-place.has-expected thead th:nth-child(2){width:6%}
#races .mode-place.has-expected thead th:nth-child(3){width:31%}
#races .mode-place.has-expected thead th:nth-child(4){width:13%}
#races .mode-place.has-expected thead th:nth-child(5){width:7%;font-size:9px;padding-left:0;padding-right:0}
#races .mode-place.has-expected thead th:nth-child(6){width:19%;font-size:10px;padding:2px}
#races .mode-place.has-expected thead th:nth-child(7){width:18%}
#races .mode-place.has-expected thead th:nth-child(5) .sort-button{font-size:8px;letter-spacing:-.5px;padding-right:5px}
#races .mode-place.has-expected thead th:nth-child(6) .head-line,#races .mode-place.has-expected thead th:nth-child(7) .head-line{white-space:normal}
@media(max-width:600px){#races .mode-place.has-expected thead th:nth-child(6) .head-line,#races .mode-place.has-expected thead th:nth-child(7) .head-line{font-size:8px;line-height:1.15}#races .mode-place.has-expected thead th:nth-child(7) button{padding-left:0;padding-right:0}}

.preview-day{max-width:850px;margin:7px auto;padding:5px 10px;background:#fff7df;color:#6d5c29;border-radius:4px;font:11px/1.5 system-ui}.preview-day a{color:inherit}.day-choice{margin:6px 0 8px;padding:7px;background:#fff;border:1px solid #dce5df;border-radius:6px}.day-choice h2{font-size:13px;line-height:1.4;margin:0 0 5px;color:#355544}.day-choice-note{font-size:10px;margin:0 0 5px;color:#718076}.day-venue{display:grid;grid-template-columns:32px minmax(0,1fr);gap:4px;align-items:center;margin:4px 0}.day-venue-name{font-size:11px;color:#45594d;font-weight:600}.day-race-list{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:2px}.day-race{display:flex;align-items:center;justify-content:center;min-height:26px;padding:1px 0;border:1px solid #d5ded8;border-radius:3px;background:#f9fbf9;color:#365446;text-decoration:none;font-size:10px;line-height:1.2;white-space:nowrap}.day-race[aria-current=page]{background:#365c49;border-color:#365c49;color:white}.day-race.unavailable{background:#d8ddda;color:#737d76;border-color:#cbd2cd}.day-race:focus-visible{outline:2px solid #3469a1;outline-offset:1px}.day-choice+.race-card{margin-top:0}@media(min-width:700px){.day-venue{grid-template-columns:40px minmax(0,1fr)}.day-race{font-size:11px;min-height:27px}}
.day-choice{padding:5px 6px}.day-choice h2{margin-bottom:2px;font-size:12px}.day-choice-note{margin-bottom:3px;font-size:9px}.day-venue{margin:2px 0}.day-race{min-height:23px}@media(min-width:700px){.day-race{min-height:24px}}

/* New prediction alerts affect only the race-button text. */
.day-race[data-update="T-10"] .day-race-label,.day-race[data-update="T-5"] .day-race-label{animation:day-race-blink 1.5s ease-in-out infinite}
.day-race[data-update="T-5"]{color:#be4937}
.day-race[data-update="T-5"][aria-current="page"]{color:#ad392b;background:#fff4ef;border-color:#b96953}
.day-race[data-ended="true"]{color:#859189}
@keyframes day-race-blink{0%,100%{opacity:1}50%{opacity:.38}}
@media(prefers-reduced-motion:reduce){.day-race[data-update] .day-race-label{animation:none;text-decoration:underline;text-underline-offset:3px}}

/* The current live race remains identifiable while browsing history. */
.day-race[data-update="T-10"],.day-race[data-update="T-5"]{border:2px solid #b95a4b}
.day-race[data-update="T-5"][aria-current="page"]{border-color:#b95a4b}

#races .mode-win.has-finish thead th:nth-child(1){width:6%}
#races .mode-win.has-finish thead th:nth-child(2){width:5.5%}
#races .mode-win.has-finish thead th:nth-child(3){width:28%}
#races .mode-win.has-finish thead th:nth-child(4){width:5%}
#races .mode-win.has-finish thead th:nth-child(5){width:12%}
#races .mode-win.has-finish thead th:nth-child(6){width:5.5%}
#races .mode-win.has-finish thead th:nth-child(7){width:13%}
#races .mode-win.has-finish thead th:nth-child(8){width:17%}
#races .mode-win.has-finish thead th:nth-child(9){width:8%;text-align:right}
#races .has-finish .finish-cell{text-align:right;padding-right:3px;white-space:nowrap}
#races .has-finish .finish-head .sort-button{padding-right:5px}
@media(max-width:600px){#races .has-finish .finish-head{font-size:9px}#races .has-finish .finish-cell{font-size:10px}}

#support-area{scroll-margin-top:0}
main.shell:has(>#support-area:target){min-height:100svh}

/* T-10 uses darker black text; T-5 keeps its red text. */
.day-race[data-update="T-10"]{color:#151916}
.day-race[data-update="T-10"][aria-current="page"]{color:#151916;background:#f3f6f4}
.day-race[data-update="T-10"],.day-race[data-update="T-5"]{animation:day-race-frame-blink 1.5s ease-in-out infinite}
@keyframes day-race-frame-blink{0%,100%{border-color:#b95a4b}50%{border-color:#dcb6ae}}
@media(prefers-reduced-motion:reduce){.day-race[data-update]{animation:none}}

.day-race[data-update="T-10"],.day-race[data-update="T-10"][aria-current="page"]{border-color:#151916;animation-name:day-race-black-frame-blink}
@keyframes day-race-black-frame-blink{0%,100%{border-color:#151916}50%{border-color:#969d98}}

.update-sound-controls{display:flex;flex-wrap:wrap;align-items:center;gap:3px 7px;margin-top:5px;padding-top:4px;border-top:1px solid #e6ebe7;font-size:10px;line-height:1.3;color:#53645a}
.update-sound-controls label{display:inline-flex;align-items:center;gap:3px;cursor:pointer;white-space:nowrap}
.update-sound-controls input{margin:0;accent-color:#365c49}
.update-sound-controls button{padding:2px 5px;min-height:23px;border:1px solid #cfd8d2;border-radius:3px;background:#f8faf8;color:#45594d;font:inherit;cursor:pointer}
.update-sound-controls button:disabled{color:#a2aaa5;cursor:default}
.update-sound-status{font-size:9px;color:#6e7b73}
.update-sound-status:empty{display:none}

.history-result-notice{margin:0;padding:5px 7px;background:#f3f6f4;border-top:1px solid #e2e8e4;color:#42584b;font-size:11px;line-height:1.5}
@media(max-width:600px){.history-result-notice{font-size:10px;padding:4px 6px}}

main.shell{overflow-anchor:none}

.update-sound-controls select{padding:2px 3px;min-height:23px;border:1px solid #cfd8d2;border-radius:3px;background:#fff;color:#45594d;font:inherit}
.update-sound-controls select:disabled{color:#a2aaa5}

/* Keep audio controls to one compact line, including 320px phones. */
.update-sound-controls{flex-wrap:nowrap;gap:5px;font-size:9px;min-width:0;position:relative}
.update-sound-controls label{gap:2px;flex:none}
.update-sound-controls input{width:12px;height:12px;flex:none}
.update-sound-controls select{width:29px;min-height:22px;padding:1px 0;font-size:9px}
.update-sound-controls button{flex:none;min-height:22px;padding:1px 3px;font-size:9px;white-space:nowrap}
.update-sound-status{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}

#races .mode-win.has-finish thead th:nth-child(3){width:31%}
#races .mode-win.has-finish thead th:nth-child(7){width:12%}
#races .mode-win.has-finish thead th:nth-child(8){width:15%}
.day-dream{width:100%;min-height:28px}

/* Free place preview: fixed neutral masks, no private values or EV shading. */
#races .place-masked-table thead th:nth-child(1){width:6%}
#races .place-masked-table thead th:nth-child(2){width:6%}
#races .place-masked-table thead th:nth-child(3){width:31%}
#races .place-masked-table thead th:nth-child(4){width:15%}
#races .place-masked-table thead th:nth-child(5){width:8%;font-size:9px}
#races .place-masked-table thead th:nth-child(6){width:17%;font-size:9px}
#races .place-masked-table thead th:nth-child(7){width:17%}
#races .masked-value-cell{background:#f5f6f5!important;color:#56615a!important}
#races .forecast-mask{display:block;width:100%;max-width:4.8em;height:1em;margin:0 0 0 auto;border-radius:2px;color:transparent!important;user-select:none;background:#dfe3e0;background-image:none;box-shadow:none}

/* Membership note and historical aggregate figures; no per-horse data exposed. */
#races .myomi-info{padding:5px 7px 4px;border-top:1px solid #e5ebe7;color:#56695d;font-size:10px;line-height:1.5}
#races .myomi-info p{margin:0 0 3px}
#races .myomi-regimag-link{color:#315e42;text-decoration:underline;text-underline-offset:2px}
#races .myomi-regimag-link:focus-visible{outline:2px solid #245b9a;outline-offset:2px}
#races .myomi-results{margin-top:3px}
#races .myomi-results>summary{cursor:pointer;font-size:10px;color:#3e5b49}
#races .myomi-results-scope{padding-top:5px}
#races .myomi-results-section{margin-top:5px}
#races .myomi-results-section h3{font-size:11px;font-weight:600;margin:0 0 3px}
#races .myomi-results-table{max-width:360px;margin:0;table-layout:fixed}
#races .myomi-results-table th,#races .myomi-results-table td{padding:4px 6px;font-size:10px;font-weight:400;line-height:1.3;text-align:right;white-space:nowrap}
#races .myomi-results-table th:first-child{width:36%;text-align:left}
#races .myomi-results-table thead th{background:#f3f6f4;border-bottom-color:#d8e2db}
#races .myomi-results-note{padding-top:5px;font-size:10px}

/* Selectable pre-race cards */
.day-race.unavailable[aria-current="page"]{background:#365c49;border-color:#365c49;color:white}
.day-race:not(:disabled){cursor:pointer}

/* Neutral buttons: future is white, elapsed keeps the previous gray.
   Selected/current T-10/T-5 styles and animations remain authoritative. */
.day-race:not([aria-current="page"]):not([data-update]){background:#fff;color:#365446;border-color:#d5ded8}
.day-race[data-ended="true"]:not([aria-current="page"]):not([data-update]){background:#d8ddda;color:#737d76;border-color:#cbd2cd}

/* PC-designated main races. T10/T5 and elapsed states keep their live styles. */
.day-race[data-main="true"]:not([data-update]):not([data-ended="true"]){background:#fff0f0;border-color:#e4c8c5;color:#6a4141}
.day-race[data-main="true"][aria-current="page"]:not([data-update]):not([data-ended="true"]){border-color:#a86a65;box-shadow:inset 0 0 0 1px #a86a65}

.pre-ev-source-note{margin:2px 7px;color:#607066;font-size:10px;overflow-wrap:anywhere}
@media(min-width:601px){.shell{max-width:480px}}
#races table.data-table.mode-win.with-pre-ev .prior-stage-value{text-align:right;white-space:nowrap}
#races table.data-table.mode-win.with-pre-ev .masked-value-cell{padding-left:3px;padding-right:3px}
#races table.data-table.mode-win.with-pre-ev .forecast-mask{max-width:4em;width:100%;height:1em}
@media(max-width:600px){#races table.data-table.mode-win.with-pre-ev .numeric-cell,#races table.data-table.mode-win.with-pre-ev .rank-cell,#races table.data-table.mode-win.with-pre-ev .horse-label{font-size:10px}#races table.data-table.mode-win.with-pre-ev tbody th{font-size:11px}#races table.data-table.mode-win.with-pre-ev tbody td{padding:1px 0}#races table.data-table.mode-win.with-pre-ev .horse-name{padding-left:1px;padding-right:1px}#races table.data-table.mode-win.with-pre-ev .mark-select{font-size:11px;width:100%}#races table.data-table.mode-win.with-pre-ev thead th{font-size:9px;padding:2px 0}#races table.data-table.mode-win.with-pre-ev .sort-button{padding-right:2px}}
@media(max-width:350px){#races table.data-table.mode-win.with-pre-ev .horse-label,#races table.data-table.mode-win.with-pre-ev .numeric-cell{font-size:9px}}
#races table.data-table.mode-win.with-pre-ev thead th:nth-child(1){width:4.5%}
#races table.data-table.mode-win.with-pre-ev thead th:nth-child(2){width:5.5%}
#races table.data-table.mode-win.with-pre-ev thead th:nth-child(3){width:28%}
#races table.data-table.mode-win.with-pre-ev thead th:nth-child(4){width:5%}
#races table.data-table.mode-win.with-pre-ev thead th:nth-child(5){width:10%}
#races table.data-table.mode-win.with-pre-ev thead th:nth-child(6){width:5%}
#races table.data-table.mode-win.with-pre-ev thead th:nth-child(7){width:11%}
#races table.data-table.mode-win.with-pre-ev thead th:nth-child(8){width:15%}
#races table.data-table.mode-win.with-pre-ev thead th:nth-child(9){width:16%}

/* Compact, initially collapsed prior-EV explanation. */
#races .myomi-results .pre-ev-explanation-list{margin:4px 0 9px;padding-left:1.4em}
#races .myomi-results .pre-ev-explanation-heading{margin-top:8px}
