:root {
  --shell: #1b1b1b; --bar: #2a2a2a; --panel: #232323; --row: #262626; --edge: #0e0e0e;
  --txt: #cfcfcf; --mute: #7d7d7d; --lcd: #0f0f0f; --amber: #ffad1f;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--shell); color: var(--txt);
  font: 500 12px/1.35 "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column;
}
button { font: inherit; }

/* control bar */
.bar {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 12px; background: var(--bar);
  border-bottom: 1px solid var(--edge);
  flex: none; flex-wrap: wrap;
}
.logo { display: flex; align-items: center; gap: 8px; margin-right: 8px; color: #ececec;
  font-family: "Bricolage Grotesque", "Helvetica Neue", sans-serif; font-weight: 800; font-size: 15px; letter-spacing: .01em;
  text-transform: uppercase; font-variation-settings: "wdth" 75, "opsz" 24; }
.dot { width: 14px; height: 14px; border-radius: 50%; background: var(--amber); border: 2px solid #000; box-shadow: 0 0 10px rgba(255,173,31,.6); animation: pulse 3.2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 2px rgba(255,173,31,.2); } }
.lcd { display: flex; align-items: center; gap: 7px; background: var(--lcd); border: 1px solid #000; border-radius: 2px; padding: 3px 8px; }
.lcd .k { color: var(--mute); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.lcd .v { color: var(--amber); font: 600 12px/1 ui-monospace, "SF Mono", Menlo, monospace; font-variant-numeric: tabular-nums; }
#week, #count { display: inline-block; min-width: 3ch; } #next { display: inline-block; min-width: 11ch; } /* room for the numbers before they arrive: no header shift */
.grow { flex: 1; }
.nav { display: flex; gap: 2px; }
.nav button {
  width: 30px; height: 22px; border: 1px solid #000; background: #3a3a3a; color: #ddd; border-radius: 2px; cursor: pointer;
}
.nav button:hover { background: #474747; }
.nav button:active { background: var(--amber); color: #111; }
.nav button:focus-visible { outline: 2px solid var(--amber); outline-offset: 1px; }

main { flex: 1; display: grid; grid-template-columns: 270px 1fr; min-height: 0; }

/* browser */
.browser { background: var(--panel); border-right: 1px solid var(--edge); display: flex; flex-direction: column; min-height: 0; }
.bhead { display: flex; justify-content: space-between; padding: 8px 12px; border-bottom: 1px solid var(--edge); color: #e0e0e0; font-weight: 700; }
.bnote { color: var(--mute); font-weight: 500; }
#list { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; }
#list li {
  display: grid; grid-template-columns: 34px 1fr auto; grid-template-rows: auto auto;
  column-gap: 6px; padding: 6px 12px 6px 10px; cursor: pointer;
  border-left: 3px solid var(--sw, #555);
  border-bottom: 1px solid #1d1d1d;
}
#list li:nth-child(odd) { background: var(--row); }
#list li:hover { background: #2f2f2f; }
#list li.sel { background: #3d3524; }
#list li:focus-visible { outline: 1px solid var(--amber); outline-offset: -1px; }
#list .no { grid-row: span 2; color: var(--mute); font: 11px/1.6 ui-monospace, Menlo, monospace; }
#list .nm { color: #ececec; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#list li.sel .nm { color: var(--amber); }
#list .ty { color: var(--mute); font-size: 11px; }
#list li.newest .nm::after { content: "NEW"; margin-left: 6px; font-size: 9px; letter-spacing: .08em; color: #111; background: var(--amber); padding: 1px 4px; border-radius: 2px; vertical-align: 1px; }

/* stage */
.stage {
  --t-page: #cdb8f0; --t-page-ink: #2a1f3d;
  background: var(--t-page); color: var(--t-page-ink);
  overflow-y: auto; min-height: 0;
  display: flex; flex-direction: column; align-items: center;
  padding: 28px 16px 24px;
}
.slot { width: 100%; max-width: 1200px; }
.slot iframe { display: block; width: 100%; height: var(--fh, 360px); border: 0; background: transparent; color-scheme: normal; }
.slot-bar {
  display: flex; align-items: center; gap: 8px; max-width: 900px; margin: 14px auto 0; padding: 5px 8px 5px 10px;
  background: rgba(0,0,0,.28); color: #f1f1f1; border-radius: 4px; font-size: 11.5px;
}
.slot.current:not(.locked) .slot-bar { display: none; }
.slot.current .sb-show { display: none; }
.slot-bar .lk svg { width: 12px; height: 12px; fill: #ffad1f; stroke: #ffad1f; display: block; }
.slot-bar .sn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot-bar .grow { flex: 1; }
.slot-bar button { height: 20px; padding: 0 8px; border: 1px solid #000; border-radius: 2px; background: #3a3a3a; color: #ddd; cursor: pointer; }
.slot-bar button:hover { background: #4a4a4a; }
.slot.current.locked .slot-bar .sn::after { content: "  ·  locked: keeps playing when you browse"; opacity: .7; }
.placard { order: 2; }
.rack-label { order: 3; margin: 36px 0 0; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; opacity: .65; }
.colophon { order: 5; }

.placard { max-width: 620px; width: 100%; margin: 18px auto 0; padding: 0 4px; }
.p-top { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; opacity: .7; }
.placard h1 {
  margin: 8px 0 14px; font-family: "Bricolage Grotesque", "Helvetica Neue", sans-serif;
  font-size: clamp(40px, 6.4vw, 78px); line-height: .9; letter-spacing: -.035em; font-weight: 800;
  font-variation-settings: "wdth" 75, "opsz" 96; text-wrap: balance;
}
.thought { margin: 0 0 16px; font: italic 400 clamp(21px, 2.5vw, 28px)/1.22 "Instrument Serif", "Iowan Old Style", Georgia, serif; text-wrap: pretty; }
.blurb { margin: 0 0 12px; font-size: 13.5px; line-height: 1.55; opacity: .85; max-width: 60ch; }
.meta { margin: 0; font: 11px/1.5 ui-monospace, "SF Mono", Menlo, monospace; opacity: .6; }
.colophon {
  margin-top: auto; width: 100%; max-width: 620px; padding: 56px 4px 4px; text-align: left;
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px 28px; font-size: 11.5px; line-height: 1.5;
}
.colophon p { margin: 0; opacity: .6; }
.colophon .rules { grid-column: 1 / -1; padding-top: 14px; border-top: 1px solid color-mix(in srgb, currentColor 22%, transparent); opacity: .85;
  font-family: "Bricolage Grotesque", sans-serif; font-size: 15px; line-height: 1.3; font-variation-settings: "wdth" 85; }
.colophon .rules strong { font-weight: 750; }
.colophon .credit { align-self: end; text-transform: uppercase; letter-spacing: .1em; font-size: 10px; }
@media (max-width: 620px) { .colophon { grid-template-columns: 1fr; padding-left: 16px; padding-right: 16px; } }

@media (max-width: 820px) {
  main { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .browser { border-right: 0; border-bottom: 1px solid var(--edge); max-height: 30vh; }
  .stage { padding: 16px 0 24px; }
  .placard { padding: 0 16px; }
  .lcd .k { display: none; }
}


/* record */
.recbox { display: flex; align-items: center; gap: 8px; }
.rec {
  display: flex; align-items: center; gap: 6px;
  height: 22px; padding: 0 10px 0 8px; border: 1px solid #000; border-radius: 2px;
  background: #3a3a3a; color: #ddd; cursor: pointer; letter-spacing: .04em;
}
.rec:hover { background: #474747; }
.rec:focus-visible { outline: 2px solid var(--amber); outline-offset: 1px; }
.rdot { width: 9px; height: 9px; border-radius: 50%; background: #7a2a26; }
.rec.on { background: #2a0d0b; color: #ff5a4e; }
.rec.on .rdot { background: #ff3b30; box-shadow: 0 0 8px #ff3b30; animation: recblink 1s steps(2, start) infinite; }
@keyframes recblink { to { visibility: hidden; } }
.rec-time { min-width: 44px; color: #ff5a4e; font: 600 12px/1 ui-monospace, "SF Mono", Menlo, monospace; font-variant-numeric: tabular-nums; }

/* lock */
#list .lock {
  grid-column: 3; grid-row: 1 / span 2; align-self: center;
  width: 26px; height: 26px; padding: 0; border: 0; border-radius: 3px; background: transparent; cursor: pointer;
  display: grid; place-items: center; opacity: 0; transition: opacity .15s;
}
#list li:hover .lock, #list li.sel .lock, #list .lock:focus-visible, #list li.locked .lock { opacity: 1; }
#list .lock svg { width: 13px; height: 13px; fill: none; stroke: #8a8a8a; display: block; }
#list .lock svg rect { fill: #8a8a8a; }
#list .lock:hover { background: #3a3a3a; }
#list .lock:focus-visible { outline: 1px solid var(--amber); }
#list li.locked .lock svg, #list li.locked .lock svg rect { stroke: var(--amber); fill: var(--amber); }
#list li.locked .lock svg path { fill: none; }
@media (hover: none) { #list .lock { opacity: 1; } }

/* master tempo + view */
.bpmbox { padding: 2px 3px 2px 8px; }
.bpmbox input {
  width: 42px; background: transparent; border: 0; color: var(--amber); text-align: right; cursor: ns-resize;
  font: 600 12px/1 ui-monospace, "SF Mono", Menlo, monospace; -moz-appearance: textfield;
}
.bpmbox input::-webkit-inner-spin-button, .bpmbox input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.bpmbox input:focus-visible { outline: 1px solid var(--amber); }
.sync { height: 18px; padding: 0 7px; border: 1px solid #000; border-radius: 2px; background: #3a3a3a; color: #ccc; cursor: pointer; font-size: 11px; }
.sync.on { background: var(--amber); color: #111; }
.viewbtn { width: 30px; height: 22px; border: 1px solid #000; background: #3a3a3a; border-radius: 2px; cursor: pointer; display: grid; place-items: center; }
.viewbtn svg { width: 13px; height: 13px; fill: #bbb; }
.viewbtn.on { background: var(--amber); }
.viewbtn.on svg { fill: #111; }
.viewbtn:focus-visible, .sync:focus-visible { outline: 2px solid var(--amber); outline-offset: 1px; }

/* grid: tight uniform tiles, each machine scaled to fit its tile */
.stage.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  grid-auto-rows: max-content; gap: 10px; align-content: start; align-items: start; padding: 14px;
  background: #161616; color: #ddd;
}
.stage.grid .placard, .stage.grid .rack-label, .stage.grid .colophon { display: none; }
.stage.grid .slot, .ph { width: auto; max-width: none; border-radius: 6px; background: #202020; overflow: hidden; }
.stage.grid .fbox { position: relative; height: 210px; overflow: hidden; background: var(--tile, #1c1c1c); }
.stage.grid .slot iframe { position: absolute; left: 0; top: 0; width: 880px; transform-origin: 0 0; }
.stage.grid .slot .slot-bar, .stage.grid .slot.current:not(.locked) .slot-bar {
  display: flex; margin: 0; max-width: none; border-radius: 0; background: #202020; padding: 4px 4px 4px 8px; gap: 6px; font-size: 11px;
}
.stage.grid .slot-bar button { height: 18px; padding: 0 6px; font-size: 10.5px; }
.stage.grid .slot.current .sb-show { display: inline-block; }
.stage.grid .slot.current { box-shadow: 0 0 0 1px var(--amber); }
.stage.grid .slot.current.locked .slot-bar .sn::after { content: ""; }
.stage.grid .slot:not(.locked) .lk { opacity: .25; }
.ph {
  height: 238px; display: grid; place-items: center; color: #555; font-size: 11px; border: 1px dashed #2c2c2c;
}

/* in grid view the tiles are the collection: hide the list */
body.booting .stage > :not(.slot) { visibility: hidden; } /* until the opened machine has its size: see booted() in app.js */
body.grid-mode main { grid-template-columns: 1fr; grid-template-rows: 1fr; }
body.grid-mode .browser { display: none; }

.slot-bar .sb-big { display: none; }
.stage.grid .slot-bar .sb-big { display: inline-block; }
.stage.grid .slot.big { grid-column: span 2; }
/* the newest machine wears a slowly turning rainbow glow until you first touch it */
@property --fresh-a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.slot.fresh, .stage.grid .slot.fresh { position: relative; z-index: 2; overflow: visible; }
.stage.grid .slot.fresh > .slot-bar { border-radius: 6px 6px 0 0; }
.stage.grid .slot.fresh > .fbox { border-radius: 0 0 6px 6px; }
.slot.fresh::before, .slot.fresh::after { content: ""; position: absolute; inset: -3px; z-index: -1; border-radius: 9px; pointer-events: none;
  background: conic-gradient(from var(--fresh-a), #4796e3, #9177c7, #ca6673, #f29b3a, #f4d03f, #3fbf7f, #1fb6c9, #4796e3);
  animation: fresh-spin 5s linear infinite; }
.slot.fresh::before { inset: -5px; filter: blur(22px); opacity: .9; animation: fresh-spin 5s linear infinite, fresh-breathe 3s ease-in-out infinite; }
@keyframes fresh-spin { to { --fresh-a: 360deg; } }
@keyframes fresh-breathe { 50% { opacity: .5; } }
.fresh-tag { flex: none; padding: 1px 7px; border-radius: 9px; color: #fff; font-weight: 700; font-size: 10px; letter-spacing: .04em; text-shadow: 0 1px 1px rgba(0,0,0,.25);
  background: linear-gradient(90deg, #4796e3, #9177c7, #ca6673, #f29b3a); }
.slot:not(.fresh) .fresh-tag { display: none; }
@media (prefers-reduced-motion: reduce) { .slot.fresh::before, .slot.fresh::after { animation: none; } }
.stage.grid .slot.big .fbox { height: 440px; }
.stage.grid .slot.big .sb-big { background: var(--amber); color: #111; }
@media (max-width: 760px) { .stage.grid .slot.big { grid-column: 1 / -1; } }

/* mixer drawer */
.mixer {
  flex: none; display: flex; height: 236px; background: #1d1d1d; border-top: 1px solid #000;
  box-shadow: 0 -8px 24px rgba(0,0,0,.35);
}
.mixer[hidden] { display: none; }
.mx-strips { flex: 1; display: flex; gap: 2px; overflow-x: auto; padding: 6px; }
.mx-master { flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 92px; padding: 6px 8px; background: #262626; border-left: 1px solid #000; }
.mx-empty { color: #777; padding: 20px; font-size: 12px; }
.mx-strip {
  flex: none; width: 78px; display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: #2a2a2a; border-radius: 3px; padding: 0 0 6px; border-top: 3px solid var(--sw, #888);
}
.mx-strip.cur { background: #34302a; }
.mx-strip.idle { opacity: .55; }
.mx-name {
  width: 100%; min-height: 30px; padding: 3px 5px; border: 0; background: rgba(255,255,255,.04); color: #e6e6e6;
  font: 500 10.5px/1.2 "Helvetica Neue", Helvetica, Arial, sans-serif; text-align: left; cursor: pointer;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.mx-name:hover { background: rgba(255,255,255,.09); }
.mx-no { display: block; color: #8a8a8a; font: 10px ui-monospace, Menlo, monospace; }
.mx-no svg { width: 8px; height: 8px; fill: var(--amber); stroke: var(--amber); vertical-align: -1px; }
.mx-no svg path { fill: none; }
.mx-mname { text-align: center; color: #ffad1f; letter-spacing: .06em; text-transform: uppercase; display: block; cursor: default; background: none; }
.mx-pan { width: 22px; height: 22px; border-radius: 50%; background: #3b3b3b; border: 1px solid #111; position: relative; cursor: ns-resize; touch-action: none; flex: none; }
.mx-pan i { position: absolute; left: 50%; top: 2px; width: 2px; height: 8px; margin-left: -1px; background: #12dcef; transform-origin: 1px 9px; }
.mx-fader { flex: 1; display: flex; gap: 6px; min-height: 0; outline: none; }
.mx-fader:focus-visible { outline: 1px solid var(--amber); outline-offset: 2px; }
.mx-meter { width: 6px; background: #111; border-radius: 1px; position: relative; overflow: hidden; }
.mx-meter i { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: linear-gradient(to top, #2fd36b 0%, #2fd36b 70%, #ffd02a 86%, #ff4a3d 100%); background-size: 100% 100%; }
.mx-meter i.hot { box-shadow: 0 0 6px #ff4a3d; }
.mx-track { width: 18px; position: relative; cursor: ns-resize; touch-action: none; }
.mx-track::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; margin-left: -1.5px; background: #0f0f0f; border-radius: 2px; }
.mx-zero { position: absolute; left: 1px; right: 1px; bottom: 85.3%; height: 1px; background: #555; }
.mx-cap { position: absolute; left: 0; width: 18px; height: 12px; background: linear-gradient(#cfcfcf, #9b9b9b); border-radius: 2px; box-shadow: 0 1px 2px rgba(0,0,0,.6); }
.mx-cap::after { content: ""; position: absolute; left: 3px; right: 3px; top: 5.5px; height: 1px; background: #222; }
.mx-db { color: #ffad1f; font: 600 10.5px/1 ui-monospace, Menlo, monospace; min-height: 11px; }
.mx-btns { display: flex; gap: 3px; }
.mx-btns button, .mx-reset { height: 18px; min-width: 24px; padding: 0 5px; border: 1px solid #000; border-radius: 2px; background: #3a3a3a; color: #ccc; font-size: 10.5px; cursor: pointer; }
.mx-m.on { background: #ffad1f; color: #111; }
.mx-s.on { background: #12dcef; color: #111; }
.mx-reset { width: 100%; }
@media (max-width: 820px) { .mixer { height: 210px; } .mx-strip { width: 66px; } .mx-master { width: 74px; } }

/* transport (same family as Rec) */
.rec svg { width: 9px; height: 9px; fill: #9a9a9a; }
.tp.on { background: #13240f; color: #6fe36f; }
.tp.on svg { fill: #6fe36f; }
#stop:active { background: #2f2f2f; }

.stage.grid .slot.audition { box-shadow: 0 0 0 1px #6fe36f; }
.stage.grid .slot.audition .slot-bar .sn::after { content: "  ▶"; color: #6fe36f; }

.p-reset { margin-top: 10px; padding: 0; border: 0; background: none; color: inherit; opacity: .55; font: 11px ui-monospace, Menlo, monospace; text-decoration: underline; cursor: pointer; }
.p-reset:hover { opacity: .9; }

/* about */
.aboutbtn { height: 22px; padding: 0 9px; border: 1px solid #000; border-radius: 2px; background: #3a3a3a; color: #ddd; cursor: pointer; font-size: 11.5px; }
.aboutbtn:hover { background: #474747; }
.aboutbtn:focus-visible { outline: 2px solid var(--amber); outline-offset: 1px; }
.about {
  width: min(880px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow: auto;
  padding: 40px 44px 32px; border: 1px solid #000; border-radius: 6px;
  background: #1f1f1f; color: #d8d8d8; box-shadow: 0 30px 80px rgba(0,0,0,.6);
}
.about::backdrop { background: rgba(10,10,10,.72); backdrop-filter: blur(3px); }
.about-x { position: absolute; top: 12px; right: 14px; width: 32px; height: 32px; border: 0; border-radius: 3px; background: none; color: #999; font-size: 24px; cursor: pointer; }
.about-x:hover { background: #2e2e2e; color: #fff; }
.about-kicker { margin: 0 0 10px; color: var(--amber); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.about h2 {
  margin: 0 0 18px; max-width: 18ch; font-family: "Bricolage Grotesque", sans-serif; font-weight: 800;
  font-size: clamp(32px, 5vw, 54px); line-height: .95; letter-spacing: -.03em; color: #f2f2f2;
  font-variation-settings: "wdth" 75, "opsz" 96;
}
.about-lede { margin: 0 0 28px; max-width: 58ch; font: italic 400 clamp(19px, 2.2vw, 23px)/1.3 "Instrument Serif", Georgia, serif; color: #e8e8e8; }
.about-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; padding-top: 22px; border-top: 1px solid #333; }
.about h3 { margin: 0 0 8px; font: 700 12px/1.2 "Helvetica Neue", Arial, sans-serif; letter-spacing: .1em; text-transform: uppercase; color: #fff; }
.about-cols p { margin: 0 0 10px; font-size: 13px; line-height: 1.55; color: #b9b9b9; }
.about .keys { font-size: 12px; color: #9a9a9a; }
.about kbd { display: inline-block; min-width: 16px; padding: 1px 4px; border: 1px solid #444; border-bottom-width: 2px; border-radius: 3px; background: #2a2a2a; color: #eee; font: 600 10.5px/1.3 ui-monospace, Menlo, monospace; text-align: center; }
.about-credit { margin: 22px 0 0; padding-top: 16px; border-top: 1px solid #333; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: #777; }
@media (max-width: 760px) { .about { padding: 32px 22px 24px; } .about-cols { grid-template-columns: 1fr; } }

/* MIDI */
.midibtn { width: auto; padding: 0 8px; color: #bbb; font: 700 10.5px/1 ui-monospace, Menlo, monospace; letter-spacing: .06em; }
.midibtn.on { background: #12dcef; color: #062a2e; }
.midipanel {
  position: fixed; top: 46px; right: 12px; z-index: 50; width: min(380px, calc(100vw - 24px)); max-height: calc(100vh - 70px); overflow: auto;
  background: #1f1f1f; color: #d6d6d6; border: 1px solid #000; border-radius: 6px; box-shadow: 0 20px 60px rgba(0,0,0,.6); padding: 12px 14px 14px;
  font-size: 12px;
}
.midipanel[hidden] { display: none; }
.mp-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.mp-head b { font-family: "Bricolage Grotesque", sans-serif; font-size: 20px; font-weight: 800; letter-spacing: .02em; color: #fff; font-variation-settings: "wdth" 80; }
.mp-x { border: 0; background: none; color: #999; font-size: 20px; cursor: pointer; }
.mp-text { margin: 0 0 12px; color: #aaa; line-height: 1.5; }
.mp-status { margin: 0 0 10px; padding: 7px 9px; border-radius: 3px; background: #2b2a20; color: #ffd36b; line-height: 1.4; }
.mp-big { width: 100%; height: 34px; border: 1px solid #000; border-radius: 3px; background: #12dcef; color: #062a2e; font-weight: 700; cursor: pointer; }
.mp-ports { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.mp-ports label { display: grid; gap: 4px; color: #888; font-size: 11px; }
.mp-ports select { height: 24px; background: #2b2b2b; color: #eee; border: 1px solid #000; border-radius: 2px; }
.mp-row { display: flex; gap: 9px; align-items: flex-start; padding: 7px 0; border-top: 1px solid #2c2c2c; cursor: pointer; }
.mp-row.off { opacity: .45; cursor: default; }
.mp-row input { margin-top: 2px; accent-color: #12dcef; }
.mp-row span { display: grid; gap: 2px; }
.mp-row b { color: #eee; font-weight: 600; }
.mp-row i { font-style: normal; color: #8d8d8d; font-size: 11px; line-height: 1.35; }
.mp-learn { display: flex; gap: 10px; align-items: center; padding: 10px 0 6px; border-top: 1px solid #2c2c2c; color: #8d8d8d; font-size: 11px; }
.mp-learn button { flex: none; height: 24px; padding: 0 10px; border: 1px solid #000; border-radius: 2px; background: #3a3a3a; color: #eee; cursor: pointer; }
.mp-learn button.on { background: #ffad1f; color: #111; }
.mp-maps { list-style: none; margin: 4px 0 8px; padding: 0; }
.mp-maps li { display: flex; align-items: center; gap: 6px; padding: 3px 0; color: #bbb; font-size: 11.5px; }
.mp-maps li span { padding: 0 4px; border-radius: 2px; background: #12dcef; color: #062a2e; font: 600 10px/16px ui-monospace, Menlo, monospace; }
.mp-maps li button { margin-left: auto; border: 0; background: none; color: #888; cursor: pointer; font-size: 14px; }
.mp-off { margin-top: 8px; border: 0; background: none; color: #777; text-decoration: underline; cursor: pointer; font-size: 11px; padding: 0; }
.lcd.offline .v { color: #ff6a4d; letter-spacing: .08em; }
.lcd.offline[hidden] { display: none; }

.keybox { padding: 2px 3px 2px 8px; gap: 5px; }
.keybox select { height: 18px; background: transparent; color: var(--amber); border: 0; font: 600 12px/1 ui-monospace, "SF Mono", Menlo, monospace; cursor: pointer; }
.keybox select option { background: #1b1b1b; color: #eee; }
.keybox select:focus-visible { outline: 1px solid var(--amber); }
#keyRoot { min-width: 35px; } #keyScale { min-width: 93px; } /* their final width before the options are filled in: no header shift */
@media (max-width: 820px) { .keybox .k { display: none; } }

/* collapsible chrome on small screens */
.barmore { display: none; font-size: 16px; line-height: 1; color: #ddd; }
.bhead { width: 100%; border: 0; background: none; font: inherit; text-align: left; cursor: default; }
.bcaret { display: none; font-style: normal; color: #888; margin-left: 4px; }
@media (max-width: 820px) {
  .barmore { display: grid; }
  body.bar-min .bar .lcd:not(.offline), body.bar-min #rec, body.bar-min #rec-time, body.bar-min .bpmbox, body.bar-min .keybox,
  body.bar-min #midiBtn, body.bar-min #mixBtn, body.bar-min #aboutBtn, body.bar-min #liveBtn, body.bar-min #tfBtn, body.bar-min #calBtn, body.bar-min #ytBtn, body.bar-min #dcBtn, body.bar-min #uiBtn, body.bar-min .nav { display: none; }
  body.bar-min .bar { flex-wrap: nowrap; }
  body:not(.bar-min) .barmore { background: var(--amber); color: #111; }
  .bhead { cursor: pointer; }
  .bcaret { display: inline; }
  body.list-min .browser { max-height: none; }
  body.list-min #list { display: none; }
  body.list-min .bcaret { display: inline-block; transform: rotate(-90deg); }
}

/* a new machine is born */
.fm-birth { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; cursor: pointer; transition: opacity .2s; }
.fm-birth canvas { position: absolute; inset: 0; }
.fm-birth-name {
  position: relative; margin-top: 18vh; padding: 0 24px; text-align: center; color: #f4efe6;
  font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; font-size: clamp(44px, 9vw, 120px); line-height: .9;
  letter-spacing: -.035em; font-variation-settings: "wdth" 75, "opsz" 96; text-transform: uppercase;
}
.fm-birth-name span { display: inline-block; opacity: 0; transform: translateY(.35em) scale(.6) rotate(-6deg); filter: blur(6px);
  animation: fm-letter .55s cubic-bezier(.2, 1.4, .4, 1) forwards; }
@keyframes fm-letter { to { opacity: 1; transform: none; filter: none; } }
.fm-birth-sub {
  position: absolute; top: calc(50% + 18vh + clamp(30px, 6vw, 80px)); width: 100%; text-align: center;
  font: italic 400 clamp(22px, 3vw, 34px)/1 "Instrument Serif", Georgia, serif; color: #ffad1f;
  opacity: 0; animation: fm-fade .8s 1.7s forwards;
}
@keyframes fm-fade { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .fm-birth-name span { animation-duration: .01s; } }

/* drop a machine file anywhere */
.fm-drop {
  position: fixed; inset: 0; z-index: 900; display: grid; place-items: center; pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(255,173,31,.18), rgba(10,10,10,.86) 60%);
  opacity: 0; transition: opacity .18s;
}
.fm-drop.on { opacity: 1; }
.fm-drop-inner { text-align: center; color: #f4efe6; transform: scale(.94); transition: transform .25s cubic-bezier(.2, 1.4, .4, 1); }
.fm-drop.on .fm-drop-inner { transform: none; }
.fm-drop-ring { width: 120px; height: 120px; margin: 0 auto 22px; border-radius: 50%; border: 3px dashed #ffad1f; display: grid; place-items: center;
  animation: fm-spin 6s linear infinite; }
.fm-drop-ring i { width: 34px; height: 34px; border-radius: 50%; background: #ffad1f; border: 4px solid #000; box-shadow: 0 0 30px #ffad1f; animation: fm-beat 1s ease-in-out infinite; }
@keyframes fm-spin { to { transform: rotate(360deg); } }
@keyframes fm-beat { 50% { transform: scale(1.25); } }
.fm-drop-inner b { display: block; font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; font-size: clamp(30px, 5vw, 56px); line-height: .95; letter-spacing: -.02em; font-variation-settings: "wdth" 80; text-transform: uppercase; }
.fm-drop-inner span { display: block; margin-top: 10px; font: italic 22px/1.2 "Instrument Serif", Georgia, serif; color: #ffad1f; }

/* toasts */
.fm-toast { position: fixed; left: 50%; bottom: 24px; z-index: 950; transform: translateX(-50%); max-width: min(560px, calc(100vw - 32px));
  padding: 12px 16px; border-radius: 6px; background: #241b14; color: #f1e3d0; border: 1px solid #000; box-shadow: 0 16px 40px rgba(0,0,0,.5); font-size: 13px; line-height: 1.45; }
.fm-toast b { color: #ffad1f; }
/* a birth that went wrong: a beating dot, two lines, said kindly */
.fm-toast.birth { display: flex; align-items: flex-start; gap: 14px; padding-left: 16px; }
.fm-toast.birth .beat { position: relative; flex: none; width: 12px; height: 12px; margin: 5px 4px 0 2px; border-radius: 50%; background: #ffad1f; }
.fm-toast.birth .beat::before, .fm-toast.birth .beat::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #ffad1f; animation: birthbeat 2.2s ease-out infinite; }
.fm-toast.birth .beat::after { animation-delay: 1.1s; }
.fm-toast.birth .sub { display: block; margin-top: 3px; opacity: .78; }
@keyframes birthbeat { from { transform: scale(1); opacity: .9; } to { transform: scale(3.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .fm-toast.birth .beat::before, .fm-toast.birth .beat::after { animation: none; opacity: 0; } }
.fm-toast a { color: #12dcef; }
.fm-toast ul { margin: 6px 0 0; padding-left: 18px; color: #d8b9a0; }

/* make-your-own entry points */
#list li.makeown { display: block; padding: 9px 12px; color: #ffad1f; cursor: pointer; border-left-color: #ffad1f; }
#list li.makeown:hover { background: #2f2a22; }
#list li.mine .nm::before { content: "★ "; color: #ffad1f; }
.ph.makeown, .stage.grid .makeown-tile { display: grid; place-items: center; text-align: center; padding: 18px; height: 238px; border: 1px dashed #5a4a2e; border-radius: 6px;
  background: rgba(255,173,31,.05); color: #ffd28a; text-decoration: none; font-size: 12px; line-height: 1.5; }
.makeown-tile b { display: block; margin-bottom: 6px; font-family: "Bricolage Grotesque", sans-serif; font-size: 26px; font-weight: 800; letter-spacing: -.01em; font-variation-settings: "wdth" 80; color: #ffad1f; }
.makeown-tile:hover { background: rgba(255,173,31,.1); }
.stage:not(.grid) .makeown-tile { display: none; }
.about a { color: #12dcef; }

/* the TestFlight beta, beside the Live download: smaller, and glowing amber, as on /about */
#tfBtn { height: 20px; padding: 0 8px; font-size: 10.5px; font-weight: 700; letter-spacing: .02em; color: #ffd27a; background: color-mix(in srgb, #ffad1f 22%, #3a3a3a); border-color: #ffad1f;
  box-shadow: 0 0 0 1px rgba(255, 173, 31, .35), 0 0 12px 1px rgba(255, 173, 31, .5); animation: tfpulse 2.4s ease-in-out infinite; }
#tfBtn:hover { color: #fff1d4; background: color-mix(in srgb, #ffad1f 34%, #3a3a3a); box-shadow: 0 0 0 1px rgba(255, 173, 31, .7), 0 0 20px 3px rgba(255, 173, 31, .75); }
@keyframes tfpulse { 50% { box-shadow: 0 0 0 1px rgba(255, 173, 31, .6), 0 0 22px 3px rgba(255, 173, 31, .7); } }
@media (prefers-reduced-motion: reduce) { #tfBtn { animation: none; } }

/* the Max for Live download, beside About */
a.aboutbtn { display: inline-flex; align-items: center; text-decoration: none; }
#liveBtn { background: #12dcef; color: #062a2e; font-weight: 700; border-color: #0a8f9c; box-shadow: 0 0 12px rgba(18, 220, 239, .45); animation: livepulse 2.8s ease-in-out infinite; }
#liveBtn:hover { background: #5ff0ff; box-shadow: 0 0 18px rgba(18, 220, 239, .75); }
@keyframes livepulse { 50% { box-shadow: 0 0 20px rgba(18, 220, 239, .75); } }
@media (prefers-reduced-motion: reduce) { #liveBtn { animation: none; } }
@media (max-width: 700px) { #liveBtn { display: none; } } /* no Live on phones */

/* About: the Ableton Live section */
.about-live { margin-top: 26px; padding: 20px 22px 6px; border: 1px solid #0e6f79; border-radius: 6px; background: linear-gradient(180deg, rgba(18, 220, 239, .08), rgba(18, 220, 239, .02)); }
.about-live-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.about-live-head h3 { margin: 0; color: #12dcef; font-size: 13px; }
.about-live .about-cols { padding-top: 0; border-top: 0; }
.about-live h4 { margin: 0 0 8px; font: 700 11px/1.2 "Helvetica Neue", Arial, sans-serif; letter-spacing: .1em; text-transform: uppercase; color: #fff; }
.about-live ol { margin: 0 0 10px; padding-left: 18px; font-size: 13px; line-height: 1.55; color: #b9b9b9; }
.about-live li { margin-bottom: 3px; }
.about-live b { color: #eee; font-weight: 600; }
a.about-live-dl { display: inline-flex; align-items: center; height: 30px; padding: 0 14px; border-radius: 3px; background: #12dcef; color: #062a2e; font-weight: 700; font-size: 12.5px; text-decoration: none; box-shadow: 0 0 14px rgba(18, 220, 239, .4); }
a.about-live-dl:hover { background: #5ff0ff; }

/* remind me: the next birth in Google Calendar */
.calbtn { display: inline-grid; place-items: center; width: 26px; height: 24px; margin-left: -6px; background: var(--lcd); border: 1px solid #000; border-radius: 2px; color: var(--amber); }
.calbtn svg { width: 14px; height: 14px; }
.calbtn:hover { background: #2e2a20; color: #ffd27a; }
.calbtn:focus-visible { outline: 2px solid var(--amber); outline-offset: 1px; }

/* credit lines: Temperamento links quietly, like the text around it */
.credit a, .about .about-credit a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.credit a:hover, .about .about-credit a:hover { color: var(--amber); }

/* the YouTube playlist, beside the calendar */
.calbtn.ytbtn { margin-left: 0; color: #ff3d3d; }
.calbtn.ytbtn svg { width: 17px; height: 12px; }
.calbtn.ytbtn:hover { color: #ff6b6b; }
.calbtn.dcbtn { margin-left: 0; color: #7c87ff; }
.calbtn.dcbtn svg { width: 17px; height: 17px; }
.calbtn.dcbtn:hover { color: #9ea6ff; }

/* themes: switch any machine's skin */
.p-skin { display: flex; align-items: center; gap: 6px; margin-top: 10px; font: 11px ui-monospace, Menlo, monospace; }
.p-skin span { opacity: .55; text-transform: uppercase; letter-spacing: .08em; margin-right: 2px; }
.p-skin b { min-width: 120px; text-align: center; font-weight: 600; }
.p-skin button { width: 22px; height: 20px; padding: 0; border: 1px solid currentColor; border-radius: 2px; background: none; color: inherit; opacity: .6; cursor: pointer; font-size: 9px; }
.p-skin button:hover { opacity: 1; }
.slot-bar .sb-skin { font-size: 12px; }

/* ============================ light: Ableton Live's light look ============================
   The site's own chrome only (bar, browser, grid, mixer, panels); machines keep their skins.
   Set on <html data-ui="light"> by the toggle in the bar (first visit: follows the system). */
html[data-ui="light"] {
  --shell: #a8a8a8; --bar: #c1c1c1; --panel: #cacaca; --row: #c3c3c3; --edge: #8a8a8a;
  --txt: #161616; --mute: #555; --lcd: #e4e4e4; --amber: #ff9a00; --amber-ink: #a85a00;
  --btn: #dadada; --btn-hover: #e8e8e8; --btn-edge: #7b7b7b; --btn-ink: #161616;
  color-scheme: light;
}
html[data-ui="light"] .logo { color: #111; }
html[data-ui="light"] .dot, html[data-ui="light"] .lcd, html[data-ui="light"] .calbtn { border-color: var(--btn-edge); }
html[data-ui="light"] .lcd .v, html[data-ui="light"] .bpmbox input, html[data-ui="light"] .keybox select,
html[data-ui="light"] .about-kicker, html[data-ui="light"] .mx-db, html[data-ui="light"] .mx-mname,
html[data-ui="light"] #list li.sel .nm, html[data-ui="light"] .calbtn { color: var(--amber-ink); }
html[data-ui="light"] .keybox select option { background: #e4e4e4; color: #111; }
/* buttons: light grey keys with a dark rim, like Live's */
html[data-ui="light"] .nav button, html[data-ui="light"] .slot-bar button, html[data-ui="light"] .rec,
html[data-ui="light"] .sync, html[data-ui="light"] .viewbtn, html[data-ui="light"] .aboutbtn,
html[data-ui="light"] .mx-btns button, html[data-ui="light"] .mx-reset, html[data-ui="light"] .mp-learn button {
  background: var(--btn); color: var(--btn-ink); border-color: var(--btn-edge);
}
html[data-ui="light"] .nav button:hover, html[data-ui="light"] .slot-bar button:hover, html[data-ui="light"] .rec:hover,
html[data-ui="light"] .aboutbtn:hover { background: var(--btn-hover); }
html[data-ui="light"] .sync.on, html[data-ui="light"] .viewbtn.on, html[data-ui="light"] .mx-m.on, html[data-ui="light"] .mp-learn button.on,
html[data-ui="light"] .stage.grid .slot.big .sb-big, html[data-ui="light"] body:not(.bar-min) .barmore { background: var(--amber); color: #111; }
html[data-ui="light"] .viewbtn svg, html[data-ui="light"] .rec svg { fill: #333; }
html[data-ui="light"] .viewbtn.on svg { fill: #111; }
html[data-ui="light"] .rdot { background: #b04a43; }
html[data-ui="light"] .rec.on { background: #ffd9d4; color: #c0261c; }
html[data-ui="light"] .rec-time { color: #c0261c; }
html[data-ui="light"] .tp.on { background: #cdeec4; color: #1d7a12; }
html[data-ui="light"] .tp.on svg { fill: #1d7a12; }
html[data-ui="light"] .barmore { color: #222; }
html[data-ui="light"] .calbtn:hover { background: #f2f2f2; }
html[data-ui="light"] .calbtn.ytbtn { color: #e00; }
html[data-ui="light"] .calbtn.dcbtn { color: #5865f2; }
html[data-ui="light"] #liveBtn { border-color: #0a8f9c; }
html[data-ui="light"] #tfBtn { color: var(--amber-ink); background: color-mix(in srgb, #ffad1f 30%, #fff); border-color: #d98a00; }
/* browser list */
html[data-ui="light"] .bhead { color: #111; }
html[data-ui="light"] #list li { border-bottom-color: #b3b3b3; }
html[data-ui="light"] #list li:hover { background: #d6d6d6; }
html[data-ui="light"] #list li.sel { background: #f3d9a6; }
html[data-ui="light"] #list .nm { color: #111; }
html[data-ui="light"] #list .lock svg { stroke: #555; }
html[data-ui="light"] #list .lock svg rect { fill: #555; }
html[data-ui="light"] #list .lock:hover { background: var(--btn); }
html[data-ui="light"] #list li.locked .lock svg, html[data-ui="light"] #list li.locked .lock svg rect { stroke: var(--amber-ink); fill: var(--amber-ink); }
html[data-ui="light"] #list li.makeown { color: var(--amber-ink); border-left-color: var(--amber); }
html[data-ui="light"] #list li.makeown:hover { background: #e2d4bb; }
html[data-ui="light"] #list li.mine .nm::before { color: var(--amber-ink); }
/* grid */
html[data-ui="light"] .stage.grid { background: #a1a1a1; color: #111; }
html[data-ui="light"] .stage.grid .slot, html[data-ui="light"] .ph { background: #c8c8c8; }
html[data-ui="light"] .stage.grid .fbox { background: var(--tile, #bdbdbd); }
html[data-ui="light"] .stage.grid .slot .slot-bar, html[data-ui="light"] .stage.grid .slot.current:not(.locked) .slot-bar { background: #c8c8c8; color: #111; }
html[data-ui="light"] .slot-bar { color: #111; background: rgba(255,255,255,.45); }
html[data-ui="light"] .slot-bar .lk svg { fill: var(--amber-ink); stroke: var(--amber-ink); }
html[data-ui="light"] .ph { color: #666; border-color: #8f8f8f; }
html[data-ui="light"] .ph.makeown, html[data-ui="light"] .stage.grid .makeown-tile { border-color: #b98a3c; background: rgba(255,154,0,.08); color: #6b4300; }
html[data-ui="light"] .makeown-tile b { color: var(--amber-ink); }
html[data-ui="light"] .stage.grid .slot.audition { box-shadow: 0 0 0 1px #1d9a12; }
html[data-ui="light"] .stage.grid .slot.audition .slot-bar .sn::after { color: #1d7a12; }
/* mixer */
html[data-ui="light"] .mixer { background: #bcbcbc; border-top-color: #8a8a8a; box-shadow: 0 -8px 24px rgba(0,0,0,.12); }
html[data-ui="light"] .mx-master { background: #c6c6c6; border-left-color: #8a8a8a; }
html[data-ui="light"] .mx-strip { background: #d2d2d2; }
html[data-ui="light"] .mx-strip.cur { background: #ead9bb; }
html[data-ui="light"] .mx-name { color: #111; background: rgba(0,0,0,.04); }
html[data-ui="light"] .mx-name:hover { background: rgba(0,0,0,.08); }
html[data-ui="light"] .mx-no, html[data-ui="light"] .mx-empty { color: #555; }
html[data-ui="light"] .mx-pan { background: #e2e2e2; border-color: #7b7b7b; }
html[data-ui="light"] .mx-pan i { background: #0a8f9c; }
html[data-ui="light"] .mx-meter { background: #555; }
html[data-ui="light"] .mx-track::before { background: #6b6b6b; }
html[data-ui="light"] .mx-zero { background: #888; }
/* About */
html[data-ui="light"] .about { background: #dedede; color: #222; border-color: #8a8a8a; box-shadow: 0 30px 80px rgba(0,0,0,.3); }
html[data-ui="light"] .about::backdrop { background: rgba(120,120,120,.55); }
html[data-ui="light"] .about h2, html[data-ui="light"] .about h3, html[data-ui="light"] .about-live h4 { color: #111; }
html[data-ui="light"] .about-lede { color: #222; }
html[data-ui="light"] .about-cols p, html[data-ui="light"] .about-live ol { color: #333; }
html[data-ui="light"] .about .keys, html[data-ui="light"] .about-credit { color: #555; }
html[data-ui="light"] .about-cols, html[data-ui="light"] .about-credit { border-top-color: #b0b0b0; }
html[data-ui="light"] .about kbd { background: #f2f2f2; color: #111; border-color: #8a8a8a; }
html[data-ui="light"] .about-x { color: #555; }
html[data-ui="light"] .about-x:hover { background: #c8c8c8; color: #111; }
html[data-ui="light"] .about a { color: #0a7f8c; }
html[data-ui="light"] .about-live { border-color: #0a8f9c; background: linear-gradient(180deg, rgba(10,143,156,.1), rgba(10,143,156,.03)); }
html[data-ui="light"] .about-live-head h3 { color: #0a7f8c; }
html[data-ui="light"] .about-live b { color: #111; }
html[data-ui="light"] a.about-live-dl { color: #062a2e; }
/* MIDI panel */
html[data-ui="light"] .midipanel { background: #dedede; color: #222; border-color: #8a8a8a; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
html[data-ui="light"] .mp-head b, html[data-ui="light"] .mp-row b { color: #111; }
html[data-ui="light"] .mp-text, html[data-ui="light"] .mp-row i, html[data-ui="light"] .mp-learn, html[data-ui="light"] .mp-maps li, html[data-ui="light"] .mp-ports label { color: #444; }
html[data-ui="light"] .mp-status { background: #f3e2b8; color: #6b4300; }
html[data-ui="light"] .mp-ports select { background: #f2f2f2; color: #111; border-color: #8a8a8a; }
html[data-ui="light"] .mp-row, html[data-ui="light"] .mp-learn { border-top-color: #b8b8b8; }
html[data-ui="light"] .midibtn { color: #222; }
/* toasts */
html[data-ui="light"] .fm-toast { background: #f4ecdf; color: #2a1d0f; border-color: #8a8a8a; box-shadow: 0 16px 40px rgba(0,0,0,.2); }
html[data-ui="light"] .fm-toast b { color: var(--amber-ink); }
html[data-ui="light"] .fm-toast a { color: #0a7f8c; }
html[data-ui="light"] .fm-toast ul { color: #6b4a2a; }

/* the light/dark toggle */
.uibtn { color: var(--txt); }
.uibtn .moon { display: none; }
html[data-ui="light"] .uibtn .sun { display: none; }
html[data-ui="light"] .uibtn .moon { display: block; }

/* light: the page behind a machine is Live's light grey with a faint tint of the machine's own colour */
html[data-ui="light"] .stage:not(.grid) {
  background: color-mix(in srgb, var(--t-page) 16%, #cdcdcd);
  color: #151515;
}
html[data-ui="light"] .stage:not(.grid) .slot-bar { background: rgba(0, 0, 0, .08); }

/* born while you were away */
.fm-newborn {
  position: fixed; left: 50%; bottom: 22px; z-index: 960; transform: translate(-50%, 20px); opacity: 0;
  width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 120px); overflow-y: auto;
  padding: 16px 18px 14px; border-radius: 8px; color: #e8e2d8; transition: transform .45s cubic-bezier(.2, 1.3, .4, 1), opacity .3s;
  /* the same turning rainbow as the newest tile: a conic ring as the border, and four coloured glows circling it */
  --nb-bg: #1d1a15; border: 2px solid transparent;
  background: linear-gradient(var(--nb-bg), var(--nb-bg)) padding-box,
    conic-gradient(from var(--fresh-a), #4796e3, #9177c7, #ca6673, #f29b3a, #f4d03f, #3fbf7f, #1fb6c9, #4796e3) border-box;
  --gx: calc(cos(var(--fresh-a)) * 18px); --gy: calc(sin(var(--fresh-a)) * 12px);
  box-shadow: 0 24px 70px rgba(0,0,0,.5),
    var(--gx) var(--gy) 48px -4px rgba(71,150,227,.55), calc(var(--gx) * -1) calc(var(--gy) * -1) 48px -4px rgba(202,102,115,.55),
    calc(var(--gy) * -1.4) calc(var(--gx) * .7) 48px -4px rgba(242,155,58,.45), calc(var(--gy) * 1.4) calc(var(--gx) * -.7) 48px -4px rgba(63,191,127,.45);
  animation: fresh-spin 5s linear infinite;
}
.fm-newborn.in { transform: translate(-50%, 0); opacity: 1; }
.nb-x { position: absolute; top: 8px; right: 10px; width: 28px; height: 28px; border: 0; border-radius: 3px; background: none; color: #999; font-size: 20px; cursor: pointer; }
.nb-x:hover { background: rgba(255,255,255,.08); color: #fff; }
.nb-kicker { margin: 0 32px 10px 0; color: var(--amber); font: 700 11px/1.3 ui-monospace, Menlo, monospace; letter-spacing: .08em; text-transform: uppercase; }
.nb-item { padding: 10px 0 12px 14px; border-left: 3px solid var(--sw, var(--amber)); }
.nb-item + .nb-item { margin-top: 10px; }
.nb-no { margin: 0; color: #9a9184; font: 11px ui-monospace, Menlo, monospace; }
.nb-item h3 { margin: 2px 0 4px; font: 800 30px/1 "Bricolage Grotesque", sans-serif; letter-spacing: -.02em; font-variation-settings: "wdth" 80; color: #fff; }
.nb-thought { margin: 0 0 6px; font: italic 19px/1.25 "Instrument Serif", Georgia, serif; color: #f1e7d6; }
.nb-blurb { margin: 0 0 10px; font-size: 13px; line-height: 1.5; color: #c9c0b2; }
.nb-go { height: 28px; padding: 0 12px; border: 1px solid #000; border-radius: 3px; background: var(--sw, var(--amber)); color: #111; font-weight: 700; cursor: pointer; }
.nb-go:hover { filter: brightness(1.1); }
.nb-more { margin: 10px 0 0; color: #9a9184; font-size: 12px; }
@media (prefers-reduced-motion: reduce) { .fm-newborn { transition: none; animation: none; } }
html[data-ui="light"] .fm-newborn { --nb-bg: #f3eee4; color: #222; }
html[data-ui="light"] .nb-kicker { color: var(--amber-ink); }
html[data-ui="light"] .nb-item h3 { color: #111; }
html[data-ui="light"] .nb-thought { color: #2a2016; }
html[data-ui="light"] .nb-blurb { color: #3b342b; }
html[data-ui="light"] .nb-no, html[data-ui="light"] .nb-more { color: #6a6155; }
html[data-ui="light"] .nb-x { color: #555; }

/* stars: ☆ on every tile and on the placard; your starred machines lead the grid and the list */
.slot-bar .sb-star { min-width: 26px; font-variant-numeric: tabular-nums; }
.slot-bar .sb-star.on { color: var(--amber); border-color: #6b4a0e; }
.p-star { margin: 2px 0 12px; height: 26px; padding: 0 12px; border: 1px solid #000; border-radius: 3px; background: #2f2f2f; color: #ddd; font: 600 12.5px "Helvetica Neue", Arial, sans-serif; cursor: pointer; }
.p-star:hover { background: #3a3a3a; }
.p-star.on { background: var(--amber); color: #111; }
#list li.starred .nm::before { content: "★ "; color: var(--amber); } /* before the name: after it is the NEW badge */
.topstars { margin: 0 0 10px; font-size: 12.5px; color: #9a9a9a; }
.topstars strong { color: #d8d8d8; }
.topstars a { color: #e8e2d8; text-decoration: none; border-bottom: 1px dotted #777; }
.topstars span { color: var(--amber); font-variant-numeric: tabular-nums; }
.about-stars { margin-top: 26px; padding-top: 18px; border-top: 1px solid #333; }
.about-stars ol { margin: 0 0 10px; padding-left: 22px; columns: 2; column-gap: 28px; font-size: 13.5px; line-height: 1.7; color: #bbb; }
.about-stars a { color: #f1ece4; text-decoration: none; }
.about-stars a:hover { text-decoration: underline; }
.about-stars .no { color: #777; font: 11px ui-monospace, Menlo, monospace; }
.about-stars .ct { color: var(--amber); font-variant-numeric: tabular-nums; }
.about-stars-note { margin: 0; font-size: 12px; color: #8d8d8d; }
html[data-ui="light"] .p-star { background: #dadada; color: #161616; border-color: #7b7b7b; }
html[data-ui="light"] .p-star.on { background: #ff9a00; color: #111; }
html[data-ui="light"] .slot-bar .sb-star.on { color: #a85a00; }
html[data-ui="light"] .topstars, html[data-ui="light"] .about-stars-note { color: #555; }
html[data-ui="light"] .topstars strong, html[data-ui="light"] .topstars a, html[data-ui="light"] .about-stars a { color: #111; }
html[data-ui="light"] .about-stars { border-top-color: #9a9a9a; }
html[data-ui="light"] .about-stars ol { color: #333; }

/* the location question, with what it is for */
.calbtn.locbtn.on { background: var(--amber); color: #111; }
html[data-ui="light"] .calbtn.locbtn.on { color: #111; }
dialog.ask { width: min(420px, calc(100vw - 32px)); padding: 24px 24px 18px; border: 1px solid #000; border-radius: 6px; background: #1f1f1f; color: #d8d8d8; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); font-size: 13px; line-height: 1.55; }
dialog.ask::backdrop { background: rgba(10, 10, 10, .72); backdrop-filter: blur(3px); }
dialog.ask h3 { margin: 0 0 10px; font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; font-size: 26px; line-height: 1; letter-spacing: -.01em; font-variation-settings: "wdth" 80; color: #fff; }
dialog.ask p { margin: 0 0 9px; }
dialog.ask .ask-fine { font-size: 12px; color: #8a8a8a; }
dialog.ask .ask-btns { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }
dialog.ask .ask-btns button { height: 32px; padding: 0 16px; border: 1px solid #000; border-radius: 3px; background: #3a3a3a; color: #ddd; cursor: pointer; font: inherit; }
dialog.ask .ask-btns .go { background: var(--amber); color: #111; font-weight: 700; }
html[data-ui="light"] dialog.ask { background: #d8d8d8; color: #1a1a1a; border-color: #8a8a8a; }
html[data-ui="light"] dialog.ask h3 { color: #111; }
html[data-ui="light"] dialog.ask .ask-btns button { background: #eaeaea; color: #161616; border-color: #7b7b7b; }
html[data-ui="light"] dialog.ask .ask-btns .go { background: var(--amber); }

/* sort and show: under the Collection header, and at the top of the grid (which replaces the list) */
.viewbar { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; padding: 6px 12px; border-bottom: 1px solid var(--edge); color: var(--mute); font-size: 11px; }
.viewbar label { display: inline-flex; align-items: center; gap: 6px; }
.viewbar select { height: 22px; max-width: 150px; background: #2b2b2b; color: #eee; border: 1px solid #000; border-radius: 2px; font: 600 12px/1 ui-monospace, "SF Mono", Menlo, monospace; cursor: pointer; }
.viewbar select:focus-visible { outline: 1px solid var(--amber); }
.stage.grid > .viewbar { grid-column: 1 / -1; order: -2000000; margin: -4px -4px 0; border: 0; padding: 0 0 2px; }
.viewbar .none { flex-basis: 100%; }
html[data-ui="light"] .viewbar select { background: #f2f2f2; color: #111; border-color: #8a8a8a; }
#list li.viewnone { display: block; padding: 14px 12px; color: var(--mute); font-size: 12px; cursor: default; background: none; }
#list li.viewnone:hover { background: none; }
