/* 54.7: compact pre-race preparation, respects light/dark existing UI */
.v60-prep{margin:12px 0 16px;padding:14px;border:1px solid var(--border,#6f7f89);border-radius:12px;background:var(--white,#fff);color:var(--text,#163047)}
.v60-head{display:flex;align-items:center;gap:8px;justify-content:space-between;flex-wrap:wrap}
.v60-head b{font-size:1rem}.v60-head small,.v60-motor-head small,.v60-help{opacity:.8;font-size:.82rem}
.v60-prep p{margin:8px 0;line-height:1.55}
.v60-actions{display:flex;flex-wrap:wrap;gap:8px}.v60-actions button{min-height:43px;flex:1 1 210px}
.v60-state{padding:8px 10px;border-radius:8px;background:rgba(60,140,200,.1);font-size:.9rem}
.v60-state.v60-error{color:#df794f}
.v60-race-label{font-size:.86rem;margin:7px 0}
.v60-races{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:5px}
.v60-race{padding:7px 2px;min-height:38px;border-radius:7px;border:1px solid currentColor;font-size:.78rem;background:transparent;color:inherit}
.v60-race.v60-ready{background:rgba(47,146,100,.13);border-color:#479a6d}
.v60-motor-summary{margin-top:10px}.v60-motor-head{display:flex;flex-wrap:wrap;gap:6px;align-items:baseline;justify-content:space-between;margin-bottom:8px}
.v60-table-wrap{overflow-x:auto}.v60-table-wrap table{border-collapse:collapse;width:100%;font-size:.86rem;white-space:nowrap}
.v60-table-wrap th,.v60-table-wrap td{padding:6px 5px;border-bottom:1px solid rgba(150,150,150,.25);text-align:right}
.v60-table-wrap th:first-child,.v60-table-wrap td:first-child{text-align:left}
.v60-prep[hidden]{display:none!important}
@media(max-width:540px){.v60-prep{padding:10px}.v60-races{grid-template-columns:repeat(4,minmax(0,1fr))}.v60-table-wrap table{font-size:.8rem}}

.v60-error-details{margin:8px 0 12px;padding:8px 10px;border:1px solid currentColor;border-radius:8px;font-size:.87rem;opacity:.95}
.v60-error-details summary{cursor:pointer;font-weight:700}
.v60-error-details ol{margin:8px 0 0;padding-left:1.65rem;line-height:1.7;overflow-wrap:anywhere}
.v60-error-details[hidden]{display:none!important}

/* Ver.54.7.4 — 実績・眼展示を混ぜず、短時間で照合 */
.v60-motor-eval{margin-top:16px;border-top:1px solid rgba(135,156,178,.35);padding-top:13px}
.v60-eval-head{display:flex;gap:8px;align-items:baseline;justify-content:space-between;flex-wrap:wrap;margin-bottom:10px}
.v60-eval-head b{font-size:1.02rem}.v60-eval-head small{font-size:.82rem;opacity:.78}
.v60-eval-highlights{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:7px 0 12px}
.v60-eval-highlights>div{border:1px solid rgba(132,158,180,.35);border-radius:8px;padding:9px 11px;min-width:0;background:rgba(83,135,165,.075)}
.v60-eval-highlights small{display:block;font-size:.79rem;opacity:.85;margin-bottom:4px}
.v60-eval-highlights strong{font-size:.93rem;line-height:1.55;overflow-wrap:anywhere}
.v60-eval-details{border:1px solid rgba(132,158,180,.35);border-radius:8px;overflow:hidden}
.v60-eval-details summary{cursor:pointer;list-style:auto;padding:8px 10px;font-weight:700;font-size:.9rem}
.v60-eval-table{font-size:.83rem!important;white-space:normal!important}
.v60-eval-table th,.v60-eval-table td{text-align:left!important;padding:8px 6px!important;vertical-align:middle}
.v60-eval-table td:first-child{min-width:95px}
.v60-eval-table td small{font-size:.76rem;opacity:.8}
.v60-eval-eye{display:block;margin-top:4px;line-height:1.35}
.v60-eval-caution{font-size:.8rem;line-height:1.7;opacity:.85;margin:11px 1px 3px!important}
@media(max-width:600px){
 .v60-eval-highlights{grid-template-columns:1fr 1fr;gap:5px}
 .v60-eval-highlights>div{padding:8px}
 .v60-eval-highlights strong{font-size:.86rem}
 .v60-eval-table{min-width:0!important;width:100%!important}
 .v60-eval-table thead{display:none}
 .v60-eval-table tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));padding:7px 5px;border-bottom:1px solid rgba(132,158,180,.35)}
 .v60-eval-table td{min-width:0!important;padding:4px 6px!important;border-bottom:none!important;font-size:.83rem}
 .v60-eval-table td:before{content:attr(data-label);display:block;font-size:.7rem;opacity:.75;margin-bottom:2px}
 .v60-eval-table td:last-child{grid-column:1/-1}
}

/* Ver.54.7.5: 練習JSONの復元ボタンを常に見える位置へ */
.v60-restore-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:8px 0 14px;}
.v60-restore-actions button{min-height:43px;font-size:14px;font-weight:800;}
.v60-restore-actions small{font-size:12px;line-height:1.5;opacity:.8;}
@media(max-width:600px){.v60-restore-actions{flex-direction:column;align-items:stretch}.v60-restore-actions button{width:100%}}

/* 54.7.6: Place restoration outside venue-conditional prep panel. */
.v60-restore-actions[hidden]{display:none!important}

/* Ver.54.7.7: restoring practice data must give visible feedback near the button. */
#v60-restore-feedback:not(:empty){display:block;width:100%;padding:9px 12px;border-radius:8px;border:1px solid var(--border,#597180);font-size:13px;font-weight:750;line-height:1.5;}

/* 54.8.1: Show only the correct restore button for the active mode. */
.v60-restore-actions [hidden]{display:none!important}
.v60-restore-actions #v60-restore-feedback{font-weight:700;line-height:1.55;flex-basis:100%}
/* 54.8.1: keep the app name readable beside the theme button on an iPhone. */
@media(max-width:620px){
 body.quick-mode .brand{display:grid;grid-template-columns:34px minmax(0,1fr) auto;gap:4px 9px;align-items:center}
 body.quick-mode .brand .mark{grid-column:1;grid-row:1;width:34px;min-width:34px;height:34px;line-height:34px}
 body.quick-mode .brand>div:nth-child(2){grid-column:2;grid-row:1;min-width:0}
 body.quick-mode .brand .overline{display:block;white-space:nowrap;font-size:7px;letter-spacing:.04em}
 body.quick-mode .brand b{white-space:nowrap;font-size:17px}
 body.quick-mode .brand .version{grid-column:1 / 4;grid-row:2;justify-self:start;margin-left:0;font-size:10px}
 body.quick-mode .brand .theme-toggle{grid-column:3;grid-row:1;white-space:nowrap}
}
