/* Tire Shop Simulator Tycoon - the Precision Work View (work/engine.js): a full-screen close-up stage with a step rail,
   a prompt, live readouts and big touch controls. */
.wv { position: absolute; inset: 0; z-index: 40; background: #10151b; overflow: hidden; touch-action: none; }
.wv-cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.wv-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 8px 16px; border-radius: 10px; border: 1px solid var(--line); background: rgba(36,43,52,.92); color: var(--text); font-family: var(--hd); font-weight: 700; font-size: 16px; letter-spacing: .04em; text-transform: uppercase; }
.wv-btn:active { transform: scale(.97); } .wv-btn.go { background: linear-gradient(var(--go), var(--go2)); border-color: #167544; color: #fff; } .wv-btn.big { min-height: 60px; padding: 12px 34px; font-size: 22px; }
.wv-top { position: absolute; left: calc(12px + var(--safe-l)); right: calc(12px + var(--safe-r)); top: calc(10px + var(--safe-t)); display: flex; align-items: center; gap: 10px; pointer-events: none; }
.wv-top > * { pointer-events: auto; }
.wv-title { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.05; padding: 8px 16px; border-radius: 12px; background: linear-gradient(90deg, rgba(16,21,27,.92), rgba(16,21,27,.55) 70%, transparent); border-left: 4px solid var(--acc); pointer-events: none; }
.wv-title b { font-family: var(--hd); font-size: 26px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wv-title span { color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wv-grade { font-family: var(--hd); font-weight: 800; font-size: 26px; min-width: 52px; height: 44px; display: grid; place-items: center; border-radius: 10px; background: rgba(36,43,52,.92); border: 1px solid var(--line); }
.wv-grade:empty { display: none; }
[data-g="A"] { color: var(--a-plus); } [data-g="B"] { color: var(--b); } [data-g="C"] { color: var(--c); } [data-g="D"] { color: var(--d); } [data-g="F"] { color: var(--f); }
.wv-exit { width: 44px; padding: 0; font-size: 18px; }
/* step rail down the left */
.wv-steps { position: absolute; left: calc(12px + var(--safe-l)); top: 76px; bottom: 150px; width: 210px; margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; overflow: hidden; pointer-events: none; counter-reset: st; mask-image: linear-gradient(#000 80%, transparent); }
.wv-steps li { counter-increment: st; display: flex; align-items: center; gap: 8px; padding: 5px 10px; border-radius: 8px; font-size: 13.5px; color: var(--dim); background: rgba(16,21,27,.55); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: none; }
.wv-steps li::before { content: counter(st); flex: none; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: var(--raise); font-family: var(--mono); font-size: 11px; color: var(--muted); }
.wv-steps li.done { color: #7fbf9a; } .wv-steps li.done::before { content: '✓'; background: #14472c; color: #9be7bd; }
.wv-steps li.now { color: #fff; background: rgba(255,107,26,.22); box-shadow: inset 3px 0 0 var(--acc); font-weight: 600; } .wv-steps li.now::before { background: var(--acc); color: #fff; }
/* prompt and controls along the bottom */
.wv-prompt { position: absolute; left: 50%; bottom: calc(14px + var(--safe-b)); transform: translateX(-50%); width: min(720px, calc(100% - 32px)); text-align: center; padding: 8px 18px 10px; border-radius: 14px; background: rgba(16,21,27,.86); border: 1px solid var(--line); pointer-events: none; }
.wv-prompt b { display: block; font-family: var(--hd); font-size: 11px; letter-spacing: .22em; color: var(--acc); min-height: 2px; }
.wv-prompt span { display: block; font-family: var(--hd); font-size: 24px; font-weight: 700; letter-spacing: .02em; }
.wv-prompt small { display: block; color: var(--muted); font-size: 13.5px; min-height: 2px; }
.wv-hud { position: absolute; left: 50%; bottom: calc(104px + var(--safe-b)); transform: translateX(-50%); width: min(760px, calc(100% - 32px)); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.wv-w { pointer-events: auto; background: rgba(27,32,39,.95); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; box-shadow: 0 14px 40px rgba(0,0,0,.5); display: flex; align-items: center; gap: 14px; max-width: 100%; }
.wv-w label { font-family: var(--hd); font-weight: 700; font-size: 15px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.wv-w small { color: var(--muted); font-size: 12.5px; }
.wv-meter { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; min-width: min(420px, 60vw); flex: 1; }
.wv-bar { position: relative; height: 22px; border-radius: 11px; background: #0d1116; border: 1px solid var(--line); overflow: hidden; }
.wv-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(90deg, #3d7fd0, var(--info)); border-radius: 11px; }
.wv-bar u { position: absolute; top: 0; bottom: 0; background: rgba(47,191,113,.28); border-left: 2px solid var(--go); border-right: 2px solid var(--go); }
.wv-w.in .wv-bar i { background: linear-gradient(90deg, var(--go2), var(--go)); } .wv-w.over .wv-bar i { background: linear-gradient(90deg, #c4353a, var(--bad)); }
.wv-meter output, .wv-dial output { font-family: var(--mono); font-size: 20px; font-weight: 500; min-width: 92px; text-align: right; }
.wv-press { background: linear-gradient(var(--acc), var(--acc2)); border-color: #a83f06; color: #fff; touch-action: none; } .wv-press.down { filter: brightness(1.25); transform: scale(.96); }
.wv-drag { flex-wrap: wrap; justify-content: center; } .wv-drag small { flex-basis: 100%; text-align: center; }
.wv-dial { flex-direction: column; gap: 8px; min-width: min(440px, 80vw); } .wv-dial .wv-row { display: flex; align-items: center; gap: 10px; width: 100%; } .wv-dial input[type=range] { flex: 1; height: 34px; accent-color: var(--acc); }
.wv-dial output { text-align: center; font-size: 26px; } .wv-dial em { font-style: normal; color: var(--muted); font-size: 13.5px; min-height: 2px; } .wv-dial .wv-row .wv-btn { width: 52px; font-size: 24px; padding: 0; }
.wv-choose { flex-direction: column; gap: 10px; width: 100%; }
.wv-opts { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 8px; width: 100%; }
.wv-opt { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 8px; min-height: 64px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel2); text-align: center; }
.wv-opt:hover { border-color: var(--acc); } .wv-opt i { font-style: normal; font-size: 24px; } .wv-opt b { font-family: var(--hd); font-size: 18px; letter-spacing: .02em; } .wv-opt small { font-size: 12px; line-height: 1.25; }
.wv-opt.no { opacity: .35; border-color: var(--bad); text-decoration: line-through; }
.wv-timing { flex-direction: column; gap: 10px; min-width: min(460px, 80vw); }
.wv-track { position: relative; width: 100%; height: 30px; border-radius: 8px; background: #0d1116; border: 1px solid var(--line); overflow: hidden; }
.wv-track u { position: absolute; top: 0; bottom: 0; background: rgba(246,194,28,.28); } .wv-track s { position: absolute; top: 0; bottom: 0; background: rgba(47,191,113,.5); }
.wv-track i { position: absolute; top: -2px; bottom: -2px; width: 4px; margin-left: -2px; background: #fff; box-shadow: 0 0 10px #fff; }
.wv-confirm { flex-direction: column; text-align: center; max-width: 560px; } .wv-confirm p { margin: 0; font-size: 16px; line-height: 1.4; }
.wv-panel { flex-direction: column; align-items: stretch; }
/* readouts on the right */
.wv-side { position: absolute; right: calc(12px + var(--safe-r)); top: 76px; width: 230px; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.wv-read { background: rgba(16,21,27,.88); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.wv-read h4 { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--acc); margin-bottom: 6px; }
.wv-read div { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; padding: 2px 0; } .wv-read span { color: var(--muted); } .wv-read b { font-family: var(--mono); font-weight: 500; }
.wv-read .good b { color: var(--go); } .wv-read .bad b { color: var(--bad); } .wv-read .warn b { color: var(--warn); } .wv-read .big b { font-size: 22px; }
/* hotspot markers */
.wv-marks { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.wv-mark { position: absolute; left: 0; top: 0; width: 0; height: 0; }
.wv-mark::before { content: ''; position: absolute; left: -22px; top: -22px; width: 44px; height: 44px; border-radius: 50%; border: 3px solid var(--acc); box-shadow: 0 0 14px rgba(255,107,26,.8), inset 0 0 10px rgba(255,107,26,.5); animation: wvPulse 1.1s ease-in-out infinite; }
.wv-mark.go::before { border-color: var(--go); box-shadow: 0 0 14px rgba(47,191,113,.8); }
.wv-mark i { position: absolute; left: 28px; top: -12px; font-style: normal; font-family: var(--hd); font-weight: 700; font-size: 14px; white-space: nowrap; padding: 2px 8px; border-radius: 6px; background: rgba(16,21,27,.9); border: 1px solid var(--acc); }
@keyframes wvPulse { 0%, 100% { transform: scale(.82); opacity: 1; } 50% { transform: scale(1.18); opacity: .55; } }
.wv-say { position: absolute; left: 50%; top: 84px; transform: translateX(-50%); max-width: min(560px, 80%); padding: 8px 18px; border-radius: 99px; background: rgba(16,21,27,.9); border: 1px solid var(--line); font-style: italic; color: #d9e2ea; pointer-events: none; }
.wv-toast { position: absolute; left: 50%; top: 132px; transform: translateX(-50%); padding: 8px 18px; border-radius: 10px; background: rgba(27,32,39,.96); border: 1px solid var(--line); font-family: var(--hd); font-weight: 700; font-size: 18px; pointer-events: none; }
.wv-toast.bad { border-color: var(--bad); color: #ffb3b5; } .wv-toast.good { border-color: var(--go); color: #9be7bd; }
.wv-spec, .wv-done { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(8,11,15,.72); backdrop-filter: blur(3px); z-index: 3; }
.wv-card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px 22px; max-width: min(560px, calc(100% - 32px)); max-height: calc(100% - 32px); overflow: auto; text-align: center; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.wv-card h3 { font-size: 20px; text-transform: uppercase; color: var(--acc); margin-bottom: 8px; }
.wv-card table { border-collapse: collapse; width: 100%; text-align: left; font-size: 14.5px; } .wv-card th { color: var(--muted); font-weight: 500; padding: 3px 14px 3px 0; white-space: nowrap; } .wv-card td { font-family: var(--mono); padding: 3px 0; }
.wv-card small { color: var(--muted); } .wv-card ul { text-align: left; padding-left: 20px; margin: 8px 0 14px; } .wv-card li.s3 { color: #ffb3b5; } .wv-card li.s2 { color: #ffd9a0; } .wv-card p { margin: 6px 0 12px; } .wv-card p.ok { color: #9be7bd; }
.wv-big { font-family: var(--hd); font-weight: 800; font-size: 92px; line-height: 1; }
@media (max-height: 520px) {
  .wv-steps { top: 62px; width: 170px; bottom: 96px; } .wv-steps li { font-size: 12px; padding: 3px 8px; }
  .wv-title b { font-size: 20px; } .wv-side { top: 62px; width: 190px; } .wv-read div { font-size: 12.5px; }
  .wv-prompt { padding: 4px 14px 6px; bottom: calc(6px + var(--safe-b)); } .wv-prompt span { font-size: 19px; } .wv-prompt small { font-size: 12px; }
  .wv-hud { bottom: calc(70px + var(--safe-b)); } .wv-w { padding: 8px 12px; } .wv-btn.big { min-height: 48px; font-size: 19px; padding: 8px 24px; } .wv-opt { min-height: 50px; padding: 6px; } .wv-opt b { font-size: 16px; }
}
@media (max-width: 700px) { .wv-steps { display: none; } .wv-side { width: 170px; } }
