/* Engine Sound Pro (pro.js): the PRO tags, the Pro sheet with its QR code,
   and Settings → Pro. Nothing here shows without ?pro (html.pro-on). */

:root { --pro-1: #ffcf7a; --pro-2: #ff7a2f; --pro-ink: #241102; }

/* The tag: a small gold-to-orange plate, as a badge on a car's boot. */
.pro-tag { display: none; align-items: center; height: 18px; padding: 0 6px; margin-left: 8px; vertical-align: 2px; border-radius: 4px;
           font: 700 10px/1 var(--ui); letter-spacing: 0.12em; color: var(--pro-ink); white-space: nowrap;
           background: linear-gradient(135deg, var(--pro-1), var(--pro-2)); box-shadow: 0 0 12px rgba(255,122,47,0.25); }
.pro-on .pro-locked .pro-tag, .pro-on .pro-free-week .pro-tag, .pro-on .menu-page[data-page=pro] .pro-tag { display: inline-flex; }
.pro-tag.pro-week { color: #04210f; background: linear-gradient(135deg, #8dffc0, #2fe07a); box-shadow: 0 0 12px rgba(47,224,122,0.3); letter-spacing: 0.08em; }
.pro-on .sheet-car.pro-locked .sheet-pic img { opacity: 0.5; filter: saturate(0.6); }
.pro-on .dial-card.pro-locked:not(.sheet-car) { position: relative; }
.pro-on .dial-card.pro-locked:not(.sheet-car) > .pro-tag { position: absolute; top: 10px; right: 10px; margin: 0; }
.pro-on .dial-card.pro-locked:not(.sheet-car) .gauge { opacity: 0.55; }
/* (Inside the 0–100 button, after its words: it goes where the button goes.) */
.pro-on #launch-button.pro-locked > .pro-tag { margin: 0 0 0 4px; height: 15px; padding: 0 5px; font-size: 8.5px; vertical-align: 0; }

/* ---- The sheet. ---- */
.pro-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,0.68); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
                opacity: 0; visibility: hidden; transition: opacity 0.25s ease, visibility 0s 0.25s; }
.pro-backdrop.open { opacity: 1; visibility: visible; transition: opacity 0.25s ease; }
.pro-sheet { position: fixed; left: 50%; top: 50%; z-index: 61; width: min(860px, 100vw - 24px); max-height: calc(100vh - 24px); box-sizing: border-box;
             display: grid; grid-template-columns: 1.35fr 1fr; overflow: hidden auto; border-radius: 18px; color: #e8e9eb; font: 400 14px/1.4 var(--ui);
             background: #141518; border: 1px solid rgba(255,255,255,0.08); box-shadow: 0 40px 120px rgba(0,0,0,0.75);
             opacity: 0; visibility: hidden; transform: translate(-50%, -47%) scale(0.98);
             transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s 0.2s; }
