/* Fonts ship with the app so it opens even with no internet (a blocked font request used to freeze the whole page). */
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap; src: url(fonts/manrope-latin-ext-wght-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap; src: url(fonts/manrope-latin-wght-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 800; font-display: swap; src: url(fonts/jetbrains-mono-latin-wght-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* Ignite console, softer. Glass panels float over a deep navy ground, controls are pills,
   one soft blue accent, red only ever means live. Dark by design: it lives in a dark room. */
:root {
  --bg: #0b0e13; --panel: rgba(22, 29, 41, .68); --panel-solid: #141a24;
  --raise: rgba(255, 255, 255, .045); --raise-2: rgba(255, 255, 255, .085);
  --line: rgba(255, 255, 255, .08); --line-2: rgba(255, 255, 255, .17);
  --fg: #e8ecf2; --muted: #93a0b2;
  --accent: #7db4ff; --accent-2: #b3d3ff; --accent-ink: #06121f; --accent-soft: rgba(125, 180, 255, .16);
  --live: #ff5a5f; --live-soft: rgba(255, 90, 95, .15); --ok: #4cc38a; --warn: #f2b441;
  --font: "Manrope", "SF Pro Text", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-data: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --r-xl: 24px; --r-lg: 18px; --r-md: 12px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .18) transparent; }
html { font-size: clamp(14px, .3vw + 12.8px, 16px); }
html, body { height: 100%; margin: 0; }
body {
  display: flex; flex-direction: column; overflow: hidden;
  color: var(--fg); font-family: var(--font); font-size: 1rem; line-height: 1.45; letter-spacing: -.005em;
  background:
    radial-gradient(900px 520px at 8% -8%, rgba(125, 180, 255, .11), transparent 62%),
    radial-gradient(760px 520px at 100% 108%, rgba(255, 90, 95, .06), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.is-viewer .admin-only { display: none !important; }
.mono { font-family: var(--font-data); font-variant-numeric: tabular-nums; }
.label { font-size: .78rem; font-weight: 600; letter-spacing: .02em; color: var(--muted); }
.note { color: var(--muted); font-size: .86rem; margin: 0; }
.note.err { color: var(--live); }
.empty { color: var(--muted); padding: 18px; margin: 0; }

/* top bar */
.top {
  display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap;
  margin: 12px 12px 0; padding: 8px 10px 8px 20px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-xl);
  -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2);
}
.brand { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.brand .sub { padding-left: 24px; font-size: .68rem; font-weight: 500; letter-spacing: .02em; color: var(--muted); line-height: 1.1; }
.brand .label { display: inline-flex; align-items: center; gap: 10px; font-size: 1.15rem; font-weight: 800; letter-spacing: -.02em; color: var(--fg); }
.brand .label::before { content: ""; width: 14px; height: 14px; border-radius: 5px; background: linear-gradient(135deg, var(--accent-2), var(--accent) 55%, #4d7dff); box-shadow: 0 0 18px rgba(125, 180, 255, .55); }
.spacer { flex: 1; }
.plansel { display: flex; align-items: center; gap: 8px; }
.plansel select { width: auto; min-width: 220px; max-width: 100%; }
.pill { display: inline-flex; align-items: center; font-size: .78rem; font-weight: 600; padding: 4px 12px; border-radius: 999px; background: var(--raise); color: var(--muted); border: 1px solid var(--line); }
.pill.ok { color: var(--ok); background: rgba(76, 195, 138, .1); border-color: rgba(76, 195, 138, .3); }
.pill.bad { color: var(--live); background: var(--live-soft); border-color: rgba(255, 90, 95, .35); }
.pill.is-admin { color: var(--accent-2); background: var(--accent-soft); border-color: rgba(125, 180, 255, .35); }
.clock { font-size: 1.05rem; font-weight: 500; color: var(--muted); padding: 0 4px; }

/* buttons and fields */
.btn {
  background: var(--raise-2); border: 1px solid var(--line); border-radius: 999px; padding: 9px 18px;
  font-weight: 650; font-size: .92rem; transition: background .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.btn:hover { background: rgba(255, 255, 255, .13); border-color: var(--line-2); }
.btn:active { transform: scale(.97); }
.btn.sm { padding: 6px 14px; font-size: .84rem; }
.btn.primary { background: linear-gradient(135deg, var(--accent-2), var(--accent)); color: var(--accent-ink); border-color: transparent; box-shadow: 0 6px 20px -8px rgba(125, 180, 255, .8); }
.btn.primary:hover { filter: brightness(1.06); }
.btn[aria-pressed="true"].arm { background: var(--live); border-color: transparent; color: #1b0507; box-shadow: 0 6px 22px -8px rgba(255, 90, 95, .9); }
.btn.warnbtn { background: var(--live); color: #1b0507; border-color: transparent; }
select, input[type="text"], input[type="date"], input[type="password"], textarea {
  width: 100%; min-width: 0; background: var(--raise); border: 1px solid var(--line); border-radius: var(--r-md); padding: 8px 12px;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
select:hover, input:hover, textarea:hover { border-color: var(--line-2); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); background: rgba(125, 180, 255, .07); }
input[readonly] { color: var(--muted); }
textarea { resize: vertical; }
option { background: var(--panel-solid); }

/* layout */
.app { flex: 1; min-height: 0; display: grid; gap: 12px; padding: 12px; grid-template-columns: minmax(330px, clamp(330px, 28vw, 460px)) minmax(0, 1fr); }
.left, .right {
  display: flex; flex-direction: column; min-height: 0; min-width: 0; overflow: hidden;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-xl);
  -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2);
}
@media (max-width: 860px) {
  body { overflow: auto; }
  .app { grid-template-columns: minmax(0, 1fr); }
  .left { max-height: 62vh; }
  .right { min-height: 76vh; }
  .top { padding-left: 16px; }
}

/* left tabs */
.ltabs { position: relative; display: flex; gap: 4px; margin: 12px 12px 4px; padding: 4px; border-radius: 999px; background: rgba(0, 0, 0, .28); }
.ltab { position: relative; z-index: 1; flex: 1; background: none; border: 0; border-radius: 999px; padding: 8px 10px; font-weight: 700; font-size: .92rem; color: var(--muted); transition: color .25s var(--ease); }
.ltab:hover { color: var(--fg); }
.ltab.on { color: var(--fg); }
/* sliding pill behind the active tab, positioned by slideInd() in app.js */
.ind { position: absolute; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: 999px; background: var(--raise-2); box-shadow: inset 0 0 0 1px var(--line-2); transition: transform .5s var(--ease), width .5s var(--ease); pointer-events: none; }
.tabbar .ind { background: var(--accent-soft); box-shadow: inset 0 0 0 1px rgba(125, 180, 255, .35); }
.nowbar { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 6px 20px 8px; font-size: .86rem; color: var(--muted); }
.nowbar > span { display: inline-flex; align-items: center; gap: 8px; min-width: 0; overflow-wrap: anywhere; }
.nowbar b { color: var(--fg); font-weight: 700; }
.nowbar .n { background: var(--raise); color: var(--live); font-size: .68rem; font-weight: 800; letter-spacing: .09em; padding: 2px 9px; border-radius: 999px; }
.banner { margin: 4px 14px 0; padding: 8px 14px; border-radius: var(--r-md); background: var(--raise); color: var(--muted); font-size: .84rem; }
.lbody { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 12px 14px; }

/* songs */
.songs { display: flex; flex-direction: column; gap: 10px; }
.song { background: var(--raise); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; min-width: 0; transition: background .25s var(--ease), box-shadow .3s var(--ease); }
.song:hover { background: rgba(255, 255, 255, .06); }
.song.is-now { box-shadow: 0 0 0 1.5px rgba(255, 90, 95, .6), 0 12px 34px -12px rgba(255, 90, 95, .45); }
.song-head { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; text-align: left; background: none; border: 0; padding: 14px 14px 10px; }
.song .idx { font-family: var(--font-data); font-size: .82rem; color: var(--muted); }
.song .t { font-weight: 700; font-size: 1.08rem; letter-spacing: -.015em; overflow-wrap: anywhere; display: block; }
.song .d { color: var(--muted); font-size: .86rem; overflow-wrap: anywhere; display: block; }
.keybadge { display: grid; place-items: center; min-width: 54px; height: 54px; padding: 0 8px; border-radius: 17px; font-weight: 800; font-size: 1.55rem; letter-spacing: -.02em; color: var(--accent-2); background: var(--accent-soft); border: 1px solid rgba(125, 180, 255, .28); }
.keybadge.none { color: var(--muted); background: var(--raise); border-color: var(--line); font-size: .82rem; font-weight: 600; }
.ctags { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 14px 52px; }
.ctag { display: inline-flex; align-items: center; gap: 7px; background: rgba(255, 255, 255, .06); border-radius: 999px; padding: 3px 12px 3px 5px; font-size: .82rem; font-weight: 550; }
.ctag i { width: 14px; height: 14px; border-radius: 50%; display: inline-block; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28); }
.ctag.plain { padding-left: 12px; color: var(--muted); }
.editor { border-top: 1px solid var(--line); padding: 14px; display: grid; gap: 14px; background: rgba(0, 0, 0, .16); animation: rise .35s var(--ease); }
.ronotes { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .92rem; margin: 0; }
.cpick { display: flex; flex-wrap: wrap; gap: 6px; }
.cbtn { display: inline-flex; align-items: center; gap: 7px; background: var(--raise); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px 4px 6px; font-size: .84rem; font-weight: 550; transition: background .2s var(--ease), border-color .2s var(--ease); }
.cbtn:hover { border-color: var(--line-2); }
.cbtn i { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3); }
.cbtn[aria-pressed="true"] { border-color: rgba(125, 180, 255, .6); background: var(--accent-soft); font-weight: 700; }
.cbtn[aria-pressed="true"]::after { content: "✓"; font-size: .75rem; color: var(--accent-2); }
.fld { display: grid; gap: 6px; min-width: 0; }
.two { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 12px; }

/* run order */
.run { display: flex; flex-direction: column; gap: 5px; }
.sect { margin: 16px 6px 4px; font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.sect:first-child { margin-top: 4px; }
.row-i { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto auto; gap: 6px; align-items: center; background: var(--raise); border: 1px solid var(--line); border-radius: 14px; padding: 5px 8px; transition: background .25s var(--ease), box-shadow .25s var(--ease); }
.row-i.is-now { background: var(--live-soft); box-shadow: inset 0 0 0 1px rgba(255, 90, 95, .45); }
.row-i input { background: transparent; border-color: transparent; padding: 6px 8px; }
.row-i input:hover, .row-i input:focus { border-color: var(--line-2); background: rgba(0, 0, 0, .2); }
.row-i.ro { grid-template-columns: minmax(0, 1fr) auto; padding: 11px 16px; gap: 12px; }
.row-i .tt { font-weight: 600; overflow-wrap: anywhere; }
.row-i.ro:not(.is-song) .tt { color: var(--muted); font-weight: 500; }
.row-i .kind { font-size: .82rem; font-weight: 700; color: var(--accent-2); }
.mini { background: var(--raise); border: 1px solid transparent; border-radius: 999px; color: var(--muted); padding: 3px 10px; font-size: .78rem; font-weight: 650; transition: color .2s var(--ease), background .2s var(--ease); }
.mini:hover { color: var(--fg); background: var(--raise-2); }
.mini.song-on { color: var(--accent-2); background: var(--accent-soft); }
.mv { display: flex; gap: 3px; }
.addrow { display: flex; gap: 8px; margin-top: 14px; }

/* tabs */
.tabrow { display: flex; align-items: center; gap: 10px; padding: 12px 14px 8px; }
.tabbar { position: relative; display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(0, 0, 0, .28); overflow-x: auto; min-width: 0; max-width: 100%; scrollbar-width: none; }
.tabbar::-webkit-scrollbar { display: none; }
.tabrow > .btn { margin-left: auto; flex: none; }
.tab { position: relative; z-index: 1; background: none; border: 0; border-radius: 999px; padding: 8px 18px; white-space: nowrap; font-weight: 700; font-size: .92rem; color: var(--muted); transition: color .25s var(--ease); }
.tab:hover { color: var(--fg); }
.tab.on { color: var(--accent-2); }
.tab.add { color: var(--accent); padding: 8px 14px; font-size: 1.05rem; line-height: 1; }
.panes { flex: 1; min-height: 0; position: relative; }
.pane { position: absolute; inset: 0; display: flex; flex-direction: column; min-height: 0; }
.pane:not([hidden]) { animation: paneIn .45s var(--ease); }
@keyframes paneIn { from { opacity: 0; transform: translateY(10px) scale(.995); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* resolume */
.rhead { display: flex; align-items: center; gap: 10px; padding: 4px 18px 12px; flex-wrap: wrap; }
.rhead .rstat { flex: 1; min-width: 160px; color: var(--muted); font-size: .86rem; }
.rscroll { flex: 1; min-height: 0; overflow: auto; padding: 0 18px 18px; }
.rgrid { display: grid; gap: 8px; align-items: stretch; }
.lname { align-self: center; font-size: .82rem; color: var(--muted); font-weight: 650; padding-right: 8px; overflow-wrap: anywhere; }
.chead { background: var(--raise); border: 1px solid transparent; border-radius: 10px; padding: 5px; font-size: .76rem; font-weight: 600; color: var(--muted); transition: color .2s var(--ease), background .2s var(--ease); }
.chead:hover { color: var(--fg); background: var(--raise-2); }
.cell { position: relative; padding: 0; background: #000; border: 2px solid transparent; border-radius: 12px; overflow: hidden; aspect-ratio: 16 / 9; min-width: 0; transition: transform .25s var(--ease), box-shadow .3s var(--ease), border-color .2s var(--ease); }
.cell:hover:not(.empty) { transform: translateY(-2px); box-shadow: 0 10px 26px -10px rgba(0, 0, 0, .8); }
.cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cell span { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 8px 4px; font-size: .72rem; font-weight: 600; text-align: left; background: linear-gradient(transparent, rgba(0, 0, 0, .78)); color: #fff; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cell.on { border-color: var(--live); box-shadow: 0 0 0 1px rgba(255, 90, 95, .4), 0 10px 30px -8px rgba(255, 90, 95, .55); }
.cell.empty { background: var(--raise); border: 1px dashed var(--line-2); cursor: default; }
.cell.empty img { display: none; }

/* multiviewer */
.mgrid { display: grid; gap: 12px; padding: 6px 18px 18px; overflow: auto; flex: 1; align-content: start; }
.tile { background: var(--raise); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 8px; display: flex; flex-direction: column; gap: 8px; min-width: 0; transition: box-shadow .3s var(--ease); }
.tile.live { box-shadow: 0 0 0 1.5px rgba(255, 90, 95, .55), 0 12px 32px -14px rgba(255, 90, 95, .5); }
.tile .scr { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 12px; overflow: hidden; }
.tile .scr img, .tile .scr iframe, .tile .scr webview { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.tile .cap { display: flex; justify-content: space-between; gap: 8px; padding: 0 6px 4px; font-size: .86rem; }
.tile .cap b { font-weight: 700; overflow-wrap: anywhere; }
.tile .cap span { color: var(--muted); overflow-wrap: anywhere; text-align: right; }

/* web */
.wbar { display: flex; gap: 8px; padding: 4px 18px 12px; }
.wbar input { flex: 1; border-radius: 999px; padding-inline: 16px; }
.wfill { flex: 1; min-height: 0; position: relative; background: #fff; margin: 0 18px 18px; border-radius: var(--r-lg); overflow: hidden; }
.wfill iframe, .wfill webview { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.wnote { padding: 0 20px 14px; margin-top: -8px; color: var(--muted); font-size: .8rem; }

/* lookbook */
.lgrid { display: grid; gap: 12px; padding: 0 18px 18px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); overflow: auto; flex: 1; align-content: start; }
.lthumb { padding: 0; background: var(--raise); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; text-align: left; display: flex; flex-direction: column; transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.lthumb:hover { transform: translateY(-3px); box-shadow: 0 16px 34px -14px rgba(0, 0, 0, .85); }
.lthumb img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.lthumb span { padding: 8px 12px 10px; font-size: .8rem; color: var(--muted); min-height: 32px; overflow-wrap: anywhere; }
.viewer { position: fixed; inset: 0; z-index: 50; background: rgba(5, 7, 10, .88); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 16px; animation: paneIn .3s var(--ease); }
.viewer img { max-width: 100%; max-height: 78vh; object-fit: contain; border-radius: var(--r-lg); }
.viewer .vrow { display: flex; gap: 8px; width: min(720px, 100%); }
.viewer .vrow input { flex: 1; border-radius: 999px; padding-inline: 16px; }

/* dialogs */
dialog { background: var(--panel-solid); color: var(--fg); border: 1px solid var(--line-2); border-radius: 26px; padding: 0; width: min(660px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; box-shadow: 0 40px 90px -24px rgba(0, 0, 0, .85); }
dialog[open] { animation: dlgIn .35s var(--ease); }
dialog::backdrop { background: rgba(5, 8, 12, .62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
@keyframes dlgIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.dlg { display: grid; gap: 14px; padding: 24px; }
.dlg h2 { margin: 0; font-size: 1.45rem; font-weight: 800; letter-spacing: -.025em; }
.dlg h3 { margin: 10px 0 0; }
.row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.inline { display: grid; gap: 6px; min-width: 0; }
.grow { flex: 1; }
.palette-edit { display: grid; gap: 8px; }
.prow { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.prow input[type="color"] { width: 44px; height: 34px; padding: 2px; border: 1px solid var(--line); border-radius: 10px; background: var(--raise); }
.tilecfg { display: grid; grid-template-columns: 130px minmax(0, 1fr) minmax(0, 1fr) auto; gap: 6px; align-items: center; }
@media (max-width: 560px) { .tilecfg { grid-template-columns: minmax(0, 1fr); } .two { grid-template-columns: minmax(0, 1fr); } }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: rgba(232, 236, 242, .96); color: #0b0e13; padding: 10px 20px; border-radius: 999px; z-index: 60; font-weight: 650; font-size: .9rem; max-width: calc(100vw - 32px); box-shadow: 0 14px 40px -10px rgba(0, 0, 0, .7); animation: rise .3s var(--ease); }

/* read-only bits for viewers */
.readnote { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .92rem; margin: 0; }
.vcap { color: var(--muted); font-size: .92rem; align-self: center; overflow-wrap: anywhere; }
.check { display: flex; align-items: center; gap: 10px; font-size: .92rem; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }

/* the left list staggers in when the plan or tab changes (class toggled by renderLeft) */
.lbody.enter .songs > *, .lbody.enter .run > * { animation: rise .5s var(--ease) both; }
.lbody.enter .songs > :nth-child(2), .lbody.enter .run > :nth-child(2) { animation-delay: .04s; }
.lbody.enter .songs > :nth-child(3), .lbody.enter .run > :nth-child(3) { animation-delay: .08s; }
.lbody.enter .songs > :nth-child(4), .lbody.enter .run > :nth-child(4) { animation-delay: .12s; }
.lbody.enter .songs > :nth-child(5), .lbody.enter .run > :nth-child(5) { animation-delay: .16s; }
.lbody.enter .songs > :nth-child(6), .lbody.enter .run > :nth-child(6) { animation-delay: .2s; }
.lbody.enter .songs > :nth-child(n+7), .lbody.enter .run > :nth-child(n+7) { animation-delay: .24s; }

/* demo pill, sites that can't be framed */
.pill.warn { color: var(--warn); background: rgba(242, 180, 65, .1); border-color: rgba(242, 180, 65, .4); }
.wfill.card { background: var(--raise); border: 1px solid var(--line); display: grid; place-items: center; }
.noframe { display: grid; gap: 12px; justify-items: center; text-align: center; max-width: 440px; padding: 24px; }
.noframe h3 { margin: 0; font-size: 1.4rem; font-weight: 800; letter-spacing: -.02em; }
.noframe .btn { text-decoration: none; display: inline-block; }
.btn.primary, a.btn.primary { color: var(--accent-ink); }

/* lookbook: five rows of main photo, side photo, title, subtitle and green download codes */
:root { --code: #7be0a8; --code-bg: rgba(76, 195, 138, .12); --code-line: rgba(76, 195, 138, .5); }
.lb-scroll { flex: 1; min-height: 0; overflow: auto; padding: 6px 18px 18px; display: flex; flex-direction: column; gap: 16px; }
.lb-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; }
.lb-titles { flex: 1 1 320px; min-width: 0; display: grid; gap: 2px; }
.lb-titles h2 { margin: 0; font-size: clamp(1.4rem, 1.6vw + .9rem, 2rem); font-weight: 800; letter-spacing: -.03em; overflow-wrap: anywhere; }
.lb-titles p { margin: 0; color: var(--muted); overflow-wrap: anywhere; }
input.ghost { background: transparent; border-color: transparent; }
input.ghost:hover { border-color: var(--line-2); }
input.ghost:focus { background: rgba(0, 0, 0, .25); border-color: var(--accent); }
.lb-bt { font-size: 1.5rem; font-weight: 800; letter-spacing: -.03em; padding: 4px 8px; }
.lb-bs { color: var(--muted); padding: 4px 8px; }
.lb-dl { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; color: var(--muted); font-size: .86rem; }
.dlall { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--code); background: var(--code-bg); border: 1px solid var(--code-line); border-radius: 999px; padding: 6px 16px; font-weight: 650; font-size: .86rem; transition: background .2s var(--ease), transform .2s var(--ease); }
.dlall:hover { background: rgba(76, 195, 138, .22); }
.dlall:active { transform: scale(.97); }
.lb-list { display: flex; flex-direction: column; gap: 16px; }
.lb-row { background: var(--raise); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.lb-media { display: grid; grid-template-columns: minmax(0, 2.3fr) minmax(0, 1fr); }
.lb-slot { position: relative; min-width: 0; display: flex; align-items: center; padding: 10px; }
.lb-slot.main { background: #000; }
.lb-slot.side { background: rgba(255, 255, 255, .035); }
.lb-slot.blank { background: rgba(255, 255, 255, .06); }
.lb-slot.main > .lb-img, .lb-slot.main > .lb-add { aspect-ratio: 17 / 6; }
.lb-slot.side > .lb-img, .lb-slot.side > .lb-add { aspect-ratio: 16 / 9; }
.lb-img { display: block; width: 100%; padding: 0; border: 0; background: none; border-radius: 4px; overflow: hidden; }
.lb-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s var(--ease); }
.lb-img:hover img { transform: scale(1.02); }
.lb-add { width: 100%; display: grid; place-content: center; justify-items: center; gap: 4px; background: transparent; border: 1.5px dashed var(--line-2); border-radius: 10px; color: var(--muted); font-weight: 600; transition: border-color .2s var(--ease), color .2s var(--ease), background .2s var(--ease); }
.lb-add:hover { border-color: var(--accent); color: var(--accent-2); background: var(--accent-soft); }
.lb-add .plus { font-size: 1.6rem; line-height: 1; font-weight: 400; }
.lb-tools { position: absolute; top: 18px; right: 18px; display: flex; gap: 6px; opacity: 0; transition: opacity .2s var(--ease); }
.lb-slot:hover .lb-tools, .lb-slot:focus-within .lb-tools { opacity: 1; }
.mini.dark { background: rgba(0, 0, 0, .72); color: #fff; border-color: rgba(255, 255, 255, .2); }
.lb-info { padding: 14px 18px 16px; display: grid; gap: 2px; }
.lb-info .rt { font-weight: 700; font-size: 1.1rem; letter-spacing: -.01em; overflow-wrap: anywhere; }
.lb-info .rs { color: var(--muted); overflow-wrap: anywhere; }
.lb-rt { font-weight: 700; font-size: 1.1rem; padding: 4px 8px; margin-left: -8px; }
.lb-rs { color: var(--muted); padding: 4px 8px; margin-left: -8px; }
.lb-codes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.code { display: inline-block; font-family: var(--font-data); font-weight: 600; font-size: .95rem; color: var(--code); background: var(--code-bg); border: 1px solid var(--code-line); border-radius: 8px; padding: 4px 12px; text-decoration: none; transition: background .2s var(--ease); }
.code:hover { background: rgba(76, 195, 138, .24); }
.codeedit { display: inline-flex; align-items: stretch; background: var(--code-bg); border: 1px solid var(--code-line); border-radius: 8px; overflow: hidden; }
.codeedit input.code-in { width: auto; background: transparent; border: 0; border-radius: 0; padding: 4px 8px 4px 12px; font-family: var(--font-data); font-weight: 600; font-size: .95rem; color: var(--code); min-width: 0; }
.codeedit input.code-in:focus { background: rgba(0, 0, 0, .25); border: 0; }
.codeedit .dl { display: grid; place-items: center; padding: 0 10px; color: var(--code); text-decoration: none; border-left: 1px solid var(--code-line); font-weight: 700; }
.codeedit .dl:hover { background: rgba(76, 195, 138, .24); }
.viewer .code { text-decoration: none; }
@media (max-width: 860px) { .lb-media { grid-template-columns: minmax(0, 1fr); } .lb-tools { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* colour boxes: filled with the colour itself, like the Elvanto plan */
.ctags { gap: 8px; padding: 2px 14px 14px 52px; }
.cbox { display: inline-flex; align-items: center; justify-content: center; min-width: 78px; padding: 8px 16px; border-radius: 9px; font-size: .9rem; font-weight: 750; letter-spacing: -.005em; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18), 0 1px 0 rgba(255, 255, 255, .06); }
.cpick { gap: 8px; }
.cbtn { min-width: 78px; justify-content: center; padding: 8px 16px; border-radius: 9px; border: 2px solid transparent; font-weight: 700; opacity: .42; transition: opacity .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease); }
.cbtn:hover { opacity: .8; border-color: transparent; }
.cbtn.on, .cbtn[aria-pressed="true"] { opacity: 1; background-clip: padding-box; border-color: transparent; box-shadow: 0 0 0 2px var(--bg, #0b1530), 0 0 0 4px rgba(255, 255, 255, .9); transform: translateY(-1px); }
.cbtn.on::after, .cbtn[aria-pressed="true"]::after { content: "✓"; color: inherit; margin-left: 7px; font-size: .82rem; }

/* song leader + references */
.song .lead { display: block; color: var(--accent-2); font-size: .82rem; font-weight: 600; margin-top: 2px; overflow-wrap: anywhere; }
.refs { display: grid; gap: 6px; }
.refrow { display: flex; align-items: center; gap: 8px; }
.ref { flex: 1; min-width: 0; display: inline-flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: var(--raise); border: 1px solid var(--line); color: var(--fg); text-decoration: none; font-weight: 600; font-size: .9rem; overflow-wrap: anywhere; transition: background .2s var(--ease), border-color .2s var(--ease); }
.ref:hover { background: var(--raise-2); border-color: var(--line-2); }
.ref .rk { flex: none; font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-2); background: var(--accent-soft); padding: 2px 8px; border-radius: 999px; }
.refadd { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.refadd input { flex: 1 1 150px; min-width: 0; }

/* runsheet sections and elements */
.sect { display: flex; align-items: center; gap: 8px; }
.sect .cnt { font-weight: 700; color: var(--accent-2); }
.row-i { grid-template-columns: 34px minmax(0, 1fr) auto auto auto; }
.row-i.ro { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.row-i .sub { display: block; color: var(--muted); font-size: .82rem; font-weight: 500; overflow-wrap: anywhere; }
.row-i.ro.t-item .tt, .row-i.ro:not(.is-song) .tt { color: var(--fg); font-weight: 600; }
.row-ed { margin: -2px 0 6px; border-radius: 0 0 14px 14px; overflow: hidden; border: 1px solid var(--line); background: rgba(0, 0, 0, .16); }
.row-ed .editor { border-top: 0; animation: none; }
.tagsel, .tagpill { border-radius: 999px; font-weight: 750; font-size: .78rem; border: 1px solid var(--line-2); }
.tagsel { padding: 4px 26px 4px 12px; width: auto; background-color: var(--raise); }
.tagpill { padding: 3px 11px; }
.t-song .tagsel, .tagsel.t-song, .tagpill.t-song { color: #7db4ff; border-color: rgba(125, 180, 255, .5); background-color: rgba(125, 180, 255, .14); }
.tagsel.t-video, .tagpill.t-video { color: #ff8f8f; border-color: rgba(255, 90, 95, .5); background-color: rgba(255, 90, 95, .13); }
.tagsel.t-speaker, .tagpill.t-speaker { color: #f5d547; border-color: rgba(245, 213, 71, .5); background-color: rgba(245, 213, 71, .12); }
.tagsel.t-admin, .tagpill.t-admin { color: #b995ff; border-color: rgba(185, 149, 255, .5); background-color: rgba(185, 149, 255, .13); }
.tagsel.t-item, .tagpill.t-item { color: var(--muted); }
.addform { margin: 4px 0 6px; }
.addform .addrow { margin-top: 6px; }
.addform .addrow input { flex: 1; min-width: 0; }
.addform .addrow select { width: auto; }
.addsong { display: flex; gap: 8px; margin-top: 6px; }
.addsong[hidden] { display: none; }
.addsong input:first-child { width: 78px; flex: none; }
.addsong input:last-child { flex: 1; min-width: 0; }
.sect-empty { margin: 2px 6px; }
/* admin element rows: title on its own line, tag and tools underneath so the title never gets squeezed */
.row-i:not(.ro) { grid-template-columns: 34px auto auto minmax(0, 1fr) auto; row-gap: 4px; padding: 6px 8px 8px; }
.row-i:not(.ro) > :nth-child(1) { grid-column: 1; grid-row: 1; }
.row-i:not(.ro) > :nth-child(2) { grid-column: 2 / -1; grid-row: 1; }
.row-i:not(.ro) > :nth-child(3) { grid-column: 2; grid-row: 2; }
.row-i:not(.ro) > :nth-child(4) { grid-column: 3; grid-row: 2; }
.row-i:not(.ro) > :nth-child(5) { grid-column: 5; grid-row: 2; justify-self: end; }
.plansel select { min-width: 170px; }

/* launch splash */
#splash { display: none; }
.splash-on #splash { display: grid; place-items: center; position: fixed; inset: 0; z-index: 9999; overflow: hidden; background: #050a14; transition: opacity .9s var(--ease); }
#splash.out { opacity: 0; pointer-events: none; }
.sp-bg { position: absolute; inset: -6%; background: url(splash.jpg) center / cover no-repeat; filter: blur(20px) saturate(1.1) brightness(.62); transform: scale(1.06); }
.sp-shade { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 50%, rgba(5, 10, 22, .55), rgba(5, 10, 22, .15) 70%); }
.sp-mark { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0; padding: 0 24px; animation: spIn 1.1s var(--ease) both; }
.sp-logo { width: 58px; height: 58px; border-radius: 19px; margin-bottom: 22px; background: linear-gradient(135deg, var(--accent-2), var(--accent) 55%, #4d7dff); box-shadow: 0 0 46px rgba(125, 180, 255, .75), 0 0 110px rgba(125, 180, 255, .35); }
.sp-mark h1 { margin: 0; font-family: var(--font); font-weight: 800; letter-spacing: -.035em; font-size: clamp(64px, 11vw, 140px); line-height: 1; color: #fff; text-shadow: 0 6px 50px rgba(0, 0, 0, .45); }
.sp-mark p { margin: 18px 0 0; font-weight: 500; letter-spacing: .03em; font-size: clamp(14px, 1.7vw, 22px); color: #e3edfb; text-shadow: 0 2px 22px rgba(0, 0, 0, .55); }
@keyframes spIn { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }

/* service title box */
.titlebox { margin: 0 12px; padding: 10px 22px 12px; border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(14px); display: flex; flex-direction: column; gap: 2px; }
.titlebox[hidden] { display: none; }
.titlebox .tb-t { font-size: 1.45rem; font-weight: 800; letter-spacing: -.025em; color: var(--fg); line-height: 1.2; overflow-wrap: anywhere; }
.titlebox .tb-s { font-size: .95rem; font-weight: 500; color: var(--muted); overflow-wrap: anywhere; }
.titlebox input.tb-t, .titlebox input.tb-s { width: 100%; background: transparent; border: 1px solid transparent; border-radius: 10px; padding: 2px 8px; margin-left: -8px; width: calc(100% + 16px); font-family: inherit; }
.titlebox input.tb-t { font-size: 1.45rem; font-weight: 800; letter-spacing: -.025em; color: var(--fg); }
.titlebox input.tb-s { font-size: .95rem; font-weight: 500; color: var(--muted); }
.titlebox input.tb-t:hover, .titlebox input.tb-s:hover { background: var(--raise); }
.titlebox input.tb-t:focus, .titlebox input.tb-s:focus { background: var(--raise); border-color: var(--accent); outline: none; }
.titlebox input::placeholder { color: rgba(147, 160, 178, .6); font-weight: 500; }

/* Now / Next stepper box */
.nowbar { display: block; padding: 4px 14px 10px; }
.stepper { display: grid; gap: 10px; padding: 14px; border-radius: var(--r-lg); background: var(--raise); border: 1px solid var(--line-2); }
.stepper.live { border-color: rgba(255, 90, 95, .45); box-shadow: 0 0 0 1px rgba(255, 90, 95, .12), 0 8px 30px rgba(255, 90, 95, .08); }
.stepper .st-line, .stepper .st-idle { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.stepper .n { flex: none; min-width: 52px; text-align: center; background: var(--raise-2); color: var(--muted); font-size: .68rem; font-weight: 800; letter-spacing: .09em; padding: 3px 9px; border-radius: 999px; margin-top: 2px; }
.stepper .n.now { background: var(--live-soft); color: var(--live); }
.stepper .n.next { background: var(--accent-soft); color: var(--accent); }
.stepper .st-t { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.stepper .st-t b { font-size: 1.1rem; font-weight: 800; letter-spacing: -.015em; color: var(--fg); line-height: 1.25; }
.stepper .st-s { font-size: .78rem; color: var(--muted); font-weight: 500; }
.stepper .st-msg { color: var(--muted); font-size: .92rem; padding-top: 1px; }
.stepper .st-count { font-size: .74rem; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.stepper .st-btns { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; }
.stepper .st-btns .btn { min-height: 44px; justify-content: center; font-size: .95rem; font-weight: 750; }
.stepper .btn:disabled { opacity: .4; cursor: default; }
.stepper .st-go { min-height: 44px; justify-content: center; font-weight: 800; background: var(--live); border-color: var(--live); color: #fff; }
.stepper .st-end { justify-self: end; }
.btn.warnbtn { background: var(--live-soft); border-color: var(--live); color: var(--live); }

/* title box centred */
.titlebox { align-items: center; text-align: center; }
.titlebox .tb-t, .titlebox .tb-s { text-align: center; }
.titlebox input.tb-t, .titlebox input.tb-s { text-align: center; margin-left: 0; width: 100%; max-width: 900px; }

/* lookbook: extra files beside the photos */
.code .ext, .codeedit .ext { font-weight: 600; font-size: .72em; opacity: .75; margin-left: 5px; letter-spacing: .02em; }
.codeedit .ext { align-self: center; color: inherit; }
.lb-codes .addfile { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; border: 1px dashed var(--line-2); background: transparent; color: var(--muted); font: inherit; font-size: .85rem; font-weight: 650; cursor: pointer; transition: color .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease); }
.lb-codes .addfile:hover { color: var(--fg); border-color: var(--accent); background: var(--accent-soft); }
.codeedit .dl.rm { font-size: 1.05rem; line-height: 1; }
.codeedit .dl.rm.warnbtn { font-size: .78rem; padding: 0 8px; width: auto; }
.codeedit .ext { color: var(--code); }
.codeedit .ext { padding: 0 8px 0 0; display: inline-flex; align-items: center; margin-left: 0; }

/* public lookbook page (share links and exported website) */
body.share { height: auto; min-height: 100%; overflow: auto; display: block; }
.share-top { position: sticky; top: 12px; z-index: 5; max-width: 1180px; margin: 12px auto 0; }
.share-main { max-width: 1180px; margin: 12px auto 40px; padding: 0 12px; }
.share .lb-scroll { overflow: visible; padding: 6px 6px 18px; }
.share .lb-row.nophoto .lb-info { padding-top: 16px; }
.share-gone { text-align: center; padding: 18vh 16px; }
.share-gone h2 { margin: 0 0 8px; font-size: 1.6rem; font-weight: 800; letter-spacing: -.03em; }
.share-gone p { color: var(--muted); margin: 0; }
@media (max-width: 560px) { .share-top { margin: 8px 8px 0; top: 8px; } .share-main { padding: 0 8px; } .lb-info { padding: 12px 14px 14px; } }
.lb-share { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.lb-share .btn { text-decoration: none; }
.sharebody { display: grid; gap: 12px; }
.sharebody .row input { flex: 1; min-width: 0; }
.note.warn { color: var(--warn); }
@media all { .share .lb-media.one { grid-template-columns: minmax(0, 1fr); } }
