/* Refined launcher panels. A template opts in with KitStationTemplate.refinements,
   which sets data-ks-refined on #stage; every rule below is scoped to it. */

/* Page guide: each page name is a button. */
#stage[data-ks-refined] .ks-swipe-guide.ks-page-tabs{left:50%;right:auto;bottom:10px;height:auto;transform:translateX(-50%);gap:2px;padding:4px 8px;pointer-events:auto;background:rgba(12,12,13,.74);border:1px solid #ffffff22;border-radius:32px;z-index:6}
#stage[data-ks-refined] .ks-page-tabs>[hidden]{display:none!important}
#stage[data-ks-refined] .ks-page-tab{display:flex;align-items:center;gap:10px;min-height:54px;padding:0 20px;background:none;border:0;border-radius:28px;color:var(--text);opacity:.62;font-family:var(--nav-font);font-style:italic;font-size:24px;line-height:1;white-space:nowrap;cursor:pointer}
#stage[data-ks-refined] .ks-page-tab.active{opacity:1}
#stage[data-ks-refined] .ks-page-tab:focus-visible{outline:3px solid var(--accent);outline-offset:-3px}
#stage[data-ks-refined] .ks-page-tab-dot{display:block;width:8px;height:8px;border-radius:4px;background:#ffffff73;transition:width .25s ease,background-color .25s ease}
#stage[data-ks-refined] .ks-page-tab.active .ks-page-tab-dot{width:28px;background:var(--accent)}

/* Edge chevrons: show that another page exists on that side. */
#stage[data-ks-refined] .ks-edge-button{position:absolute;top:50%;width:36px;height:116px;margin-top:-58px;display:flex;align-items:center;justify-content:center;padding:0;color:var(--text);background:rgba(10,10,11,.6);border:1px solid #ffffff26;z-index:6;cursor:pointer}
#stage[data-ks-refined] .ks-edge-prev{left:0;border-left:0;border-radius:0 20px 20px 0}
#stage[data-ks-refined] .ks-edge-next{right:0;border-right:0;border-radius:20px 0 0 20px}
#stage[data-ks-refined] .ks-edge-button[hidden],#stage[data-ks-refined] .ks-swipe-tip[hidden]{display:none}
#stage[data-ks-refined] .ks-edge-button:focus-visible{outline:3px solid var(--accent);outline-offset:-4px}
#stage[data-ks-refined] .ks-edge-icon,#stage[data-ks-refined] .ks-swipe-tip-icon{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
#stage[data-ks-refined] .ks-swipe-tip-icon{width:24px;height:24px;color:var(--accent)}
#stage[data-ks-refined] .ks-swipe-tip{position:absolute;left:50%;bottom:88px;transform:translateX(-50%);display:flex;align-items:center;gap:12px;padding:12px 22px;color:var(--text);background:rgba(12,12,13,.92);border:1px solid var(--accent);border-radius:32px;font-family:var(--nav-font);font-size:23px;white-space:nowrap;pointer-events:none;z-index:7;animation:ks-tip-in .35s ease both}
@keyframes ks-tip-in{from{opacity:0;transform:translate(-50%,10px)}to{opacity:1;transform:translate(-50%,0)}}

/* Painel digital: redline, readable labels and the engine temperature zones. */
#stage[data-ks-refined] .ks-dial-redline{fill:none;stroke:#e5484d;stroke-width:6;opacity:.92}
#stage[data-ks-refined] .ks-dial-tick.redline{stroke:#ff6b6b;opacity:1}
#stage[data-ks-refined] .ks-dial-digit.redline{fill:#ff6b6b}
#stage[data-ks-refined] .ks-digital-fuel .ks-digital-label,#stage[data-ks-refined] .ks-digital-coolant .ks-digital-label{font-size:24px;opacity:.85}
#stage[data-ks-refined] .ks-digital-coolant .ks-zone-bar{position:relative;overflow:visible;height:12px;border-radius:2px;background:linear-gradient(90deg,#2d4a63 0 46.6%,#4b4740 46.6% 70%,#7a2626 70% 100%)}
#stage[data-ks-refined] .ks-digital-coolant .ks-zone-bar .ks-digital-fill{position:relative;background:transparent;-webkit-mask-image:none;mask-image:none}
#stage[data-ks-refined] .ks-digital-coolant .ks-zone-bar .ks-digital-fill:after{content:"";position:absolute;right:-3px;top:-7px;width:6px;height:26px;border-radius:3px;background:var(--accent);box-shadow:0 0 10px var(--accent)}
#stage[data-ks-refined] .ks-digital-coolant[data-unavailable=true] .ks-zone-bar .ks-digital-fill:after{display:none}
#stage[data-ks-refined] .ks-cluster-zones{display:grid!important;grid-template-columns:46.6fr 23.4fr 30fr;text-align:center;font-size:18px;opacity:.7}
#stage[data-ks-refined] .ks-digital-coolant[data-zone=cold] .ks-cluster-zones span:nth-child(1){opacity:1;color:#7fb2e5}
#stage[data-ks-refined] .ks-digital-coolant[data-zone=normal] .ks-cluster-zones span:nth-child(2){opacity:1;color:#4ade80}
#stage[data-ks-refined] .ks-digital-coolant[data-zone=hot] .ks-cluster-zones span:nth-child(3){opacity:1;color:#ff6b6b}
#stage[data-ks-refined] .ks-trip-label{font-size:21px;opacity:.78}
#stage[data-ks-refined] .ks-trip-value{font-size:32px}
#stage[data-ks-refined] .ks-trip-unit{font-size:18px}
#stage[data-ks-refined] .ks-trip-reset{min-height:60px;padding:10px 22px;font-size:22px;border-color:#ffffff66}