.pro-sheet.open { opacity: 1; visibility: visible; transform: translate(-50%, -50%); transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.2, 0.9, 0.3, 1); }
.pro-sheet button { font: inherit; color: inherit; background: none; border: none; padding: 0; box-shadow: none; cursor: pointer; touch-action: manipulation; }
.pro-sheet button:active { transform: none; }
.pro-x { position: absolute; top: 16px; right: 16px; z-index: 3; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; }
.pro-sheet .pro-x { border-radius: 50%; background: #26272b; }
.pro-x svg { width: 16px; height: 16px; fill: none; stroke: #c9ccd1; stroke-width: 2.2; stroke-linecap: round; }

.pro-left { position: relative; padding: 22px 28px 24px; min-width: 0;
            background: radial-gradient(90% 70% at 50% 0%, rgba(255,106,0,0.14), transparent 70%); }
/* The cars: one on its stand (its glow and red rim, as on the page), two behind it. */
.pro-hero { position: relative; height: 112px; margin: 0 0 12px; }
.pro-hero::before { content: ''; position: absolute; left: 22%; right: 22%; bottom: 0; height: 18px; border-radius: 50%;
                    background: radial-gradient(closest-side, rgba(255,90,31,0.45), rgba(255,90,31,0.08) 70%, transparent);
                    box-shadow: 0 2px 0 -1px rgba(255,60,40,0.55); }
.pro-hero img { position: absolute; bottom: 6px; object-fit: contain; filter: drop-shadow(0 10px 8px rgba(0,0,0,0.75)); }
.pro-hero img.main { z-index: 2; left: 50%; height: 96%; max-width: 58%; transform: translateX(-50%); }
.pro-hero img.left, .pro-hero img.right { z-index: 1; bottom: 16px; height: 66%; max-width: 40%; filter: brightness(0.55) saturate(0.85) drop-shadow(0 8px 6px rgba(0,0,0,0.7)); }
.pro-hero img.left { left: 3%; transform: scaleX(-1); }
.pro-hero img.right { right: 3%; }
.pro-hero.one img.main { height: 100%; max-width: 74%; }
.pro-eyebrow { margin: 0 0 4px; font: 600 11px/1 var(--ui); letter-spacing: 0.18em; text-transform: uppercase;
               background: linear-gradient(90deg, var(--pro-1), var(--pro-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pro-left h2 { margin: 0 0 12px; font: 500 24px/1.15 var(--ui); letter-spacing: -0.01em; color: #fff; }
.pro-list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; }
.pro-list li { display: flex; align-items: center; gap: 8px; color: #d3d5da; font-size: 13.5px; }
.pro-list svg, .pro-done-ring svg { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--pro-2); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

.pro-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pro-sheet .pro-plans button { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 10px 14px 9px; text-align: left;
                               border-radius: 12px; background: #1d1e22; border: 1.5px solid #2b2d32; transition: border-color 0.2s, background 0.2s; }
.pro-sheet .pro-plans button:hover { background: #222327; }
.pro-sheet .pro-plans button[aria-checked=true] { border-color: var(--pro-2); background: rgba(255,122,47,0.08); box-shadow: 0 0 0 3px rgba(255,122,47,0.1); }
.pro-plans b { font: 500 12.5px/1.2 var(--ui); color: #b9bcc3; }
.pro-price { font: italic 600 25px/1.1 var(--race); color: #fff; letter-spacing: 0.01em; }
.pro-plans small { font-size: 12px; line-height: 1.3; color: #858a93; }
.pro-price s { margin-left: 6px; font: italic 600 15px/1 var(--race); color: #6f747d; text-decoration-thickness: 1.5px; }
/* A free try of the tapped engine. */
.pro-sheet .pro-try { display: flex; align-items: center; justify-content: center; width: 100%; height: 38px; margin-top: 10px; border-radius: 10px;
                      font: 500 13.5px/1 var(--ui); color: #d7d9dd; background: #1d1e22; border: 1.5px solid #2b2d32; }
.pro-sheet .pro-try::before { content: ''; width: 0; height: 0; margin-right: 10px; border-style: solid; border-width: 5px 0 5px 9px; border-color: transparent transparent transparent var(--pro-2); }
.pro-sheet .pro-try:hover { background: #222327; }
.pro-sheet .pro-try:disabled { color: #6f747d; cursor: default; }
.pro-sheet .pro-try:disabled::before { display: none; }
.pro-sheet .pro-try[hidden] { display: none; }
.pro-best { position: absolute; top: -9px; right: 10px; padding: 3px 7px; border-radius: 5px; font: 700 9.5px/1 var(--ui); font-style: normal; letter-spacing: 0.08em;
            text-transform: uppercase; color: var(--pro-ink); background: linear-gradient(135deg, var(--pro-1), var(--pro-2)); }
.manage .pro-plans, .manage .pro-list, .manage .pro-have { display: none; }

.pro-right { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px 24px 22px;
             background: #1a1b1f; border-left: 1px solid rgba(255,255,255,0.06); min-width: 0; }
.pro-qr { padding: 7px; border-radius: 18px; background: linear-gradient(135deg, rgba(255,207,122,0.6), rgba(255,122,47,0.6)); box-shadow: 0 14px 40px rgba(255,106,0,0.16); }
.pro-qr-box { width: 156px; height: 156px; padding: 9px; box-sizing: border-box; border-radius: 12px; background: #fff; }
.pro-qr-box svg { display: block; width: 100%; height: 100%; }
.pro-qr-box path { fill: #0b0c10; }
.pro-qr-box.loading { background: linear-gradient(100deg, #eceef1 30%, #fff 50%, #eceef1 70%) 0 0 / 300% 100%; animation: pro-shine 1.2s linear infinite; }
@keyframes pro-shine { to { background-position: -150% 0; } }
.pro-scan { margin: 16px 0 3px; font: 500 16px/1.25 var(--ui); color: #fff; }
.pro-scan-note { margin: 0 0 6px; font-size: 12.5px; color: #8e939b; }
.pro-wait { display: inline-flex; align-items: center; gap: 8px; margin: 8px 0 12px; padding: 6px 12px; border-radius: 999px; font-size: 12.5px; color: #b9bcc3; background: #232428; }
.pro-wait i { width: 7px; height: 7px; border-radius: 50%; background: #7d828b; animation: pro-pulse 1.4s ease-in-out infinite; }
.pro-wait.live { color: #d9fbe6; background: rgba(47,224,122,0.12); }
.pro-wait.live i { background: #2fe07a; box-shadow: 0 0 10px #2fe07a; }
.pro-wait.error { color: #ffc2c2; background: rgba(255,60,60,0.12); }
.pro-wait.error i { background: #ff4d4d; animation: none; }
@keyframes pro-pulse { 50% { opacity: 0.3; } }
.pro-test { display: inline-block; padding: 3px 8px; border-radius: 5px; font: 600 10px/1.2 var(--ui); letter-spacing: 0.04em; color: #ffc35a;
            background: rgba(255,170,40,0.08); border: 1px solid rgba(255,170,40,0.3); }
.pro-here { display: none; }
.pro-here-too { margin: 0; font-size: 12.5px; color: #c9ccd2; text-decoration: underline; text-decoration-color: rgba(255,255,255,0.25); text-underline-offset: 3px; }
.pro-here-too:hover { color: #fff; }

/* Paid. */
.pro-done { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
            background: radial-gradient(60% 60% at 50% 40%, rgba(255,122,47,0.18), transparent 70%), #141518; opacity: 0; visibility: hidden; transition: opacity 0.4s ease, visibility 0s 0.4s; }
.pro-sheet.done .pro-done { opacity: 1; visibility: visible; transition: opacity 0.4s ease; }
.pro-done-ring { width: 84px; height: 84px; margin-bottom: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
                 background: linear-gradient(135deg, var(--pro-1), var(--pro-2)); box-shadow: 0 0 60px rgba(255,122,47,0.45); transform: scale(0.6); }
.pro-done-ring svg { width: 48px; height: 48px; stroke: var(--pro-ink); stroke-width: 2.6; stroke-dasharray: 24; stroke-dashoffset: 24; }
.pro-sheet.done .pro-done-ring { animation: pro-pop 0.6s cubic-bezier(0.2, 1.4, 0.4, 1) forwards; }
.pro-sheet.done .pro-done-ring svg { animation: pro-tick 0.45s 0.3s ease-out forwards; }
@keyframes pro-pop { to { transform: scale(1); } }
@keyframes pro-tick { to { stroke-dashoffset: 0; } }
.pro-done h2 { margin: 0 0 6px; font: 500 28px/1.15 var(--ui); color: #fff; }
.pro-done p { margin: 0; font-size: 16px; color: #a3a7ae; }

/* A narrow screen (a phone: no second phone to scan with): a button instead of the code. */
@media (max-width: 760px) {
  .pro-sheet { grid-template-columns: 1fr; }
  .pro-left { padding: 26px 22px 22px; }
  .pro-left h2 { font-size: 26px; }
  .pro-hero { height: 96px; }
  .pro-right { padding: 6px 22px 26px; border-left: none; background: none; }
  .pro-qr, .pro-scan, .pro-scan-note, .pro-have, .pro-here-too { display: none; }
  .pro-here { display: flex; align-items: center; justify-content: center; width: 100%; height: 52px; margin: 0 0 14px; border-radius: 12px; text-decoration: none;
              font: 600 16px/1 var(--ui); color: #fff; background: linear-gradient(135deg, #ff7a2f, #e53935); }
}

/* ---- Settings → Pro. ---- */
.menu[data-tab=pro] [data-page=pro] { display: block; }
.pro-card { position: relative; margin-bottom: 18px; padding: 20px 22px; border-radius: 14px; overflow: hidden;
            background: radial-gradient(80% 120% at 100% 0%, rgba(255,122,47,0.16), transparent 70%), #26272b; border: 1px solid rgba(255,255,255,0.06); }
.pro-card-head { display: flex; align-items: center; gap: 12px; }
.pro-card-head .pro-tag-big { margin: 0; height: 22px; padding: 0 8px; font-size: 11px; }
.pro-card-plan { font: 500 22px/1.2 var(--ui); color: #fff; }
.pro-card-note { margin: 6px 0 0; font-size: 14px; color: #9a9ea6; }
.menu .pro-cta { display: block; width: 100%; height: 50px; margin-top: 18px; border-radius: 10px; font: 600 16px/1 var(--ui); color: #fff;
                 background: linear-gradient(135deg, #ff7a2f, #e53935); box-shadow: 0 8px 24px rgba(229,57,53,0.3); }
.menu .pro-cta:hover { filter: brightness(1.08); }
.menu-page[data-page=pro][data-state=free] .pro-tag-big, .menu-page[data-page=pro]:not([data-state=pro]) .pro-invite,
.menu-page[data-page=pro]:not([data-state=pro]) .pro-manage, .menu-page[data-page=pro]:not([data-state=pro]) .pro-forget,
.menu-page[data-page=pro][data-state=pro] .pro-cta { display: none; }
/* The invite: a code to give a friend. */
.pro-invite { margin-bottom: 18px; padding: 18px 22px; border-radius: 14px; background: #222327; border: 1px dashed rgba(255,207,122,0.35); }
.pro-invite-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: #e8e9eb; font-weight: 500; }
.pro-invite-code { font: 600 22px/1 ui-monospace, 'SF Mono', Menlo, monospace; letter-spacing: 0.14em;
                   background: linear-gradient(90deg, var(--pro-1), var(--pro-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pro-invite-note { margin: 8px 0 4px; font-size: 14px; color: #c9ccd2; }
.pro-invite-how { margin: 0; font-size: 12.5px; color: #7d8086; }
.menu .pro-forget { margin-top: 10px; color: #ff9a9a; }
.pro-facts { margin-bottom: 18px; }
.pro-f-id, .pro-f-key span + span { font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }

/* ---- The passenger remote (remote-car.js): a button by the menu, and its QR sheet. ---- */
.remote-button { position: fixed; top: var(--bar-top, 12px); right: 62px; z-index: 20; width: var(--bar-h, 36px); height: var(--bar-h, 36px); padding: 0;
                 display: flex; align-items: center; justify-content: center; border-radius: 50%; cursor: pointer;
                 background: rgba(18,20,24,0.6); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
                 border: 1px solid rgba(255,255,255,0.09); box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 6px 18px rgba(0,0,0,0.4); }
.remote-button::after { content: ''; position: absolute; inset: -12px -6px; border-radius: 50%; }
.remote-button svg { width: 18px; height: 18px; fill: none; stroke: #c9ccd3; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.remote-button:hover { background: rgba(40,42,48,0.75); }
/* (As the menu button: away during a launch and while the page loads, still there to tap while driving.) */
.remote-button { transition: opacity 0.35s ease, transform 0.7s cubic-bezier(0.2, 0.9, 0.3, 1), background 0.2s; }
body.loading .remote-button { opacity: 0; }
body.launch .remote-button { opacity: 0; transform: translateY(-28px); pointer-events: none; }
body.driving .remote-button { pointer-events: auto; }
/* The 0–100 button one place further left: room for the remote button by the menu. */
.pro-on .launch-button { right: calc(16px + 2 * var(--bar-h, 36px) + 20px); }
.remote-button.live { border-color: rgba(47,224,122,0.5); }
.remote-button.live svg { stroke: #7ff0b0; }
.remote-sheet { grid-template-columns: 1fr; width: min(460px, 100vw - 32px); }
.remote-sheet .pro-right { border-left: none; padding: 44px 36px 32px; }
.remote-sheet .pro-scan-note { max-width: 340px; }
.remote-sheet .pro-wait.live { color: #d9fbe6; background: rgba(47,224,122,0.12); }
.remote-sheet .pro-wait.live i { background: #2fe07a; box-shadow: 0 0 10px #2fe07a; animation: none; }
@media (max-width: 760px) { .remote-sheet .pro-qr, .remote-sheet .pro-scan, .remote-sheet .pro-scan-note { display: revert; } }

/* The sheet when managing: the plan and the invite code where the plans were. */
.pro-manage-info { display: none; }
.pro-sheet[data-mode=manage] .pro-manage-info { display: block; margin-top: 4px; }
.pro-manage-info > div:first-child { display: flex; align-items: center; gap: 12px; }
.pro-manage-info .pro-tag { display: inline-flex; margin: 0; }
.pro-mi-plan { font: 500 20px/1.2 var(--ui); color: #fff; }
.pro-mi-date { margin: 4px 0 14px; color: #9a9ea6; }
.pro-mi-invite { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0 0; border-top: 1px dashed rgba(255,207,122,0.3); color: #e8e9eb; font-weight: 500; }
.pro-mi-code { font: 600 20px/1 ui-monospace, 'SF Mono', Menlo, monospace; letter-spacing: 0.14em;
               background: linear-gradient(90deg, var(--pro-1), var(--pro-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pro-mi-note { margin: 8px 0 0; font-size: 13.5px; color: #9a9ea6; }

/* Settings → About: the legal links. */
.pro-legal a { color: #9a9ea6; }
