/* site-theme.css (1 Nov 2026): the parts of the site pages that skins.css and picker.css do not reach, so that every colour on a page follows the theme the visitor picked. Hand-written: edit it freely. Only the block between the STICKERS markers is generated by a script. Link it after skins.css and picker.css. Beige and brown keep the original dune look. */

/* 1. «brown» is the page's own dark palette; pages that only knew prefers-color-scheme stayed beige on a light phone */
:root[data-skin="brown"]{--bg:#1E140D;--panel:#291C13;--raise:#36261A;--line:#4A3524;--grid:#3A2A1D;--fg:#F8EBD6;--muted:#C9B293;--frame:#FDBF6A;--warm:#F0A55A;--accent:#FDBF6A;--on-accent:#291C13;--ring:#9CC7F0;color-scheme:dark}

/* 2. the keyboard focus ring uses the theme's own focus colour */
:root[data-skin]:not([data-skin="beige"]):not([data-skin="brown"]){--ring:var(--focus)}

/* 3. the top bar: the underline under the page you are on */
:where(:root[data-skin]:not([data-skin="beige"]):not([data-skin="brown"])) .bar nav a[aria-current]{border-bottom-color:var(--accent)}

/* 4. Games: the «النسخة N» pill */
:where(:root[data-skin]:not([data-skin="beige"]):not([data-skin="brown"])) :is(.go a,.ep) i.ver{background:var(--accent);color:var(--on-accent)}

/* 5. Lap Log: the numbered cards and the best lap (the chart's three line colours stay as they are: they are data colours) */
:where(:root[data-skin]:not([data-skin="beige"]):not([data-skin="brown"])) .checks li{border-top-color:var(--cardtop)}
:where(:root[data-skin]:not([data-skin="beige"]):not([data-skin="brown"])) .checks li::before{color:var(--accent)}
:where(:root[data-skin]:not([data-skin="beige"]):not([data-skin="brown"])) .lap.is-best{border-color:var(--accent)}

/* 6. Art / photo to art style: the drop box, the chosen style and the buttons */
:where(:root[data-skin]:not([data-skin="beige"]):not([data-skin="brown"])) .drop:hover{border-color:var(--accent)}
:where(:root[data-skin]:not([data-skin="beige"]):not([data-skin="brown"])) .drop:focus-within{border-color:var(--accent)}
:where(:root[data-skin]:not([data-skin="beige"]):not([data-skin="brown"])) .styles button[aria-pressed="true"]{background:var(--w96);border-color:var(--cardtop);color:var(--w96-on)}
:where(:root[data-skin]:not([data-skin="beige"]):not([data-skin="brown"])) .actions button{background:var(--w96);border-color:var(--cardtop);color:var(--w96-on)}

/* 6b. the top bar fits a phone (3 Nov 2026): the logo stays, the links take the room that is left and wrap onto a second row when they do not fit, instead of pushing the whole page sideways (the bar needed 417-525 px, a phone has 360-414) */
@media (max-width:900px){
  .bar .in .brand{flex:none}
  .bar .in nav{flex:1 1 0;min-width:0;flex-wrap:wrap;justify-content:flex-end;row-gap:2px}
  .bar .in nav a,.bar .in nav .lang{display:inline-flex;align-items:center;min-height:34px}
}

/* 7. the card stickers: one picture of six badges per theme, recoloured with the theme's own colours (a sprite: .st-NAME picks the badge) */
/* STICKERS:BEGIN generated by a script, do not edit by hand */
.st{display:block;background:url(/img/stickers/skins/default.webp) 0 0/600% 100% no-repeat}
.st-wheel{background-position:0% 0}
.st-wheels{background-position:20% 0}
.st-fire{background-position:40% 0}
.st-flag{background-position:60% 0}
.st-heart{background-position:80% 0}
.st-helmet{background-position:100% 0}
html[data-skin="red"] .st{background-image:url(/img/stickers/skins/red.webp)}
html[data-skin="blue"] .st{background-image:url(/img/stickers/skins/blue.webp)}
html[data-skin="lightblue"] .st{background-image:url(/img/stickers/skins/lightblue.webp)}
html[data-skin="night"] .st{background-image:url(/img/stickers/skins/night.webp)}
html[data-skin="blackred"] .st{background-image:url(/img/stickers/skins/blackred.webp)}
html[data-skin="redblue"] .st{background-image:url(/img/stickers/skins/redblue.webp)}
html[data-skin="blacksky"] .st{background-image:url(/img/stickers/skins/blacksky.webp)}
html[data-skin="blueblue"] .st{background-image:url(/img/stickers/skins/blueblue.webp)}
/* STICKERS:END */
