/* Qualifying and the retirement countdown */
/* ---- QUALY ---- */
.qstrip { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.qs-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.qs-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.qs-res { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.qs-res b, .qs-big { font-family: var(--display); font-style: italic; font-weight: 800; font-size: 30px; color: var(--fg); line-height: 1; }
.qs-now { color: var(--fg); font-weight: 600; }
.qs-auto { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); cursor: pointer; }
.q-body { display: flex; flex-direction: column; gap: 12px; }
.q-panel { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.q-hours { display: flex; gap: 4px; overflow-x: auto; padding: 12px 0 4px; }
.qh { flex: 0 0 52px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border: 1px solid var(--line); position: relative; }
.qh span { font-size: 11px; color: var(--muted); font-family: var(--display); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.qh b { font-size: 20px; line-height: 1.1; }
.qh small { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.qh em { position: absolute; top: -9px; left: 2px; font-size: 9px; font-style: normal; color: var(--muted); white-space: nowrap; }
.qh.now { border-color: var(--fg); background: rgba(255, 255, 255, .08); }
.qh.now span { color: var(--fg); }
.q-grid2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; }
@media (max-width: 760px) { .q-grid2 { grid-template-columns: 1fr; } }
.q-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.q-types button { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 10px; text-transform: none; letter-spacing: 0; font-family: var(--body); font-weight: 400; }
.q-types .tname { font-family: var(--display); font-weight: 700; font-size: 16px; text-transform: uppercase; display: inline-flex; align-items: center; gap: 6px; }
.q-types small { color: var(--muted); font-size: 12px; }
.q-types .taff { display: block; width: 100%; height: 4px; background: rgba(255, 255, 255, .1); }
.q-types .taff i { display: block; height: 100%; }
.q-types button[aria-pressed="true"], .q-tires button[aria-pressed="true"] { border-color: var(--fg); background: rgba(255, 255, 255, .1); }
.q-tires { display: flex; flex-wrap: wrap; gap: 8px; }
.q-tires button { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; text-transform: none; font-size: 14px; }
.q-tires i { width: 14px; height: 14px; border-radius: 50%; border: 3px solid #222; box-shadow: 0 0 0 1px rgba(255, 255, 255, .3); }
.q-tires small { color: #e8b64a; }
.q-go { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.q-go .mut { color: var(--muted); }
.q-go .go { font-size: 18px; padding: 12px 22px; }
.q-run .qf { display: grid; grid-template-columns: 26px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.q-run .qf i { width: 22px; height: 16px; display: block; }
.q-run .qf.green i { background: #1fbf5b; } .q-run .qf.white i { background: #fff; }
.q-run .qf.check i { background: repeating-conic-gradient(#fff 0 25%, #111 0 50%) 0 0 / 8px 8px; }
.q-run .qf b { font-family: var(--display); font-weight: 800; font-style: italic; font-size: 20px; text-transform: uppercase; }
.q-run .qf span { font-family: var(--display); font-weight: 700; font-size: 22px; font-variant-numeric: tabular-nums; }
.q-run #qSkip { align-self: flex-start; }
.q-sim { position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #132a1d; }
.q-sim canvas { display: block; width: 100%; height: auto; aspect-ratio: 800 / 460; }
.q-hud { position: absolute; left: 12px; top: 12px; display: flex; align-items: center; gap: 10px; background: rgba(6,10,20,.78); padding: 6px 12px; border-radius: 8px; }
.q-hud b { font-family: var(--display); font-weight: 800; font-size: 24px; font-variant-numeric: tabular-nums; }
.q-hud span { font-family: var(--display); font-weight: 700; font-style: italic; text-transform: uppercase; color: var(--muted); }
.q-flag { width: 26px; height: 18px; display: block; border-radius: 2px; }
@media (max-width: 560px) { .q-hud { left: 6px; top: 6px; padding: 3px 8px; gap: 6px; } .q-hud b { font-size: 16px; } .q-hud span { display: none; } .q-flag { width: 16px; height: 11px; } }
.q-flag.green { background: #1fbf5b; } .q-flag.white { background: #fff; }
.q-flag.check { background: repeating-conic-gradient(#fff 0 25%, #111 0 50%) 0 0 / 9px 9px; }
@media (prefers-reduced-motion: no-preference) { .q-run .qf:last-of-type { animation: qIn .35s ease-out; } @keyframes qIn { from { opacity: 0; transform: translateX(-8px); } } }
.q-gridlist { display: flex; flex-direction: column; }
.qg { display: grid; grid-template-columns: 30px minmax(0, 1fr) 64px 110px 84px 64px; gap: 8px; align-items: center; padding: 6px 4px; border-bottom: 1px solid var(--line); font-size: 14px; font-variant-numeric: tabular-nums; }
.qg .p { font-family: var(--display); font-weight: 800; font-style: italic; font-size: 18px; }
.qg .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qg .w, .qg .g { color: var(--muted); font-size: 12px; }
.qg .ti { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
.qg .ti i { width: 10px; height: 10px; border-radius: 50%; }
.qg b { font-family: var(--display); font-size: 16px; }
.qg.mine { background: rgba(255, 255, 255, .09); box-shadow: inset 4px 0 0 var(--fg); }
@media (max-width: 560px) { .qg { grid-template-columns: 26px minmax(0, 1fr) 70px 56px; } .qg .w, .qg .ti { display: none; } }
.pk-odds-wrap { overflow-x: auto; }
.pk-odds table { min-width: 640px; width: 100%; }
.pk-odds th { font-family: var(--display); font-weight: 700; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; text-align: right; }
.pk-odds th:first-child, .pk-odds th:nth-child(2) { text-align: left; }
.pk-odds .pk-name { text-align: left; vertical-align: top; font-size: 15px; text-transform: none; letter-spacing: 0; padding-top: 8px; }
.pk-odds .pk-name small, .pk-odds .pk-slot small { display: block; font-family: var(--body); font-weight: 600; font-size: 12px; color: var(--muted); letter-spacing: 0; text-transform: none; }
.pk-odds .pk-slot { text-align: left; font-weight: 600; }
.pk-odds tr.pk-first td, .pk-odds tr.pk-first th { border-top: 2px solid rgba(255, 255, 255, .22); }
.pk-odds td.mut { color: var(--muted); opacity: .5; }
.m-wallets { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.badge.usd { border-color: #3fc79a; color: #3fc79a; }
@media (max-width: 760px) { .cm-tabs { flex-wrap: wrap; padding-right: 0; } .cm-tabs button { font-size: 15px; padding: 6px 9px; } }
.market-top .tabs { max-width: 100%; overflow-x: auto; }
.pk-odds-hint { display: none; font-size: 12px; color: var(--muted); }
@media (max-width: 700px) { .pk-odds-hint { display: block; } .pk-odds td, .pk-odds th { padding: 4px 8px; font-size: 13px; } }
/* Retirement countdown: amber (3) → orange (2) → red, pulsing (last season) */
.ret-badge { display: inline-block; font-family: var(--display); font-weight: 700; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; padding: 2px 7px; border: 1px solid currentColor; white-space: nowrap; }
.ret-3 { color: #e8b64a; } .ret-2 { color: #ff8a3d; } .ret-1 { color: #ff4d5e; }
.ret-badge.ret-1 { background: rgba(229, 36, 59, .15); }
.cb-ph { position: relative; }
.cb-ret { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; text-align: center; font-family: var(--display); font-weight: 800; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; padding: 2px 0; color: #111; }
.cb-ret.ret-3 { background: #e8b64a; } .cb-ret.ret-2 { background: #ff8a3d; } .cb-ret.ret-1 { background: #e5243b; color: #fff; }
@media (prefers-reduced-motion: no-preference) { .cb-ret.ret-1, .ret-badge.ret-1 { animation: retPulse 1.6s ease-in-out infinite; } @keyframes retPulse { 50% { opacity: .55; } } }
.ag-mini .ret-badge { font-size: 10px; padding: 1px 5px; }
.lu-row .lu-ret { grid-row: 4; grid-column: 1 / -1; }
[data-cardref] { cursor: pointer; }
.lu-row[data-cardref]:hover, .mini[data-cardref]:hover { border-color: rgba(255, 255, 255, .45); background: rgba(255, 255, 255, .04); }
#screen-pack [data-cardref], #screen-championship [data-cardref] { cursor: inherit; }
.m-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); }
.m-filters select, .m-filters input[type=number] { background: var(--panel); color: var(--fg); border: 1px solid var(--line); padding: 7px 8px; font: inherit; font-size: 14px; }
.m-filters .ag-search { flex: 1 1 160px; }
.m-filters select { width: auto; flex: 0 0 auto; max-width: 100%; }
.mf-max { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); }
.mf-max input { width: 80px; }
.m-filters button { padding: 7px 12px; font-size: 13px; }
.f-clear { border: 1px solid var(--red, #e5243b) !important; color: var(--fg) !important; background: transparent !important; padding: 7px 12px; font-size: 13px; white-space: nowrap; }
.f-clear:hover { background: rgba(229, 36, 59, .18) !important; }
.mf-count { color: var(--muted); font-size: 13px; }
@media (max-width: 520px) { .m-filters select { flex: 1 1 45%; min-width: 0; } }
.pk-pay { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pk-pay .pk-cr { border: 1px solid rgba(255, 255, 255, .4); font-weight: 700; }
.lg-row.down { box-shadow: none; }
.lg-row.down .pos { color: #ff8a96; }
