/* describesong — technicolor blocks, the Homestead way: SOLID tone panels,
   nested rows a lighter tint of the same tone, dark ink on everything, and
   the two-tone pixel "wallpaper" showing only in the gaps between blocks. */
:root { --a: rgb(50 130 165); --b: rgb(165 140 45); --ad: rgb(30 60 80); --bd: rgb(70 60 20);
  --ink: #15151a; --ink2: rgb(21 21 26 / .68); --ink3: rgb(21 21 26 / .45);
  --a1: color-mix(in oklab, var(--a) 78%, white); --a2: color-mix(in oklab, var(--a) 62%, white);
  --b1: color-mix(in oklab, var(--b) 78%, white); --b2: color-mix(in oklab, var(--b) 62%, white);
  --r: 14px; --ri: 10px; --gap: 12px;
  /* the visitor's own UI font: SF Pro on a Mac, Segoe on Windows, whatever fontconfig says on Linux */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif }
* { box-sizing: border-box } html { background: #15151a } body { margin: 0; background: transparent }  /* body must NOT paint: an in-flow body background sits above the z-index:-1 canvas */
body { color: var(--ink); font: 15px/1.5 var(--font); min-height: 100vh; -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums }
#wp, #water { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: -1 } #wp { image-rendering: pixelated } #water[hidden] { display: none }
a { color: inherit }
main { width: 100%; min-height: 100vh; margin: 0; padding: var(--gap); display: grid; gap: var(--gap); grid-template-rows: auto 1fr auto; grid-template-columns: minmax(0, 1fr) clamp(340px, 27vw, 520px); grid-template-areas: "top top" "res side" "foot foot" }

/* panels: solid tone. .a = primary tone, .b = secondary */
.panel { border-radius: var(--r); padding: 18px 20px; background: var(--a) } .panel.b { background: var(--b) }
.top { grid-area: top; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; position: relative; z-index: 3 }
.side { grid-area: side; align-self: stretch; display: flex; flex-direction: column } .foot { grid-area: foot; display: flex; gap: 8px; flex-wrap: wrap; padding: 10px 12px; align-items: center; position: relative }
.resarea { grid-area: res; display: flex; flex-direction: column; gap: var(--gap) } .resarea > .panel { flex: 1 }   /* the main panel fills its column, like the app window does */

/* blocks nested in a panel: lighter tint of the panel's tone */
.blk { border-radius: var(--ri); padding: 10px 14px; display: inline-flex; align-items: center; gap: 10px; min-height: 46px; text-decoration: none; background: var(--a1); color: var(--ink) }
.panel.b .blk { background: var(--b1) } .panel.b .blk.alt, .blk.alt { background: var(--a) } .panel .blk.alt2 { background: var(--b) }
.blk.push { margin-left: auto } .blk:where(a):hover { filter: brightness(1.06) }
.k { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink2) } .v { font-weight: 700 }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--ink) }
.brand { font-size: clamp(24px, 2.2vw, 34px); font-weight: 800; letter-spacing: -.03em; padding: 6px 18px 6px 16px; gap: 12px }

/* rings — the bar's stat rings: track, arc, number */
.ring { --p: 0; width: 44px; height: 44px; border-radius: 50%; flex: none; display: grid; place-items: center; position: relative; font-weight: 800; font-size: 13px; background: conic-gradient(var(--ink) calc(var(--p) * 1%), rgb(21 21 26 / .16) 0) }
.ring::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--a1) } .panel.b .ring::before { background: var(--b1) } .ring span { position: relative }
.ring.big { width: 64px; height: 64px; font-size: 16px } .ring.big::before { inset: 7px }

/* search */
h1 { font-size: clamp(30px, 3.6vw, 52px); font-weight: 800; line-height: 1.02; letter-spacing: -.03em; margin: 2px 0 8px } h1 span { color: var(--ink); background: var(--b); padding: 0 .14em; border-radius: .18em }
.lead { color: var(--ink2); margin: 0 0 18px }
form.search { display: flex; gap: 8px; flex-wrap: wrap }
form.search input { flex: 1 1 320px; font: 500 clamp(17px, 1.6vw, 22px)/1.3 var(--font); color: var(--ink); background: var(--a2); border: 0; border-radius: var(--ri); padding: 14px 16px; outline: none; min-width: 0 }
form.search input:focus { box-shadow: inset 0 0 0 2px var(--ink) } form.search input::placeholder { color: var(--ink3) }
form.search button { font: 800 13px/1 var(--font); letter-spacing: .1em; text-transform: uppercase; color: var(--a); background: var(--ink); border: 0; border-radius: var(--ri); padding: 0 26px; cursor: pointer; min-height: 50px } form.search button:hover { color: var(--b) }
.hint { margin: 14px 0 0; padding: 10px 14px; border-radius: var(--ri); background: var(--b); font-size: 13px; font-weight: 500 }

/* results = nested rows */
#res { display: flex; flex-direction: column; gap: 8px; margin-top: 12px }
.hit { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; animation: pop .3s both; animation-delay: var(--d, 0ms) }
.hit .t { font-size: 17px; font-weight: 800; line-height: 1.2 } .hit .s { color: var(--ink2); font-size: 12.5px; margin-top: 2px } .hit .n { color: var(--ink3); font-size: 11px; margin-right: 6px }
.tag { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; padding: 6px 10px; border-radius: 8px; color: var(--ink2); background: rgb(21 21 26 / .08); white-space: nowrap; font-weight: 700 }
.tag.v { background: var(--ink); color: var(--a) }
@keyframes pop { from { opacity: 0; transform: translateY(6px) } }

