/* v0.4 Reference-layout adaptation. Presentational only; app.js/real50.js untouched. */
:root{--bg:#031422;--gold:#f0cb7c;--aqua:#38e5e5;--aqua2:#00cfac;--line:#137d82;--white:#f5fbfb}
html,body{overflow-x:clip} body{background:#03121f;color:#e6f8ff;font-family:'Yu Gothic','Meiryo',system-ui,sans-serif}
.ambient{display:none}
.topbar{height:auto;padding:0;display:block;border:0;position:relative;z-index:3;background:#04101b}
.brand-banner{height:122px;display:flex;align-items:center;justify-content:space-between;position:relative;padding:0 30px;overflow:hidden;border-bottom:1px solid #086c78;background:linear-gradient(90deg,#02101c 0%,#051626 37%,rgba(1,16,30,.4) 64%,#041221 100%)}
.brand-banner::before{content:'';position:absolute;inset:0 0 0 51%;background-image:linear-gradient(90deg,#04121e 0%,rgba(4,18,30,.08) 36%,rgba(4,18,30,.15) 74%,#061a24 100%),url('edge-hero-horse.webp');background-size:auto,auto 122%;background-position:center,center 44%;background-repeat:no-repeat;opacity:.98;pointer-events:none}
.brand-banner::after{content:'';position:absolute;left:0;right:0;bottom:0;height:1px;background:linear-gradient(90deg,transparent,#11cbb4,transparent)}
.brand{z-index:1;min-width:360px;gap:10px}.brand-horse{width:126px;height:92px;object-fit:contain;border-radius:0;mix-blend-mode:screen}.brand-lockup strong{font-family:Georgia,'Times New Roman',serif;font-weight:700;color:#faf4dc;font-size:clamp(23px,2.3vw,37px);letter-spacing:.015em;white-space:nowrap;text-shadow:0 1px 9px #000}.brand-lockup em{color:#f8d587}.brand-lockup small{letter-spacing:.23em;font-size:10px;color:#9bddf5}
.banner-tagline{font-family:Georgia,'Yu Mincho','Hiragino Mincho ProN',serif;font-size:clamp(18px,2.1vw,31px);line-height:1.42;color:#fff1da;font-weight:800;position:absolute;left:35%;top:19px;z-index:1;text-shadow:0 2px 8px #000}.banner-tagline b{color:#f6d68b}.banner-right{align-self:flex-end;margin-bottom:14px;margin-left:auto;font-size:11px;letter-spacing:.23em;color:#eafcff;position:relative;z-index:1;text-align:center;line-height:1.7;opacity:.94}.banner-right small{color:#8dd6e5;font-size:9px}
.top-nav{display:flex;align-items:stretch;gap:0;height:56px;padding:0 19px;background:linear-gradient(100deg,#041523,#06242b,#061927);border-bottom:2px solid #087e7d;overflow-x:auto;scrollbar-width:none}
.top-nav button{background:none;border:0;color:#e4f1f5;padding:0 clamp(10px,1.6vw,25px);font-size:15px;font-weight:850;white-space:nowrap;position:relative}
.top-nav button+button:before{content:'';position:absolute;left:0;top:14px;bottom:14px;width:1px;background:#127f8e70}
.top-nav button.active{background:linear-gradient(180deg,#0b4243,#06363b);border:1px solid #1be0d6;color:#fff2c9;border-radius:9px;box-shadow:inset 0 0 16px #12d5ce45,0 0 16px #0fe1dc3d}
.top-nav button:hover{color:var(--gold)}.top-nav button.nav-setting{margin-left:auto;color:var(--aqua)}
.layout{width:100%;max-width:1800px;padding:0 17px;margin:0 auto;display:block}
.control-panel{display:grid;grid-template-columns:auto auto 1fr;gap:10px;align-items:center;border:0;background:none;border-radius:0;padding:12px 0 9px;box-shadow:none;position:relative}
.control-label{display:none}.control-fields{display:flex;gap:8px;margin:0;align-items:center}
.field{gap:0}.field>span{display:none}.field select{border:1px solid #18abb0;background-color:#062631;min-height:45px;height:45px;border-radius:7px;padding:7px 31px 7px 12px;color:#e8ffff;box-shadow:inset 0 0 10px #00775b55;font-size:13px}
#sel-date{width:172px}#sel-course{width:100px}#sel-race{width:80px}
.edge-race-buttons{display:flex;gap:3px;min-width:0;overflow-x:auto;scrollbar-width:thin;scrollbar-color:#1b6770 transparent}
.edge-race-buttons button{min-width:37px;height:41px;border:1px solid #16495b;background:#071926;color:#d9ecf8;border-radius:5px;font-size:12px;padding:3px 5px;font-weight:900;flex-shrink:0}
.edge-race-buttons button.active{background:linear-gradient(180deg,#117977,#054c58);border-color:#3cf5e2;box-shadow:inset 0 0 10px #4bfce499;color:#fff}.edge-race-buttons button:disabled{opacity:.3;cursor:default}
.source-strip{grid-column:3;grid-row:2;margin:-4px 0 0;display:flex;justify-content:space-between;align-items:center;font-size:10px;min-height:10px}.source-strip .small-link{color:#f4d392}.source-strip #source-indicator{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:85%}
.dashboard-grid{display:grid;grid-template-columns:minmax(0,2.52fr) minmax(380px,1.05fr);gap:12px;align-items:start}.dashboard-primary{min-width:0}
.ticket-overview-group{margin:0!important;background:linear-gradient(110deg,#042b2d,#061f28);border:1px solid #1aa7a0;border-radius:11px;padding:13px 12px 12px;box-shadow:inset 0 0 12px #00afa016}
.ticket-group-heading{margin:0 2px 10px;align-items:center;gap:13px}.ticket-group-heading h2{font-family:Georgia,'Yu Mincho',serif;color:#eccc7a;font-size:23px;font-weight:800}.ticket-group-heading h2:before{content:'♛';color:#ecc56e;font-size:26px;padding-right:10px}.ticket-group-heading p{font-size:10px;color:#b9d6d4}
.ticket-overview-group .ticket-overview{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin:0}
.ticket-card,.ticket-card.reference-only,.ticket-card.focus{border:1px solid #b79552;border-radius:10px;padding:12px 10px 11px;text-align:left;display:flex;flex-direction:column;gap:8px;min-height:177px;background:linear-gradient(150deg,#07312d,#031822 80%);box-shadow:inset 0 0 16px #0f7e6a1b;position:relative}
.ticket-card.reference-only{border-color:#366e70;background:linear-gradient(150deg,#0a292c,#061d2c)}.ticket-card.focus{border:2px solid #f2cb70;background:radial-gradient(circle at 76% 10%,#5e55273b,transparent 50%),linear-gradient(145deg,#104034,#061c26);box-shadow:0 0 14px #ddb15c24,inset 0 0 24px #c2a2581b}
.tile-head{display:flex;align-items:center;justify-content:space-between;gap:5px}.ticket-label{font-family:'Yu Mincho',serif;font-weight:900;color:#ffe4a2;font-size:15px}.ticket-card.reference-only .ticket-label{color:#c7e2e6}.ticket-stage{font-size:10px;padding:2px 5px;border:1px solid #31575b;background:#0a3333;color:#9ee6e4;border-radius:5px;white-space:nowrap}.ticket-stage.research{color:#efd090;border-color:#806b42}.ticket-stage.enabled{color:#fae1a6;border-color:#cdac68}
.tile-pick{display:flex;align-items:center;gap:8px;min-height:55px}.tile-horse-num{width:43px;height:43px;display:grid;place-items:center;flex-shrink:0;background:linear-gradient(160deg,#30595d,#0d2932);color:white;border:1px solid #9edee5;border-radius:5px;font-size:25px;font-weight:950;box-shadow:inset 0 0 9px #ccfef527}.tile-horse-name{font-size:13px;font-weight:850;color:#f1f9f5;word-break:break-word}.tile-pair{font-size:clamp(24px,2.4vw,36px);letter-spacing:.06em;color:#f3ddaa;font-weight:900;white-space:nowrap}.ticket-card.focus .tile-pair{color:#ffe18b}
.tile-footer{display:flex;align-items:end;justify-content:space-between;margin-top:auto;gap:6px}.tile-footer>div{display:flex;flex-direction:column;gap:0}.tile-footer small{color:#a5d5d2;font-size:10px;line-height:1.2}.tile-footer strong,.ticket-card.focus .tile-footer strong{font-size:23px;color:#e9f8f8;font-weight:850}.ticket-card.focus .tile-footer strong{color:#ffe3a3}.tile-details{flex-shrink:0;border:1px solid #11a8a2;background:#0b3436;padding:3px 8px;border-radius:5px;color:#d3fafd;font-size:11px;font-weight:750}.ticket-card:hover{transform:translateY(-1px)}.edge-hidden-for-logic{display:none!important}
.pick-section{margin-top:11px}.pick-section .section-heading{margin:0 4px 6px;font-size:11px;letter-spacing:.02em}.stepnum{display:none}.pick-section .section-heading>span:nth-child(2){font-family:'Yu Mincho',serif;color:#f7dc92;font-size:16px}.section-sub{font-size:10px;color:#7edee1}
.pick-card{border:1px solid #116b72;border-radius:9px;padding:11px 14px 10px;background:linear-gradient(120deg,#07322b,#071e2a);box-shadow:none;display:grid;grid-template-columns:1.05fr 1.4fr auto;grid-template-rows:auto auto auto;gap:6px 16px;align-items:center;min-height:131px}.pick-card:after{display:none}
.pick-topline{grid-column:1;grid-row:1;display:flex;gap:10px}.kind-chip{padding:2px 8px;font-size:9px}.status-chip{padding:3px 9px;font-size:11px}.race-context{grid-column:2 / 4;grid-row:1;margin:0;font-size:11px;color:#a2cbd7;text-align:right}.pair-view{grid-column:1;grid-row:2;padding:0;margin:0;text-align:left;font-size:36px;line-height:1;white-space:nowrap}.pair-view .dash{font-size:27px;vertical-align:3px}.pair-names{grid-column:1;grid-row:3;padding:0;text-align:left;font-size:11px;line-height:1.35}
.key-metrics{grid-column:2;grid-row:2 / 4;margin:0;padding:5px 0;border:0;gap:5px}.metric span{font-size:10px;text-align:center}.metric strong{font-size:20px;color:#f5d787}.decision-note{display:none}.pick-actions{grid-column:3;grid-row:2 / 4;display:flex;flex-direction:column;gap:6px}.pick-actions button{font-size:11px;min-height:30px;width:125px;padding:5px}.research-footnote{display:none}
.edge-runner-panel{margin-top:11px;border:1px solid #118386;border-radius:9px;background:linear-gradient(170deg,#05222e,#041722);overflow:hidden}
.edge-block-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 12px 7px}.edge-block-heading h2{margin:0;font-family:Georgia,'Yu Mincho',serif;font-size:20px;color:#d9f4f9}.edge-block-heading button{font-size:11px;border:1px solid #35bcac;color:#ccece5;background:#084a45;border-radius:6px;padding:5px 11px;white-space:nowrap}
.edge-roster-wrap{overflow-x:auto;max-height:343px;overflow-y:auto;margin:0 10px 10px;border:1px solid #1a5362;border-radius:6px;scrollbar-color:#137676 #081c26;scrollbar-width:thin}
.edge-roster{width:100%;border-collapse:collapse;text-align:left;font-size:12px;white-space:nowrap}.edge-roster th{position:sticky;top:0;padding:7px 11px;background:#102c3d;color:#66eff0;font-size:11px;text-align:right;z-index:1}.edge-roster th:nth-child(-n+2){text-align:left}.edge-roster td{padding:5px 11px;border-top:1px solid #123948;color:#dbeef0;text-align:right}.edge-roster td:nth-child(-n+2){text-align:left}.edge-roster tr:nth-child(even) td{background:#082330}.edge-roster tr.selected td{background:#223e31;color:#ffe69a}.edge-roster .num-badge,.edge-side-table .num-badge{display:inline-flex;width:25px;height:23px;border-radius:4px;align-items:center;justify-content:center;font-weight:900;border:1px solid #7faec4;background:#1a3a4b;color:#e8faff}
.edge-roster .positive{color:#6bf5ed}.edge-roster .gold{color:#ffe398;font-weight:900}
.edge-side{position:relative;min-width:0;border:1px solid #1b9b95;border-radius:12px;background:linear-gradient(160deg,#031d27,#041827);padding:11px 12px;box-shadow:inset 0 0 17px #0763651f;overflow:hidden}.edge-side-heading{display:flex;align-items:center;justify-content:space-between;gap:5px;margin-bottom:8px}.edge-side-heading h2{font-family:Georgia,'Yu Mincho',serif;margin:0;color:#f9db94;font-size:19px;white-space:nowrap}.edge-side-heading h2 span{font-size:12px}.edge-side-heading button{display:none;border:0;background:none;color:#bde8e1}
.edge-side-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;margin-bottom:9px}.edge-side-tabs button{padding:8px 3px;background:#072332;border:1px solid #16677b;border-radius:6px;color:#dae9f6;font-weight:850;font-size:12px}.edge-side-tabs button.active{background:linear-gradient(130deg,#05b08f,#0a7068);border-color:#5ffce7;box-shadow:0 0 11px #00dec644;color:#fff}
.edge-side-intro{margin:0 0 8px;font-size:10px;color:#90dadd}.edge-side-scroll{max-height:323px;overflow:auto;border:1px solid #164d5b;border-radius:6px;scrollbar-width:thin;scrollbar-color:#12818b #081d2a}
.edge-side-table,.edge-side-ranking{width:100%;border-collapse:collapse;white-space:nowrap;font-size:11px}.edge-side-table thead th,.edge-side-ranking thead th{position:sticky;top:0;background:#103047;color:#62eaea;font-size:10px;text-align:right;padding:6px 7px}.edge-side-table thead th:nth-child(-n+2){text-align:left}.edge-side-table td,.edge-side-ranking td{padding:5px 7px;border-top:1px solid #11435c;text-align:right}.edge-side-table td:nth-child(-n+2){text-align:left}.edge-side-table tr:nth-child(even) td{background:#092333}.edge-side-table tr.is-highlight td,.edge-side-ranking tr.is-highlight td{background:#54471e85;color:#ffe19a;font-weight:800}.edge-side-table .num-badge{width:22px;height:21px}
.edge-side-subhead{font-family:'Yu Mincho',serif;font-size:16px;font-weight:900;color:#d0eff6;margin:12px 0 6px}.edge-side-ranking th{text-align:right}.edge-side-ranking tr:first-child td{color:#ffda85}.edge-side-more{width:100%;border:1px solid #c9a65c;border-radius:7px;background:#0a2529;color:#f8dc9a;margin-top:8px;padding:8px;font-size:12px;font-weight:850}.edge-side-disclaimer{font-size:10px;color:#8ab2bd;line-height:1.4;margin:8px 0 0}
.real50-panel{max-width:1100px;margin:13px auto;border-radius:11px;padding:13px 18px}.real50-header h2{font-size:18px}.real50-stats strong{font-size:17px}.footer-info,.site-footer{max-width:1100px;margin-left:auto;margin-right:auto}
/* Right information pane becomes collapsible on small screens. */
@media(max-width:1190px){.brand-banner{padding:0 12px}.brand{min-width:330px}.brand-lockup strong{font-size:27px}.brand-horse{width:98px}.banner-tagline{left:39%;font-size:21px}.banner-right{display:none}.top-nav button{font-size:12px;padding:0 13px}.dashboard-grid{grid-template-columns:minmax(0,1fr) minmax(310px,.65fr);gap:9px}.ticket-overview-group .ticket-overview{gap:6px}.ticket-card{padding:9px 7px}.tile-horse-name{font-size:11px}.tile-details{padding:3px 5px}}
@media(max-width:900px){.layout{padding:0 10px}.brand-banner{height:94px}.brand-banner::before{background-size:auto,auto 130%}.brand{min-width:0}.brand-horse{width:79px;height:67px}.brand-lockup strong{font-size:22px}.brand-lockup small{font-size:8px}.banner-tagline{right:6px;left:auto;top:14px;text-align:right;font-size:15px}.top-nav{height:49px;padding:0 8px}.top-nav button{font-size:12px}.dashboard-grid{grid-template-columns:1fr}.edge-side{margin-top:0;display:none}.edge-side.open{display:block}.edge-side-heading button{display:block}.control-panel{grid-template-columns:1fr;gap:7px}.control-fields{display:grid;grid-template-columns:1.2fr 1fr .9fr}.field select,#sel-date,#sel-course,#sel-race{width:100%}.edge-race-buttons{grid-column:1;grid-row:2}.source-strip{grid-column:1;grid-row:3}.pick-card{grid-template-columns:1fr 1.3fr auto}.ticket-card{min-height:162px}}
@media(max-width:560px){.brand-banner{height:81px}.brand-horse{width:53px;height:54px}.brand-lockup strong{font-size:16px}.brand-lockup small{letter-spacing:.12em;font-size:6.5px}.banner-tagline{display:none}.top-nav{gap:0}.top-nav button{padding:0 10px}.control-panel{padding-top:9px}.field select{min-height:41px;height:41px;font-size:12px}.ticket-group-heading h2{font-size:17px}.ticket-group-heading p{font-size:9px;line-height:1.4}.ticket-overview-group .ticket-overview{grid-template-columns:repeat(2,minmax(0,1fr))}.ticket-card,.ticket-card.focus,.ticket-card.reference-only{min-height:140px;padding:9px}.ticket-label{font-size:13px}.tile-pick{min-height:41px}.tile-horse-num{width:32px;height:32px;font-size:21px}.tile-horse-name{font-size:11px}.tile-pair{font-size:23px}.tile-footer strong{font-size:20px}.ticket-stage{font-size:9px}.ticket-group-heading{flex-direction:column;align-items:flex-start;gap:1px}.pick-card{display:grid;grid-template-columns:1fr 1.1fr;grid-template-rows:auto auto auto auto;gap:8px;padding:11px}.pick-topline{grid-column:1;grid-row:1}.race-context{grid-column:2;grid-row:1;text-align:right;font-size:9px}.pair-view{grid-column:1;grid-row:2;font-size:29px}.pair-names{grid-column:1;grid-row:3;font-size:10px}.key-metrics{grid-column:2;grid-row:2 / 4;grid-template-columns:1fr;gap:4px}.metric{flex-direction:row;justify-content:space-between;border-right:0;border-bottom:1px solid #12554b}.metric span{font-size:9px;text-align:left}.metric strong{font-size:16px}.pick-actions{grid-column:1/-1;grid-row:4;flex-direction:row}.pick-actions button{width:50%;min-height:36px}.edge-block-heading h2{font-size:17px}.edge-block-heading button{font-size:10px}.edge-roster th,.edge-roster td{padding:6px 7px}.edge-roster{font-size:11px}.real50-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.real50-header h2{font-size:16px}}