/* Monitoramento: scale endpoints under each bar and a visible state. */
#stage[data-ks-refined] .ks-scale-bar{position:relative;overflow:visible;margin-bottom:24px}
#stage[data-ks-refined] .ks-scale-bar:before,#stage[data-ks-refined] .ks-scale-bar:after{position:absolute;top:calc(100% + 6px);font-size:16px;line-height:1;opacity:.55;white-space:nowrap}
#stage[data-ks-refined] .ks-scale-bar:before{content:attr(data-min);left:0}
#stage[data-ks-refined] .ks-scale-bar:after{content:attr(data-max);right:0}
#stage[data-ks-refined] .ks-monitor-reading[data-compact=true] .ks-scale-bar{margin-bottom:0}
#stage[data-ks-refined] .ks-monitor-reading[data-level=warn]{box-shadow:inset 0 0 0 2px #facc15}
#stage[data-ks-refined] .ks-monitor-reading[data-level=alert]{box-shadow:inset 0 0 0 2px #ef4444}
#stage[data-ks-refined] .ks-monitor-reading[data-level=warn] .ks-monitor-fill{background:#facc15}
#stage[data-ks-refined] .ks-monitor-reading[data-level=alert] .ks-monitor-fill{background:#ef4444}
#stage[data-ks-refined] .ks-monitor-reading[data-level=warn] .ks-monitor-caption{color:#facc15;opacity:1}
#stage[data-ks-refined] .ks-monitor-reading[data-level=alert] .ks-monitor-caption{color:#ff6b6b;opacity:1}

/* Pneus: data first, chassis in the background, explicit OK state. */
#stage[data-ks-refined] .ks-chassis-image{opacity:.62}
#stage[data-ks-refined] .ks-chassis-direction{font-size:21px;opacity:.85;letter-spacing:.08em}
#stage[data-ks-refined] .ks-wheel-probe-label{opacity:.88}
#stage[data-ks-refined] .ks-wheel-probe-alarm{padding:3px 9px;border:1px solid currentColor;border-radius:12px;font-size:calc(14px * var(--probe-scale))}
#stage[data-ks-refined] .ks-wheel-probe-alarm:empty{display:none}
#stage[data-ks-refined] .ks-wheel-probe[data-state=ok] .ks-wheel-probe-alarm{color:#4ade80}
#stage[data-ks-refined] .ks-wheel-probe[data-state=ok]:before{background:#4ade80}
#stage[data-ks-refined] .ks-tire-settings>summary{list-style:none;display:flex;align-items:center;gap:10px;min-height:58px;padding:10px 20px;border-color:#ffffff73}
#stage[data-ks-refined] .ks-tire-settings>summary::-webkit-details-marker{display:none}
#stage[data-ks-refined] .ks-tire-settings>summary:before{content:"";flex:none;width:22px;height:22px;background:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='3.2'/%3E%3Cpath d='M12 2.5v3M12 18.5v3M2.5 12h3M18.5 12h3M5.3 5.3l2.1 2.1M16.6 16.6l2.1 2.1M5.3 18.7l2.1-2.1M16.6 7.4l2.1-2.1'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='3.2'/%3E%3Cpath d='M12 2.5v3M12 18.5v3M2.5 12h3M18.5 12h3M5.3 5.3l2.1 2.1M16.6 16.6l2.1 2.1M5.3 18.7l2.1-2.1M16.6 7.4l2.1-2.1'/%3E%3C/svg%3E") center/contain no-repeat}

/* Mini-player on the home page (templates that include #media-card). */
.ks-media-card{display:flex;align-items:center;gap:18px;box-sizing:border-box;min-height:118px;padding:16px 18px;color:var(--text);background:rgba(16,16,18,.84);border:1px solid #ffffff1c;border-bottom:3px solid var(--accent);border-radius:8px;font-family:var(--nav-font)}
.ks-media-card[hidden]{display:none}
.ks-media-art{position:relative;flex:none;width:86px;height:86px;border-radius:6px;overflow:hidden;background:#26272a;display:flex;align-items:center;justify-content:center}
.ks-media-art img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.ks-media-art img[hidden]{display:none}
.ks-media-art[hidden]{display:none}
.ks-media-art svg{width:38px;height:38px;fill:none;stroke:#ffffff80;stroke-width:1.8}
.ks-media-info{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}
.ks-media-title{font-family:var(--clock-font);font-style:italic;font-size:28px;line-height:1.15;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ks-media-subtitle{font-size:20px;line-height:1.2;opacity:.7;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ks-media-progress{height:4px;margin-top:8px;background:#ffffff26;border-radius:2px;overflow:hidden}
.ks-media-progress>div{height:100%;width:0;background:var(--accent)}
.ks-media-progress[hidden]{display:none}
.ks-media-controls{flex:none;display:flex;align-items:center;gap:6px}
.ks-media-controls[hidden],.ks-media-action[hidden]{display:none}
.ks-media-button{width:64px;height:64px;display:flex;align-items:center;justify-content:center;padding:0;border-radius:50%;color:var(--text);background:transparent;cursor:pointer}
.ks-media-button svg{width:30px;height:30px;fill:currentColor;stroke:none}
.ks-media-button.primary{width:74px;height:74px;color:#141414;background:var(--accent)}
.ks-media-button:disabled{opacity:.35}
.ks-media-button:focus-visible,.ks-media-action:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
.ks-media-action{flex:none;min-height:60px;padding:10px 22px;color:var(--text);background:#ffffff0d;border:1px solid #ffffff66;border-radius:6px;font-family:var(--nav-font);font-size:22px;white-space:nowrap;cursor:pointer}
.ks-media-card[data-mode=permission] .ks-media-action{color:#141414;background:var(--accent);border-color:var(--accent)}
