
:root {
  --gold: #C9A24B; --gold-soft: rgba(201, 162, 75, .16);
  --kind-bullet: #C2552B; --kind-blitz: #C49A1C; --kind-rapid: #2E8B5E; --kind-classical: #3D52B8;
  --lift: 0 18px 34px -20px rgba(21, 24, 30, .45);
  --haze: rgba(255, 255, 255, .5); --grain: rgba(88, 99, 116, .025);
}

body[data-theme=noir], body[data-theme=dark] { --haze: transparent; --grain: rgba(255, 255, 255, .025); --lift: 0 18px 34px -18px rgba(0, 0, 0, .7); }


body {
  background-color: var(--bg);
  background-image: radial-gradient(120% 80% at 50% -10%, var(--haze), transparent 60%), repeating-conic-gradient(var(--grain) 0 25%, transparent 0 50%);
  background-size: auto, 56px 56px;
}
::selection { background: var(--gold-soft); color: var(--ink); }
* { scrollbar-width: thin; scrollbar-color: var(--accent-2) transparent; }


@keyframes sx-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
main > .view { animation: sx-in .26s cubic-bezier(.2, .7, .2, 1) both; }


.view-title::after { width: 64px; height: 3px; background: linear-gradient(90deg, var(--gold), rgba(201, 162, 75, .25)); }
[dir=rtl] .view-title::after { background: linear-gradient(270deg, var(--gold), rgba(201, 162, 75, .25)); }
.view-title::before { content: '\265E'; position: absolute; bottom: -8px; inset-inline-start: 72px; font-size: 15px; line-height: 1; color: var(--gold); opacity: .85; }


@keyframes sx-hop { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(0, -8px); } 50% { transform: translate(10px, 0); } 75% { transform: translate(10px, -8px); } }
.loading { display: flex; align-items: center; gap: 12px; padding: 18px 4px; }
.loading::before { content: '\265E'; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; font-size: 20px; color: var(--ink); background: repeating-conic-gradient(var(--sq-dark) 0 25%, var(--sq-light) 0 50%) 0 0 / 17px 17px; animation: sx-hop 1.2s ease-in-out infinite; }


.card { border-radius: 16px; }
.hv-more-btn, .hv-card, .bl-card, .hl-cell, .rt-card, .ac-tile { transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.hv-more-btn:hover, .ac-tile:hover { transform: translateY(-2px); box-shadow: var(--lift); border-color: var(--accent-2); }
.hv-more-icon { background: linear-gradient(135deg, var(--bg-3), var(--accent)); }


.rail-row { position: relative; }
.rail-row.on::before { content: ''; position: absolute; inset-block: 10px; inset-inline-start: 0; width: 3px; border-radius: 3px; background: var(--gold); }


.qp-grid { gap: 12px; }
.qp-tile {
  --k: var(--accent-text);
  position: relative; overflow: hidden; display: grid; grid-template-rows: auto 1fr auto; justify-items: start; align-items: center; gap: 2px;
  min-height: 108px; padding: 12px 14px; text-align: start; border: 1px solid var(--line); border-radius: 16px;
  background: linear-gradient(180deg, var(--bg-2), var(--bg)); color: var(--ink); box-shadow: 0 1px 2px rgba(21, 24, 30, .05);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}
.qp-tile::after { content: ''; position: absolute; inset-inline: 0; bottom: 0; height: 3px; background: var(--k); opacity: .7; transform: scaleX(.2); transform-origin: right; transition: transform .22s ease, opacity .22s ease; }
[dir=ltr] .qp-tile::after { transform-origin: left; }
.qp-tile:hover, .qp-tile:focus-visible { transform: translateY(-3px); border-color: var(--k); background: var(--bg-2); color: var(--ink); box-shadow: var(--lift); }
.qp-tile:hover::after, .qp-tile:focus-visible::after { transform: scaleX(1); opacity: 1; }
.qp-tile:active { transform: translateY(0) scale(.98); }
.qp-bullet { --k: var(--kind-bullet); }
.qp-blitz { --k: var(--kind-blitz); }
.qp-rapid { --k: var(--kind-rapid); }
.qp-classical { --k: var(--kind-classical); }
.qp-kind { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.qp-tile:hover .qp-kind { color: var(--k); }
.qp-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--k); box-shadow: 0 0 0 3px rgba(0, 0, 0, .04); }
.qp-time { font-size: 32px; font-weight: 800; line-height: 1; letter-spacing: -.02em; justify-self: stretch; text-align: center; }
.qp-mark { position: absolute; inset-inline-end: 8px; top: 0; font-size: 56px; line-height: 1; color: var(--k); opacity: .08; pointer-events: none; transition: opacity .2s, transform .25s; }
.qp-tile:hover .qp-mark { opacity: .18; transform: rotate(-8deg) scale(1.06); }
.qp-go { justify-self: stretch; text-align: center; font-size: 12px; font-weight: 800; color: var(--k); opacity: 0; transform: translateY(4px); transition: opacity .16s, transform .16s; }
.qp-tile:hover .qp-go, .qp-tile:focus-visible .qp-go { opacity: 1; transform: none; }
.qp-custom { border-style: dashed; justify-items: center; background: transparent; }
.qp-custom .qp-plus { font-size: 24px; font-weight: 300; color: var(--gold); line-height: 1; }
.qp-custom .qp-custom-label { font-size: 19px; font-weight: 800; }
.qp-custom:hover { border-style: solid; border-color: var(--gold); }
@media (max-width: 600px) { .qp-tile { min-height: 90px; padding: 10px; } .qp-time { font-size: 26px; } .qp-mark { font-size: 42px; } }
@media (max-width: 600px), (hover: none) { .qp-go { display: none; } }


