/* The Orivon Store is drawn as design A, "Play shelf": a dark blue shelf in the evening and a pale one by day, with one blue for what can be
   pressed and one green for what installs. Both themes are tokens here; a page stylesheet uses them and sets no colour of its own, except the
   fixed tints a picture is drawn over. The theme is chosen by `data-theme` on the page, which the script sets from this device's choice or the
   system's, and the system's decides before the script has run. */
@font-face { font-family: 'Barlow Semi Condensed'; src: url(fonts/barlow-semi-condensed-latin-500-normal.woff2) format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Barlow Semi Condensed'; src: url(fonts/barlow-semi-condensed-latin-600-normal.woff2) format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Barlow Semi Condensed'; src: url(fonts/barlow-semi-condensed-latin-700-normal.woff2) format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url(fonts/inter-normal-100-900.woff2) format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  color-scheme: light dark;
  --bg0: light-dark(#e2e9f1, #0e1621);
  --bg1: light-dark(#edf2f7, #121c29);
  --panel: light-dark(#f6f9fc, #172231);
  --raised: light-dark(#ffffff, #1d2a3b);
  --line: light-dark(#c4d0de, #26354a);
  --text: light-dark(#142133, #d4dde8);
  --dim: light-dark(#43586e, #8fa3b8);
  --acc: light-dark(#0b6bcb, #3ea6ff);
  --accT: light-dark(#095bb0, #3ea6ff);
  --onacc: light-dark(#ffffff, #04111f);
  --play: light-dark(#18b98c, #2bd4a4);
  --onplay: #04211a;
  --glow: light-dark(rgba(11, 107, 203, 0.3), rgba(62, 166, 255, 0.42));
  --side: light-dark(#d6e0ea, #0b121b);
  --hover: light-dark(rgba(11, 107, 203, 0.09), rgba(62, 166, 255, 0.1));
  --amber: light-dark(#d97706, #f5a524);
  --amberT: light-dark(#92400e, #f5b94a);
  --bad: light-dark(#b91c1c, #f87171);
  --shade: light-dark(rgba(22, 44, 78, 0.22), rgba(0, 0, 0, 0.5));
  --shadow: 0 12px 30px var(--shade);
  --ok: light-dark(#036a47, #4ade80);
  --idfg: light-dark(#0f766e, #5eead4);
  --idbg: light-dark(#ccfbf1, #134e4a);
  --heart: #f43f5e;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --fcond: 'Barlow Semi Condensed', 'Arial Narrow', 'Inter', sans-serif;
  --fmono: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
  --gutter: clamp(16px, 3vw, 40px);
}
:root[data-theme='dark'] { color-scheme: dark; }
:root[data-theme='light'] { color-scheme: light; }

/* A part that sits on a dark picture keeps the dark theme's brighter text in either theme. */
.dk { color-scheme: dark; --text: #e8eef5; --dim: #a9bbcf; --accT: #7cc4ff; --raised: rgba(255, 255, 255, 0.1); --line: rgba(255, 255, 255, 0.24); --hover: rgba(62, 166, 255, 0.16); --panel: rgba(255, 255, 255, 0.08); --ok: #4ade80; --amberT: #f5b94a; color: var(--text); }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--bg0); color: var(--text); font: 14px/1.5 var(--font); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, .shelf:focus-visible, .chiprow:focus-visible, .fnds:focus-visible, .w2sw:has(input:focus-visible) { outline: 2px solid var(--acc); outline-offset: 2px; }
h1, h2, h3, p { margin-top: 0; }

.root { min-height: 100vh; display: flex; flex-direction: column; color: var(--text); background: linear-gradient(180deg, var(--bg0) 0, var(--bg1) 100%); }
#main { flex: 1; outline: none; }
.cond { font-family: var(--fcond); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.mono { font-family: var(--fmono); }
.ic { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 50; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--acc); background: var(--raised); }
.skip:focus { top: 8px; }

/* The bar */
.top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 14px var(--gutter); background: var(--side); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 11px; flex: none; }
.logo { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(145deg, #1d6fd8, #0e9f7e); display: grid; place-items: center; box-shadow: 0 0 18px var(--glow); flex: none; }
.logo svg { width: 70%; height: 70%; }
.brandn { font-size: 22px; font-weight: 700; letter-spacing: 0.07em; color: var(--text); white-space: nowrap; }
.srch { flex: 1 1 280px; max-width: 560px; display: flex; align-items: center; gap: 10px; margin: 0; padding: 8px 14px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); color: var(--dim); min-height: 40px; }
.srch:focus-within { border-color: var(--acc); box-shadow: 0 0 0 3px var(--glow); }
.srch input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: var(--text); font-size: 14px; }
.srch input::placeholder { color: var(--dim); }
.tools { margin-left: auto; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.corner { display: inline-flex; align-items: center; gap: 10px; }
.acct { display: flex; align-items: center; gap: 9px; padding: 3px 12px 3px 4px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); font-size: 13px; min-height: 34px; }
a.acct:hover { border-color: var(--acc); background: var(--hover); }
.idn { width: 28px; height: 28px; border-radius: 32%; overflow: hidden; display: inline-grid; place-items: center; flex: none; background: var(--idbg); color: var(--idfg); }
.idn svg, .idn img { width: 100%; height: 100%; display: block; }
.idn svg.ic { width: 16px; height: 16px; }
.logb { display: inline-flex; align-items: center; gap: 7px; padding: 7px 16px; border-radius: 8px; background: var(--acc); color: var(--onacc); font-weight: 700; font-size: 13.5px; min-height: 34px; }
.logb:hover { filter: brightness(1.1); box-shadow: 0 0 16px var(--glow); }
.tgl { width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border-radius: 8px; border: 1px solid var(--line); background: var(--bg0); color: var(--text); }
.tgl:hover { border-color: var(--acc); color: var(--accT); background: var(--hover); }
.tabbar { display: flex; align-items: center; padding-right: var(--gutter); background: var(--side); border-bottom: 1px solid var(--line); }
.tabs { --fade-start: 0px; --fade-end: 0px; flex: 1; min-width: 0; display: flex; flex-wrap: nowrap; align-items: center; gap: 4px; padding: 0 0 0 var(--gutter); overflow-x: auto; scrollbar-width: none; mask-image: linear-gradient(90deg, transparent, #000 var(--fade-start), #000 calc(100% - var(--fade-end)), transparent); }
.tabs::-webkit-scrollbar { display: none; }
.tabs[data-cut~='start'] { --fade-start: 28px; }
.tabs[data-cut~='end'] { --fade-end: 28px; }
.tab { position: relative; flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; font-size: 15px; color: var(--dim); }
.tab:hover { color: var(--text); background: var(--hover); }
.tab[aria-current='page'] { color: var(--text); }
.tab[aria-current='page']::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--acc); box-shadow: 0 0 12px var(--glow); }
.w2sw { position: relative; flex: none; margin-left: 8px; display: inline-flex; align-items: center; gap: 9px; min-height: 44px; padding-left: 14px; color: var(--dim); font-size: 13px; white-space: nowrap; cursor: pointer; border-radius: 8px; }
.w2sw:hover { color: var(--text); }
.w2sw input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.w2sw .track { position: relative; width: 34px; height: 20px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg0); flex: none; pointer-events: none; }
.w2sw .track i { position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--dim); transition: left 0.15s, background 0.15s; }
.w2sw input:checked + .track { background: var(--acc); border-color: var(--acc); }
.w2sw input:checked + .track i { left: 16px; background: var(--onacc); }
.w2 { flex: none; display: flex; align-items: center; gap: 4px; }
.w2 .mark-slot { display: none; }
/* Where the tabs and the switch do not fit side by side, the tabs scroll in a row of their own and the switch has the line under them. */
@media (max-width: 759px) {
  .tabbar { flex-wrap: wrap; padding-right: 0; }
  .tabs { flex: 1 0 100%; padding-right: var(--gutter); }
  .w2 { flex: 1 0 100%; justify-content: flex-end; padding: 0 var(--gutter) 4px; }
  .w2 .mark-slot { display: inline-flex; }
  .w2sw { min-height: 36px; margin-left: 0; padding-left: 0; }
}

/* The page */
.page { padding: 26px var(--gutter) 40px; }
.page.narrow { max-width: 760px; margin: 0 auto; }
.page h1 { font-size: 28px; }
.banner-host:empty { display: none; }
.banner { padding: 14px var(--gutter) 0; }
.sec { margin: 0 0 34px; }
.secH { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 2px; }
.secH h2 { margin: 0; font-size: 22px; }
.how { display: block; color: var(--dim); font-size: 12.5px; }
.seeall { display: inline-flex; align-items: center; gap: 4px; padding: 6px 10px; border-radius: 8px; color: var(--accT); font-weight: 600; font-size: 14px; }
.seeall:hover { text-decoration: underline; background: var(--hover); }
.quiet { margin: 0 0 16px; color: var(--dim); font-size: 12.5px; }
.noj { margin: 0; color: var(--dim); font-size: 12.5px; }
.shelf-note { padding: 14px 4px; }

/* Notices */
.notice { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 20px; padding: 12px 14px; border: 1px solid var(--line); border-left: 3px solid var(--acc); border-radius: 10px; background: var(--panel); }
.notice > .ic { margin-top: 2px; color: var(--accT); }
.notice.warn { border-left-color: var(--amber); }
.notice.warn > .ic { color: var(--amberT); }
.notice.bad { border-left-color: var(--bad); }
.notice.bad > .ic { color: var(--bad); }
.notice p { margin: 0; }
.notice p + p { margin-top: 6px; }
.notice-title { font-weight: 600; }
.detail pre { margin: 8px 0 0; padding: 10px; overflow: auto; border-radius: 8px; background: var(--bg0); font: 12px/1.5 var(--fmono); white-space: pre-wrap; }
.no-script { padding: 24px var(--gutter); }

/* Badges and buttons */
.vf { display: inline-flex; align-items: center; gap: 4px; color: var(--ok); font-size: 12px; font-weight: 600; }
.nch { color: var(--dim); font-size: 11.5px; font-style: italic; }
.fnd { display: inline-flex; align-items: center; gap: 5px; padding: 1px 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--raised); color: var(--amberT); font-size: 11.5px; line-height: 18px; font-weight: 600; }
.ofc { display: inline-flex; padding: 1px 9px; border-radius: 999px; background: var(--hover); border: 1px solid var(--acc); color: var(--accT); font-size: 11.5px; line-height: 18px; font-weight: 600; }
.b { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 7px 16px; border-radius: 8px; font-weight: 700; font-size: 13px; border: 1px solid transparent; min-height: 34px; white-space: nowrap; }
.b-in { background: var(--play); color: var(--onplay); }
.b-in:hover { filter: brightness(1.08); box-shadow: 0 0 16px rgba(43, 212, 164, 0.5); }
.b-up { background: var(--acc); color: var(--onacc); }
.b-up:hover { filter: brightness(1.1); box-shadow: 0 0 16px var(--glow); }
.b-op { border-color: var(--line); background: var(--panel); color: var(--text); font-weight: 600; }
.b-op:hover { border-color: var(--acc); background: var(--hover); }
.b-bi { border-color: var(--line); background: transparent; color: var(--dim); font-weight: 600; cursor: default; }
.b:disabled, .b[aria-disabled='true'] { opacity: 0.6; cursor: progress; filter: none; box-shadow: none; }
.mark-slot { display: inline-flex; align-items: center; vertical-align: middle; flex: none; }
/* The browser draws its mark in an element that is 12rem wide until the page sizes it, which pushes the words beside a mark into a narrow column: it is sized to the pill the browser draws. */
.mark-slot orivon-mark { width: max-content; }

/* Corner marks and the foot */
.hud { position: relative; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); min-width: 0; transition: background 0.15s, border-color 0.15s, box-shadow 0.15s; }
.hud::before, .hud::after { content: ''; position: absolute; width: 14px; height: 14px; pointer-events: none; border: 0 solid var(--line); transition: border-color 0.15s; }
.hud::before { top: -5px; left: -5px; border-top-width: 1px; border-left-width: 1px; border-top-left-radius: 4px; }
.hud::after { right: -5px; bottom: -5px; border-right-width: 1px; border-bottom-width: 1px; border-bottom-right-radius: 4px; }
.hud:hover, .hud:focus-within { border-color: var(--acc); box-shadow: 0 0 18px var(--glow); }
.hud:hover::before, .hud:hover::after, .hud:focus-within::before, .hud:focus-within::after { border-color: var(--acc); }
.foot { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; justify-content: space-between; padding: 22px var(--gutter); background: var(--side); border-top: 1px solid var(--line); color: var(--dim); font-size: 13px; }
.foot .fl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; }
.foot a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 40; transform: translateX(-50%); max-width: min(560px, calc(100vw - 32px)); padding: 12px 18px; border-radius: 10px; border: 1px solid var(--line); background: var(--raised); box-shadow: var(--shadow); }
.toast[data-tone='warn'] { border-color: var(--amber); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
