/* SHIN-TECH EDGE Ver0.4.3 — mockup-inspired layout, data calculations preserved. */
:root {--gold:#f7d77b;--aqua:#41ecf2;--aqua2:#0ccea6;}
body {font-family:"BIZ UDPGothic","Yu Gothic UI","Hiragino Kaku Gothic ProN",Meiryo,sans-serif;background:#02111e;color:#edfaff}
.brand-banner {height:112px;background:#01111e}
.brand-horse {width:127px;height:97px}
.brand-lockup strong {font-size:clamp(25px,2.5vw,39px)}
.edge-version {z-index:2;position:absolute;left:min(35%,570px);top:34px;border:1px solid #d5a74f;border-radius:16px;padding:3px 13px;background:rgba(5,20,26,.72);color:#f5d68e;font-weight:850;font-size:15px;white-space:nowrap}
.top-nav {height:58px;align-items:stretch}
.top-nav button {font-size:16px;font-weight:900}
.top-nav button.edge-refresh {margin-left:auto;align-self:center;border:1px solid #e4bc63;color:#ffe49b;background:linear-gradient(120deg,#55421c,#1f322b);border-radius:8px;height:40px;padding:0 15px;box-shadow:inset 0 0 9px #f6df7d50,0 0 13px #c79a423b}
.top-nav button.edge-refresh:disabled{opacity:.62}
.top-nav button.nav-setting {margin-left:0}
.top-nav .edge-refreshed-at {align-self:center;flex-shrink:0;padding:0 9px;color:#bdcdda;font-size:14px}
.control-panel {padding:10px 0 8px}
.field select{font-size:16px}
.edge-race-buttons button {font-size:15px;min-width:40px;height:43px}
.source-strip {font-size:14px}.source-strip .small-link{font-size:15px}
.ticket-overview-group {border-color:#159d9b;padding:11px 12px 13px}
.ticket-group-heading {margin:0 2px 8px}
.ticket-group-heading h2 {font-size:25px}
.ticket-group-heading p {font-size:14px;color:#b9dce3}
/* The recommendation band is the first child beneath the group title. */
.ticket-overview-group .pick-section{margin:0 0 10px}
.ticket-overview-group .pick-section .section-heading {display:none}
.pick-card{display:grid;grid-template-columns:minmax(0,1fr) 320px;grid-template-rows:auto auto auto;gap:5px 14px;min-height:170px;align-items:center;padding:9px 13px;border:1px solid #b99b58;border-radius:10px;background:linear-gradient(100deg,#061d28,#07332c,#071926);box-shadow:inset 0 0 24px #b69e3f22;position:relative}
.pick-topline{grid-column:1;grid-row:1;min-height:25px;display:flex;align-items:center}
.race-context{grid-column:2;grid-row:1;font-size:14px;margin:0;text-align:right;white-space:normal}
.pick-card .kind-chip,.pick-card .status-chip{font-size:14px;padding:3px 8px}
.edge-role-ribbon{grid-column:1/-1;grid-row:2;min-width:0;display:flex;align-items:center;justify-content:center;gap:clamp(9px,1.4vw,24px);padding:7px 12px;min-height:91px;overflow:hidden;position:relative;background:linear-gradient(90deg,#061923,#092e2c 43%,#08262c 68%,#061923);border-top:1px solid #14797e;border-bottom:1px solid #14797e}
.role-horse{width:75px;height:80px;flex:0 0 75px;background:url('edge-horse-logo.png') center/contain no-repeat;opacity:.78;filter:drop-shadow(0 0 7px #bd9855)}
.role-horse.right{transform:scaleX(-1)}
.edge-role-item{display:flex;align-items:center;justify-content:center;gap:10px;min-width:0;flex:1}
.edge-role-type{font-size:21px;font-weight:950;border-radius:7px;padding:5px 11px;border:1px solid #eac361;color:#111f23;background:linear-gradient(150deg,#ffedaa,#d5a63a);white-space:nowrap;box-shadow:0 0 12px #d2b05855}
.edge-role-item.partner .edge-role-type{border-color:#41f6ef;background:linear-gradient(150deg,#a8fff1,#15c4b7);color:#031a21;box-shadow:0 0 10px #1ccacb5b}
.edge-role-number{font-size:31px;font-weight:900;padding:1px 10px;color:#fff;border:1px solid #8195a6;background:#0d2d3d;border-radius:5px;min-width:46px;text-align:center}
.edge-role-name{color:#fff;font-size:clamp(16px,1.75vw,27px);font-weight:950;letter-spacing:.01em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.edge-role-cross{font-family:Georgia,serif;font-size:37px;color:#f2ce77;font-weight:900}
.edge-role-empty{font-size:28px;color:#fae0ad;font-weight:900;text-align:center}
/* Original hidden elements still receive the unchanged recommendation logic. */
.pick-card .pair-view,.pick-card .pair-names{display:none!important}
.key-metrics{grid-column:1;grid-row:3;gap:4px;padding:1px 0;margin:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border:0}
.metric{min-width:0;gap:1px}.metric span{font-size:14px}.metric strong{font-size:22px}
.pick-actions{grid-column:2;grid-row:3;align-self:stretch;display:flex;flex-direction:row;align-items:center;gap:5px}
.pick-actions button{font-size:15px;min-height:40px;padding:5px 8px;width:auto;flex:1}
.ticket-overview-group .ticket-overview{gap:8px}
.ticket-card,.ticket-card.reference-only,.ticket-card.focus{min-height:181px;padding:12px 10px;background:linear-gradient(160deg,#06362c,#041722 75%);border-color:#bca05c}
.ticket-card.reference-only{border-color:#bdab64;background:linear-gradient(160deg,#0c312e,#051925 78%)}
.ticket-card.focus{border:2px solid #f6d16f;background:radial-gradient(circle at 70% 35%,#a7803034,transparent 52%),linear-gradient(155deg,#24452f,#071e26);box-shadow:0 0 13px #e9be52b0,inset 0 0 16px #b18b4045}
.ticket-label{font-size:21px;color:#ffdf88;font-family:Meiryo,'Yu Gothic',sans-serif;font-weight:900}
.ticket-card.reference-only .ticket-label{color:#f8d995}
.ticket-stage{font-size:14px;padding:2px 8px}
.tile-pick{min-height:53px}
.tile-horse-num{font-size:31px;width:51px;height:51px}
.tile-horse-name{font-size:clamp(15px,1.25vw,20px);font-family:Meiryo,'Yu Gothic',sans-serif;font-weight:950;letter-spacing:0}
.tile-pair{font-size:clamp(28px,2.5vw,43px)}
.tile-footer small{font-size:14px}.tile-footer strong,.ticket-card.focus .tile-footer strong{font-size:26px}
.tile-details{font-size:14px;min-height:32px;display:grid;place-items:center}
.edge-next-row{border:1px solid #0e7079;border-radius:8px;margin:11px 0 0;background:#051d2a;padding:7px 12px;display:flex;align-items:center;gap:9px;flex-wrap:wrap;font-size:15px}
.edge-next-row>strong{color:#e6d59d;white-space:nowrap}
#edge-next-list{display:flex;gap:8px;flex:1;min-width:0;flex-wrap:wrap}
.edge-next-pair{display:inline-flex;align-items:center;gap:5px;background:#092b36;padding:3px 8px;border:1px solid #1d6c72;border-radius:5px;font-size:14px}
.edge-next-pair small{font-size:13px;color:#96dbe2}
.edge-next-row button{background:#0b3537;color:#c8fcf5;border:1px solid #2aa9a7;border-radius:6px;padding:6px 9px;font-size:14px;font-weight:800}
.edge-runner-panel{margin-top:11px}
.edge-block-heading h2{font-size:23px}
.edge-block-heading button{font-size:15px}
.edge-roster-wrap{max-height:400px}
.edge-roster,.edge-side-table,.edge-side-ranking{font-size:16px}
.edge-roster th,.edge-side-table thead th,.edge-side-ranking thead th{font-size:15px}
.edge-roster th,.edge-roster td{padding:8px 10px}
.edge-roster td:nth-child(2){font-weight:900;letter-spacing:0;font-size:17px}
.edge-roster tr.selected td:nth-child(2){color:#ffe093}
.edge-roster .num-badge,.edge-side-table .num-badge{width:33px;height:31px;font-size:17px}
.edge-side-heading h2{font-size:21px}
.edge-side-heading h2 span{font-size:14px}
.edge-side-tabs button{font-size:15px;min-height:39px}
.edge-side-intro,.edge-side-disclaimer{font-size:14px}
.edge-side-scroll{max-height:390px}
.edge-side-table td,.edge-side-table thead th,.edge-side-ranking td,.edge-side-ranking thead th{padding:8px 6px}
.edge-side-subhead{font-size:19px}
.edge-side-more{font-size:15px;min-height:42px}
.real50-panel{max-width:none}
.site-footer{font-size:14px}
/* At laptop widths readable cards take priority; below 1370 the right panel goes under the overview. */
@media(max-width:1370px) and (min-width:901px){
  .dashboard-grid{grid-template-columns:1fr}
  .edge-side{display:block}
  .banner-tagline{left:42%}
}
@media(max-width:1140px) and (min-width:901px){
  .brand-banner{height:115px}
  .banner-tagline{display:none}
  .edge-version{left:440px;top:39px}
  .top-nav .edge-refreshed-at{display:none}
  .pick-card{grid-template-columns:minmax(0,1fr) 280px}
  .role-horse{width:47px;flex-basis:47px}
  .edge-role-name{font-size:19px}
}
@media(max-width:900px){
  .brand-banner{height:91px}.edge-version{left:auto;right:9px;top:8px;padding:1px 7px;font-size:12px}
  .top-nav{height:49px}
  .top-nav button.edge-refresh{margin-left:0;flex-shrink:0;font-size:14px;height:38px}
  .top-nav .edge-refreshed-at{display:none}
  .control-fields select{font-size:15px}
  .dashboard-grid{grid-template-columns:1fr}
  .edge-side.open{display:block}
  .pick-card{display:flex;flex-direction:column;align-items:stretch}
  .pick-topline{order:0}.race-context{order:1;text-align:left}
  .edge-role-ribbon{order:2;gap:7px;padding:8px 5px;min-height:86px}
  .role-horse{display:none}
  .edge-role-item{flex-wrap:wrap;gap:4px;align-items:center}
  .edge-role-type{font-size:16px;padding:4px 8px}
  .edge-role-number{font-size:25px;min-width:38px;padding:0 8px}
  .edge-role-name{width:100%;font-size:17px;text-align:center}
  .edge-role-cross{font-size:28px}
  .key-metrics{order:3}.pick-actions{order:4;flex-direction:row}
  .ticket-overview-group .ticket-overview{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ticket-card,.ticket-card.reference-only,.ticket-card.focus{min-height:174px}
  .edge-runner-panel{margin-top:10px}
}
@media(max-width:560px){
  .brand-horse{width:55px;height:58px}.brand-lockup strong{font-size:17px}
  .top-nav button{font-size:13px}
  .ticket-group-heading h2{font-size:19px}
  .ticket-group-heading p{font-size:13px}
  .ticket-card,.ticket-card.reference-only,.ticket-card.focus{padding:9px;min-height:169px}
  .tile-head{flex-wrap:wrap;align-items:center;gap:3px}
  .ticket-label{font-size:17px}
  .ticket-stage{font-size:12px}
  .tile-horse-num{font-size:22px;width:37px;height:37px}
  .tile-horse-name{font-size:14px}
  .tile-pair{font-size:26px}
  .tile-footer small{font-size:12px}
  .tile-footer strong,.ticket-card.focus .tile-footer strong{font-size:21px}
  .tile-details{font-size:13px}
  .edge-next-row{font-size:13px}
  .edge-block-heading h2{font-size:18px}
  .edge-block-heading button{font-size:13px;white-space:normal}
  .edge-roster{font-size:14px}
  .edge-roster th{font-size:13px}
  .edge-roster td:nth-child(2){font-size:14px}
  .edge-role-name{font-size:15px}
  .metric span{font-size:12px}.metric strong{font-size:18px}
  .pick-actions button{font-size:14px}
}
/* Ver0.4.3 final fidelity fixes: compact version badge, untruncated partner and narrow-screen control. */
@media(min-width:1141px){.edge-version{left:min(30vw,495px);top:16px}.edge-role-name{font-size:clamp(18px,1.4vw,23px)}.role-horse{width:50px;flex-basis:50px}}
@media(max-width:1140px) and (min-width:901px){.edge-version{left:clamp(300px,34vw,430px);top:70px}.edge-role-name{font-size:19px}}
@media(max-width:900px){
  .control-panel,.control-fields,.edge-race-buttons,.source-strip{min-width:0;max-width:100%;width:100%}
  .control-fields{grid-template-columns:minmax(0,1.2fr) minmax(0,1fr) minmax(0,.9fr)}
  .control-fields .field{min-width:0}
  .control-fields select{min-width:0;max-width:100%}
  .source-strip #source-indicator{min-width:0;flex:1}
}
@media(max-width:560px){
  .control-fields{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  .control-fields .field-race{grid-column:1/-1}
  .edge-next-row{display:block}
  #edge-next-list{display:flex;margin:7px 0}
  .edge-next-row button{width:100%}
  .edge-role-number{font-size:25px}
  .edge-role-name{font-size:15px}
}
/* Header alignment: the version badge remains distinct from title and slogan. */
@media(min-width:1141px){.edge-version{left:500px;top:26px}.banner-tagline{left:40%}}
@media(min-width:1141px) and (max-width:1370px){.banner-tagline{left:50%;font-size:20px}}

/* Ver0.4.4: fix overlap ONLY — version becomes an inline element alongside the brand subtitle.
   The title, banner, navigation, dashboard and calculation logic remain untouched. */
.brand-lockup .brand-meta {display:flex;align-items:center;gap:12px;margin-top:4px;max-width:100%;white-space:nowrap}
.brand-lockup .brand-meta small {margin-top:0;flex:0 1 auto;min-width:0}
.brand-lockup .brand-meta .edge-version {position:static;left:auto;top:auto;right:auto;bottom:auto;flex:0 0 auto;display:inline-flex;align-items:center;font-size:13px;line-height:1.35;padding:2px 9px;margin:0;border-radius:14px;z-index:auto}
@media(max-width:900px){.brand-lockup .brand-meta {gap:7px}.brand-lockup .brand-meta .edge-version {font-size:11px;padding:1px 7px}}
@media(max-width:560px){.brand-lockup .brand-meta {gap:5px;margin-top:2px}.brand-lockup .brand-meta .edge-version {font-size:10px;padding:1px 5px}.brand-lockup .brand-meta small {letter-spacing:.055em}}