.hv-play-title::before { content: '\23F1'; margin-inline-end: 8px; font-size: .78em; color: var(--gold); }

@media (prefers-reduced-motion: reduce) {
  main > .view, .loading::before { animation: none; }
  .qp-tile, .qp-mark, .qp-go, .hv-more-btn, .ac-tile { transition: none; }
}


:root, body[data-theme=silver], body[data-theme=light], body[data-theme=mono] {
  --btn-primary: #0E0E10; --btn-primary-2: #26262B; --btn-primary-ink: #D9B465;
  --gold-ink: #9C7B2F;        
}
body[data-theme=noir], body[data-theme=dark] { --gold-ink: #D2AE5E; }


.btn { border-radius: 5px; border: 1.5px solid var(--ink); background: transparent; color: var(--ink); font-weight: 800; box-shadow: none; }
.btn:active:not(:disabled) { transform: scale(.98); box-shadow: none; }
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.btn.primary { background: var(--btn-primary); color: var(--btn-primary-ink); border-color: var(--btn-primary); box-shadow: none; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.small { border-radius: 4px; border-width: 1px; }
.btn.big-btn { border-radius: 6px; }
.btn.danger { border-width: 1.5px; }

@media (hover: hover) {
  body .btn:not(.primary):not(.ghost):not(.danger):hover:not(:disabled) { background: var(--ink); color: var(--bg); border-color: var(--ink); box-shadow: none; }
  .btn.primary:hover:not(:disabled) { background: var(--btn-primary-2); border-color: var(--btn-primary-2); color: var(--btn-primary-ink); box-shadow: none; }
  .btn.ghost:hover:not(:disabled) { background: transparent; color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
}


.qp-tile { border-radius: 5px; background: var(--bg-2); box-shadow: none; }
.qp-tile::after, .qp-mark { display: none; }
.qp-dot { background: var(--gold); box-shadow: none; }
.qp-time { font-family: var(--mono); font-weight: 500; letter-spacing: -.01em; }
.qp-tile:hover, .qp-tile:focus-visible { transform: none; border-color: var(--gold); background: var(--bg-2); box-shadow: none; }
.qp-tile:hover .qp-kind { color: var(--ink); }
.qp-tile:active { transform: scale(.98); background: var(--gold-soft); }
.qp-go { color: var(--gold-ink); }


.card, .hv-card, .hl-wrap { border-radius: 8px; box-shadow: none; }
.hl-cell { border-radius: 6px; }
.hl-cell:hover { border-color: var(--gold); box-shadow: none; }
.hv-more-btn { border-radius: 8px; }
.hv-more-btn:hover { transform: none; box-shadow: none; border-color: var(--gold); }
.hv-more-icon { background: var(--gold-soft); color: var(--gold-ink); border-radius: 6px; }
.hv-more-icon .ln-icon { width: 26px; height: 26px; }
.hv-tour { background: #0E0E10; border-color: #0E0E10; }
.hv-tour .hv-card-kicker, .hv-tour-facts b { color: #D9B465; }
.hv-tour .btn.primary { background: #D9B465; color: #0E0E10; border-color: #D9B465; }


.ln-icon { display: block; width: 20px; height: 20px; }
.rail-row-icon { color: var(--gold-ink); display: grid; place-items: center; }
.rail-group-icon { color: var(--gold-ink); }
.rail-group-icon .ln-icon { width: 16px; height: 16px; }
.sec-icon { display: grid; place-items: center; }
.sec-icon .ln-icon { width: 20px; height: 20px; }
.rail-row { border-radius: 6px; }
.nav-section { border-radius: 8px; }


.app-dl { display: inline-flex; align-items: center; gap: 12px; padding: 9px 20px 9px 16px; border: 1px solid #C9A456; border-radius: 6px; background: #0E0E10; color: #FFFFFF; text-decoration: none; line-height: 1.25; text-align: start; transition: background .15s; }
.app-dl:hover { background: #26262B; }
.app-dl:active { transform: scale(.98); }
.app-dl:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.app-dl-icon { display: grid; place-items: center; color: #3DDC84; }
.app-dl-robot { width: 28px; height: 28px; display: block; }
.app-dl-eye { fill: #0E0E10; }
.app-dl-text { display: flex; flex-direction: column; }
.app-dl-text small { font-size: 11.5px; font-weight: 700; color: #D9B465; }
.app-dl-text span { font-size: 16px; font-weight: 800; }
.hv-app { gap: 10px; }
.app-parts { display: grid; gap: 18px; align-items: start; }
@media (min-width: 900px) { .app-parts { grid-template-columns: 1fr 1fr; } }
.app-part { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin: 0; }
.app-part-title { margin: 0; font-size: 20px; }
.app-part .detail { margin: 0; }
.app-size { margin: -4px 0 0; font-size: 13px; color: var(--ink-2); }
.app-steps { margin: 4px 0 0; padding-inline-start: 22px; display: grid; gap: 6px; }
.app-steps li::marker { color: var(--gold-ink); font-family: var(--mono); font-weight: 500; }
.app-note { margin: 4px 0 0; padding: 10px 12px; border-inline-start: 3px solid var(--gold); background: var(--gold-soft); font-size: 14px; line-height: 1.8; }

.qp-custom .qp-custom-label { font-family: var(--sans); font-weight: 800; }
.hv-play-title::before { content: none; }
.rt-icon, .rt-strip.compact .rt-icon { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); align-self: center; justify-self: center; }

:root, body[data-theme] { --radius: 8px; --shadow: 0 1px 0 rgba(21, 24, 30, .05); }
body[data-theme=noir], body[data-theme=dark] { --shadow: none; }
.t-alert { box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .45); }

.qp-tile { container-type: inline-size; }
.qp-time { font-size: min(32px, 32cqi); }   

.app-soon { margin: 0; display: inline-block; padding: 2px 12px; border: 1px solid var(--gold); border-radius: 99px; color: var(--gold-ink); font-weight: 800; font-size: 14px; }
.app-site-link { font-family: var(--mono); font-size: 18px; font-weight: 500; color: var(--ink); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 5px; }
.app-site-link:hover { color: var(--gold-ink); }

.app-protect { align-self: stretch; padding: 12px 14px; border: 1px solid var(--line); border-inline-start: 3px solid var(--gold); border-radius: 6px; background: var(--bg-2); font-size: 14.5px; line-height: 1.8; }
.app-protect p { margin: 4px 0; }
.app-protect-title { margin: 0 0 4px; font-size: 16px; }
.app-protect-shown { color: var(--ink-2); }
.app-btn-name { font-family: var(--mono); font-weight: 600; font-size: .92em; padding: 0 5px; border-radius: 4px; background: var(--bg-3); unicode-bidi: isolate; white-space: nowrap; }
.app-btn-pair { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; }
.app-btn-or { color: var(--ink-2); font-size: .9em; }
.app-btn-ar { font-family: var(--sans); font-weight: 800; }

.hv-main .hl-wrap { margin-top: 0; padding: 14px 16px; }
.hv-main .hl-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 900px) {
  .hv-main .hl-grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; padding-bottom: 6px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .hv-main .hl-grid::-webkit-scrollbar { display: none; }
  .hv-main .hl-cell { flex: 0 0 44%; scroll-snap-align: start; }
}