/* add music (side panel, secondary tone) */
.side h2 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 8px; line-height: 1.1 } .side h2 span { color: var(--ink); background: var(--a); padding: 0 .14em; border-radius: .18em }
.side p { margin: 0 0 14px; color: var(--ink2); font-size: 13px } .side p b { color: var(--ink) }
.scan { width: 100%; text-align: left; font: 800 14px/1.2 var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--b); background: var(--ink); border: 0; border-radius: var(--ri); padding: 16px 18px; cursor: pointer } .scan:hover { color: var(--a) }
.scan small { display: block; font-weight: 500; text-transform: none; letter-spacing: 0; font-size: 11.5px; margin-top: 6px; color: rgb(245 245 248 / .6) }
.facts { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px }
.facts li { background: var(--b1); border-radius: var(--ri); padding: 9px 12px; font-size: 12.5px; color: var(--ink2) } .facts li b { color: var(--ink) }
#prog { margin-top: 12px; display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; background: var(--b1); border-radius: var(--ri); padding: 12px 14px } #prog[hidden] { display: none }
#prog progress { display: none } #status { white-space: pre-line; font-size: 12px; line-height: 1.7 } #prog .ghost { grid-column: 2; justify-self: start }
.ghost { font: 800 11px/1 var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--ink); background: var(--b2); border: 0; border-radius: 8px; padding: 9px 12px; cursor: pointer } .ghost:hover { filter: brightness(1.06) }
.log { grid-column: 1 / -1; font-size: 11.5px; line-height: 1.6; color: var(--ink2); max-height: 200px; overflow: auto; white-space: pre-wrap; border-top: 1px solid rgb(21 21 26 / .15); padding-top: 8px }
dialog { background: var(--b); color: var(--ink); border: 0; border-radius: var(--r); padding: 22px; max-width: 440px; font: 13.5px/1.5 var(--font) } dialog::backdrop { background: #000a }
.foot .blk { font-size: 12px; min-height: 38px; padding: 8px 12px; color: var(--ink2) } .foot .blk a { color: var(--ink) }
@media (max-width: 860px) { main { grid-template-columns: 1fr; grid-template-areas: "top" "res" "side" "foot" } .hit { grid-template-columns: auto 1fr } .hit .tag { grid-column: 2; justify-self: start } .hide-sm { display: none !important } }

/* corner settings block — the desktop's Colors / Water tabs, in miniature */
.tc label { display: grid; grid-template-columns: 74px 1fr 40px; align-items: center; gap: 8px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink2) }
.tc label output { text-align: right; color: var(--ink); font-weight: 700; letter-spacing: 0; text-transform: none }
.tc input[type=range] { width: 100%; accent-color: var(--ink); margin: 0 } .tc .k2 { font-size: 10.5px; color: var(--ink2); text-transform: none; letter-spacing: 0 }
.tc .chk { grid-template-columns: auto 1fr; text-transform: none; letter-spacing: 0; font-size: 12px; color: var(--ink) } .tc .tsub { font-weight: 700; font-size: 12px; margin-top: 4px; padding-top: 6px; border-top: 1px solid rgb(21 21 26 / .15) }


/* sidebar: the support block sits at the bottom, whatever the height */
.support { margin-top: auto; padding-top: 14px; display: flex; flex-direction: column; gap: 8px }
.support .blk { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px 14px }
.support b { font-size: 15px } .support .k2 { font-size: 12px; color: var(--ink2); line-height: 1.5 } .support .k2 a { color: var(--ink) }
/* the colours & water box lives IN the bottom bar and opens upward, so it never covers anything */
.tc { position: relative; margin-left: auto; padding: 0; display: block; box-shadow: none; width: auto; overflow: visible; max-height: none }
.tc .tch { padding: 8px 12px; min-height: 38px; display: inline-flex; align-items: center; gap: 10px; border-radius: var(--ri); background: var(--a); color: var(--ink); cursor: pointer; font-weight: 700; font-size: 13px; user-select: none }
#tcbody { display: none; position: absolute; right: 0; top: calc(100% + 10px); width: 270px; max-height: calc(100vh - 90px); overflow: auto; padding: 12px 14px; flex-direction: column; gap: 8px; border-radius: var(--r); background: var(--b); box-shadow: 0 14px 40px -16px #000; z-index: 20 }
.tc.open #tcbody { display: flex }

/* a count that just changed */
.tick { animation: tick .6s ease-out } @keyframes tick { 0% { transform: scale(1.18) } 100% { transform: scale(1) } }
#nTracks, #nWeek { display: inline-block }

/* the label-conflict dialog */
.lbl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 12px 0; align-items: baseline } .lbl .k { padding-top: 2px } dialog .s { color: var(--ink2); font-size: 12.5px } dialog { max-width: 520px }

#tcMoreBody { display: flex; flex-direction: column; gap: 8px; margin-top: 4px } #tcMoreBody[hidden] { display: none } #tcMore, #tcReset { align-self: flex-start }

/* chroma key: one flat colour behind everything, nothing else painted there.
   The top-left pixel is the key colour, which is where a self-calibrating
   keyer (the desktop's chromakey shader) samples it. */
html.chromakey, html.chromakey body { background: var(--key, #00ff00) !important }
html.chromakey #wp, html.chromakey #water { display: none !important }
