.cvr-lap-studio { --studio-dark: #fcf7ed; --studio-soft: #d6b7b0; }
.cvr-studio-header { display:flex; flex-wrap:wrap; align-items:flex-end; justify-content:space-between; gap:12px 24px; margin-block:0 20px; }
.cvr-studio-header h2 { margin:0; font-family:var(--race-serif); font-size:clamp(34px,6vw,64px); letter-spacing:-.05em; }
.cvr-studio-header p { color:var(--race-muted); margin:5px 0 0; }
.cvr-studio-header p:empty { display:none; }
.cvr-studio-header > a { color:var(--race-red); padding-block:8px; font-size:.9rem; font-weight:700; }
.cvr-studio-controls { display:grid; grid-template-columns:1.2fr 1fr 1fr 1fr; gap:12px; background:#f0e7d8; border:1px solid var(--race-line); border-radius:12px; padding:16px; }
.cvr-studio-controls label { display:grid; grid-template-columns:auto 1fr; align-content:start; gap:3px 8px; min-width:0; color:var(--race-ink); font-size:.86rem; font-weight:700; }
.cvr-studio-controls label span { color:var(--race-muted); font-weight:500; }
.cvr-studio-controls select { grid-column:1/-1; width:100%; min-height:43px; padding:7px 10px; border:1px solid #bdae98; border-radius:6px; background:#fffdf9; color:var(--race-ink); font:inherit; font-weight:600; }
.cvr-studio-controls select:disabled { color:#6d625a; background:#f7f0e5; }
.cvr-studio-meta { display:flex; align-items:center; justify-content:space-between; gap:10px; margin:4px 0; min-height:43px; }
.cvr-studio-meta p { color:var(--race-muted); margin:0; font-size:.84rem; }
.cvr-lap-head { display:grid; grid-template-columns:minmax(0,1.1fr) minmax(0,1fr); align-items:center; gap:18px 26px; padding:24px clamp(18px,4vw,36px); border:1px solid #451617; border-top:3px solid #ba8f43; border-radius:14px; background:radial-gradient(ellipse at 82% 10%,#531919 0%,#301216 58%,#251215 100%); color:var(--studio-dark); box-shadow:0 13px 30px #340a0d14; }
.cvr-lap-head:has(.cvr-lap-reference) { grid-template-columns:minmax(0,1.1fr) minmax(0,1fr) minmax(0,.8fr); }
.cvr-lap-identity span:first-child,.cvr-lap-reference > span { display:block; font-size:.72rem; color:#f2d594; font-weight:700; letter-spacing:.09em; text-transform:uppercase; }
.cvr-lap-identity h3 { margin:6px 0 3px; font-family:var(--race-serif); font-size:clamp(24px,4vw,38px); line-height:1.12; color:inherit; overflow-wrap:anywhere; }
.cvr-lap-identity p,.cvr-lap-reference p { margin:2px 0; color:var(--studio-soft); }
.cvr-lap-identity a { display:inline-block; margin-top:10px; color:#f2d594; font-size:.84rem; }
.cvr-lap-identity a span:first-child { display:inline; }
.cvr-lap-number { text-align:right; min-width:0; }
.cvr-lap-number strong { display:block; color:var(--studio-dark); font-size:clamp(32px,5.8vw,76px); line-height:1.06; letter-spacing:-.07em; font-variant-numeric:tabular-nums; white-space:nowrap; }
.cvr-lap-number small { color:var(--studio-soft); }
.cvr-lap-reference { border-inline-start:1px solid #8e5858; padding-inline-start:24px; min-width:0; overflow-wrap:anywhere; }
.cvr-lap-reference strong { display:block; margin-top:4px; font-size:1.12rem; }
.cvr-lap-reference b { display:inline-block; margin-inline-start:6px; color:#fff1dc; font-variant-numeric:tabular-nums; }
.cvr-lap-reference .is-gain { color:#bcf3c6; }
.cvr-lap-reference .is-loss { color:#ffc1ab; }
.cvr-analysis-grid { display:grid; grid-template-columns:minmax(0,1.6fr) minmax(0,1fr); gap:16px; margin-top:18px; }
.cvr-analysis-grid > :only-child { grid-column:1/-1; }
.cvr-sheet { min-width:0; border:1px solid var(--race-line); border-radius:12px; background:#fffdf8; padding:clamp(16px,2.7vw,26px); }
.cvr-sheet h3 { margin:0; font-size:1.16rem; }
.cvr-sheet p { color:var(--race-muted); margin:4px 0 0; font-size:.87rem; }
.cvr-sheet-head { display:flex; align-items:flex-start; flex-wrap:wrap; justify-content:space-between; gap:8px 18px; }
.cvr-ideal { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:0; padding:5px 9px; border-radius:4px; color:#70421a; background:#f6eddc; font-size:.8rem; }
.cvr-ideal dd { margin:0; font-weight:800; font-variant-numeric:tabular-nums; }
.cvr-chart { margin-top:10px; }
.cvr-chart canvas { display:block; width:100%; height:clamp(155px,26vw,245px); }
.cvr-sheet .cvr-studio-note { margin-top:20px; }
.cvr-sheet details { margin-top:10px; border-top:1px solid var(--race-line); }
.cvr-sheet summary { padding-top:9px; color:var(--race-red); font-weight:700; cursor:pointer; }
.cvr-lap-ledger { list-style:none; margin:9px 0 0; padding:0; }
.cvr-lap-ledger li { display:grid; grid-template-columns:minmax(0,1fr) auto minmax(60px,1fr); align-items:center; gap:8px; padding:6px 2px; border-bottom:1px solid #eee6d8; font-variant-numeric:tabular-nums; }
.cvr-lap-ledger small { color:var(--race-muted); text-align:right; }
.cvr-lap-ledger .cvr-best-row { background:#f7ecd9; color:#72191c; padding-inline:8px; border-radius:4px; }
.cvr-sectors table { width:100%; border-collapse:collapse; font-variant-numeric:tabular-nums; font-size:.84rem; margin-top:12px; }
.cvr-sectors :is(td,th) { padding:9px 4px; text-align:left; border-bottom:1px solid #e8dfd3; }
.cvr-sectors :is(td,th):last-child { text-align:right; }
.cvr-sectors td:nth-child(2) { width:42%; }
.cvr-sector-bar { display:grid; gap:4px; min-width:24px; }
.cvr-sector-bar :is(i,b) { display:block; width:var(--sector-width); height:6px; border-radius:5px; background:#8b0000; }
.cvr-sector-bar b { background:#a27734; }
.cvr-delta { white-space:nowrap; font-weight:700; }
.cvr-delta.is-loss { color:#a1252d; }
.cvr-delta.is-gain { color:#2b654a; }
.cvr-studio-empty { margin:0; padding:30px 20px; border:1px solid var(--race-line); border-radius:12px; background:#fffdf8; text-align:center; }
@media (max-width:900px) {
  .cvr-studio-controls { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .cvr-analysis-grid { grid-template-columns:minmax(0,1fr) minmax(0,.85fr); }
}
@media (max-width:660px) {
  .cvr-studio-controls label:is(:first-child,:last-child) { grid-column:1/-1; }
  .cvr-studio-controls select { white-space:nowrap; text-overflow:ellipsis; }
  .cvr-lap-head:has(.cvr-lap-reference) { grid-template-columns:minmax(0,1.1fr) minmax(0,1fr); }
  .cvr-lap-reference { grid-column:1/-1; border-inline-start:0; border-block-start:1px solid #8e5858; padding:12px 0 0; }
  .cvr-analysis-grid { grid-template-columns:minmax(0,1fr); }
}
@media (max-width:360px) {
  .cvr-studio-controls { grid-template-columns:minmax(0,1fr); }
  .cvr-lap-head,.cvr-lap-head:has(.cvr-lap-reference) { grid-template-columns:minmax(0,1fr); }
  .cvr-lap-number { text-align:left; }
}

.cvr-workshop { margin: 18px 0 0; }
.cvr-lap-actions { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.cvr-workshop > details { border-top: 1px solid var(--race-line, #49505a); padding: 12px 0; }
.cvr-workshop summary { cursor: pointer; font-weight: 650; }
.cvr-calculators { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,220px),1fr)); gap: 18px; padding: 16px 0; }
.cvr-notebook form, .cvr-calculators fieldset { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 10px; min-width: 0; }
.cvr-calculators fieldset { padding: 14px; border: 1px solid var(--race-line,#555); }
.cvr-calculators label, .cvr-notebook label { display: grid; flex: 1 1 90px; min-width: 0; gap: 5px; font-size: .85rem; }
.cvr-calculators input, .cvr-notebook input, .cvr-notebook select { background:var(--race-panel,#202328);color:var(--race-ink,#edf0f3); border:1px solid var(--race-line,#555);padding:8px;min-width:0;width:100%;font:inherit; }
.cvr-calculators output { width:100%;font-variant-numeric:tabular-nums; }
.cvr-workshop .ra { margin-top: 16px; }
.cvr-workshop .ra-work-actions[hidden],.cvr-workshop [hidden] {display:none!important;}
.cvr-lap-studio canvas { --pace-line:#fa787c;--pace-text:#c0c4ca;--pace-grid:#484c54;--pace-best:#e5c785; }
