/* Juicy LRC Studio – dark studio look: glass panels, hairlines, one juicy gradient */
:root {
	--bg: #0b0b10;
	--bg-raise: #121219;
	--panel: rgba(255, 255, 255, 0.035);
	--panel-solid: #14141c;
	--field: rgba(0, 0, 0, 0.35);
	--line: rgba(255, 255, 255, 0.08);
	--line-hi: rgba(255, 255, 255, 0.14);
	--text: #d9d9e3;
	--text-hi: #ffffff;
	--dim: #858599;
	--ink: #120d14;
	--accent: #ff9a5c;
	--grad: linear-gradient(120deg, #ffbf5f 0%, #ff7a6b 38%, #ff4f9a 68%, #9b6bff 100%);
	--sung: #ffc861;
	--cursor: #4fd1ff;
	--err: #ff5476;
	--warn: #ffad42;
	--ok: #3ddc97;
	--mark: #a9a9c0;
	--lane: #5f5f7a;
	--wave: #2c2b3d;
	--bgv: #b69bff;
	--bgv-dim: #4d4570;
	--play: #ff4f9a;
	--radius: 14px;
	--shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 20px 50px -20px rgba(0, 0, 0, 0.7);
	--font: "Segoe UI Variable Text", -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, system-ui, sans-serif;
	--font-display: "Segoe UI Variable Display", -apple-system, BlinkMacSystemFont, "SF Pro Display", Inter, system-ui, sans-serif;
	--mono: "Cascadia Code", "SF Mono", ui-monospace, Consolas, monospace;
	color-scheme: dark;
}

* { box-sizing: border-box; }

body {
	margin: 0;
	background:
		radial-gradient(900px 520px at -8% -18%, rgba(255, 95, 143, 0.13), transparent 62%),
		radial-gradient(800px 480px at 108% -12%, rgba(155, 107, 255, 0.13), transparent 60%),
		radial-gradient(700px 500px at 50% 120%, rgba(255, 170, 90, 0.06), transparent 60%),
		var(--bg);
	color: var(--text);
	font: 14px/1.45 var(--font);
	-webkit-font-smoothing: antialiased;
	height: 100vh;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

::selection { background: rgba(255, 79, 154, 0.35); }

.grad {
	background: var(--grad);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

/* ---------------------------------------------------------------- controls */
button, input, textarea { font: inherit; color: inherit; }

button {
	height: 32px;
	padding: 0 12px;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid var(--line);
	border-radius: 9px;
	cursor: pointer;
	white-space: nowrap;
	transition: background 0.15s, border-color 0.15s, transform 0.08s, box-shadow 0.15s;
}

button:hover { background: rgba(255, 255, 255, 0.09); border-color: var(--line-hi); }
button:active { transform: scale(0.97); }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--cursor); outline-offset: 2px; }
button.on { background: var(--accent); color: var(--ink); border-color: transparent; font-weight: 600; }
button.wide { min-width: 44px; }
button.icon { width: 32px; padding: 0; font-size: 15px; }

button.primary {
	background: var(--grad);
	color: #fff;
	border-color: transparent;
	font-weight: 600;
	text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
	box-shadow: 0 6px 18px -8px rgba(255, 79, 154, 0.8);
}

button.primary:hover { filter: brightness(1.08); background: var(--grad); }

input:not([type]), input[type=number] {
	height: 28px;
	background: var(--field);
	border: 1px solid var(--line);
	border-radius: 8px;
	padding: 0 8px;
	transition: border-color 0.15s;
}

input:not([type]):hover, input[type=number]:hover { border-color: var(--line-hi); }
input[type=number] { width: 68px; font-variant-numeric: tabular-nums; }

/* checkboxes as small switches */
input[type=checkbox] {
	appearance: none;
	-webkit-appearance: none;
	flex: none;
	width: 30px;
	height: 18px;
	margin: 0;
	border-radius: 99px;
	background: rgba(255, 255, 255, 0.12);
	position: relative;
	cursor: pointer;
	transition: background 0.2s;
}

input[type=checkbox]::before {
	content: "";
	position: absolute;
	top: 2px;
	left: 2px;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
	transition: transform 0.2s cubic-bezier(0.3, 1.4, 0.5, 1);
}

input[type=checkbox]:checked { background: var(--grad); }
input[type=checkbox]:checked::before { transform: translateX(12px); }

kbd, code {
	font: 12px var(--mono);
	background: rgba(255, 255, 255, 0.07);
	border: 1px solid var(--line);
	padding: 0 4px;
	border-radius: 5px;
}

/* ---------------------------------------------------------------- header */
header {
	position: relative;
	z-index: 5;
	display: flex;
	flex-wrap: wrap;
	gap: 10px 18px;
	align-items: center;
	padding: 10px 16px;
	background: rgba(11, 11, 16, 0.72);
	backdrop-filter: blur(20px) saturate(1.4);
	-webkit-backdrop-filter: blur(20px) saturate(1.4);
	border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 8px; font: 600 16px var(--font-display); letter-spacing: -0.01em; color: var(--text-hi); }
.brand img { width: 34px; height: 34px; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(255, 79, 154, 0.35)); }
.brand b { font-weight: 800; }

header .group { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
/* first row: the file buttons sit right next to the logo and wrap there, so the logo never gets a row of its own
   (room on the right for ⌃) */
header .files { flex: 1 1 0; min-width: 0; padding-right: 34px; }
.brand { flex-shrink: 0; }
/* second row: transport centred, ↶ ↷ ⚙ ? on the right of the same row */
header .bar { flex-basis: 100%; display: grid; grid-template-columns: auto auto 1fr; gap: 12px; align-items: center; }
header .transport { justify-content: center; }
header .tools { justify-self: end; flex-wrap: nowrap; }
header .checks { justify-self: start; flex-wrap: nowrap; }
header .checks button { font-size: 12.5px; padding: 0 10px; }
header .sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
header .songnav { display: flex; gap: 6px; align-items: center; }
header .songnav[hidden] { display: none; }
#songSel {
	height: 32px; max-width: 260px; padding: 0 8px; font: inherit; color: inherit; cursor: pointer;
	background: var(--field); border: 1px solid var(--line); border-radius: 9px;
}
#songSel option { background: var(--bg-raise); color: var(--text); }
button.done { border-color: var(--ok); color: var(--ok); font-weight: 600; }
button.done:hover { background: var(--ok); color: var(--ink); }

/* ---------------------------------------------------------------- party after 🎉 Fertig */
.party {
	position: fixed; inset: 0; z-index: 89; display: grid; place-items: center; cursor: pointer;   /* under #fx: bubbles fly over it */
	background: radial-gradient(circle at 50% 45%, rgba(155, 123, 255, 0.25), rgba(5, 5, 9, 0.55) 60%);
	animation: rise 0.3s ease-out;
}
.party.out { opacity: 0; transition: opacity 0.5s; }
.party-card {
	text-align: center; padding: 28px 40px; border-radius: 22px; max-width: min(520px, calc(100vw - 32px));
	background: var(--bg-raise); border: 1px solid var(--line-hi); box-shadow: 0 20px 80px rgba(0, 0, 0, 0.6);
	animation: party-in 0.7s cubic-bezier(0.2, 1.5, 0.4, 1);
}
.party-card h2 { margin: 6px 0 8px; font: 700 32px var(--font-display); color: var(--text-hi); }
.party-card p { margin: 0; color: var(--dim); }
.party-emoji { font-size: 64px; animation: party-wiggle 0.6s ease-in-out infinite alternate; }
@keyframes party-in { from { opacity: 0; transform: scale(0.4) rotate(-8deg); } to { opacity: 1; transform: none; } }
@keyframes party-wiggle { from { transform: rotate(-12deg) scale(1); } to { transform: rotate(12deg) scale(1.12); } }
header label { display: flex; gap: 6px; align-items: center; color: var(--dim); font-size: 13px; }
.label { color: var(--dim); margin-left: 6px; }

#btnPlay {
	width: 40px;
	height: 40px;
	padding: 0;
	border-radius: 50%;
	border: 0;
	background: var(--grad);
	color: #fff;
	font-size: 14px;
	box-shadow: 0 8px 22px -8px rgba(255, 79, 154, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.12) inset;
}

#btnPlay:hover { filter: brightness(1.1); }
#btnLoopMode { width: 34px; height: 34px; border-radius: 50%; font-size: 17px; }
#btnLoopMode.on { background: var(--ok); color: var(--ink); border-color: transparent; box-shadow: 0 6px 18px -8px var(--ok); }

#clock {
	font: 500 13px var(--mono);
	font-variant-numeric: tabular-nums;
	min-width: 160px;
	white-space: nowrap;
	text-align: center;
	padding: 6px 10px;
	border-radius: 9px;
	background: var(--field);
	border: 1px solid var(--line);
	color: var(--text-hi);
}

/* tempo as a segmented control */
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 11px; background: var(--field); border: 1px solid var(--line); }
.seg button { height: 26px; padding: 0 10px; border: 0; background: transparent; border-radius: 8px; color: var(--dim); font-size: 12.5px; }
.seg button:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.seg button.on { background: rgba(255, 255, 255, 0.14); color: var(--text-hi); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4); }

#fileInfo { color: var(--dim); font-size: 12px; flex-basis: 100%; }
#fileInfo:empty { display: none; }

/* settings popover */
#settings {
	position: fixed;
	inset: 62px 16px auto auto;
	margin: 0;
	width: 330px;
	max-height: calc(100vh - 80px);
	overflow: auto;
	padding: 14px 16px 16px;
	color: var(--text);
	background: rgba(22, 22, 31, 0.92);
	backdrop-filter: blur(24px);
	-webkit-backdrop-filter: blur(24px);
	border: 1px solid var(--line-hi);
	border-radius: 16px;
	box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.8);
}

#settings h3 { margin: 0 0 6px; font: 600 15px var(--font-display); }
#settings h4 { margin: 12px 0 2px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--dim); }
.set-grid { display: flex; flex-direction: column; gap: 2px; }
.set-grid label { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 5px 0; color: var(--text); font-size: 13px; }
.set-grid label:has(> input[type=checkbox]) { flex-direction: row-reverse; }
.set-grid label > span { display: flex; align-items: center; gap: 6px; color: var(--dim); }

#draft {
	padding: 8px 16px;
	background: rgba(255, 173, 66, 0.1);
	border-bottom: 1px solid rgba(255, 173, 66, 0.35);
	display: flex;
	align-items: center;
	gap: 8px;
}

#draft[hidden] { display: none; }

/* ---------------------------------------------------------------- stage: preview + timeline */
#stage { padding: 12px 16px 0; }

/* lyrics preview: height from its splitter, font sizes from fitPreview */
#preview {
	height: 96px;
	text-align: center;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 2px;
	padding: 4px 0 6px;
	overflow: hidden;
}

#pvCur, #pvNext { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 8px; }
#pvCur { font: 700 32px/1.15 var(--font-display); letter-spacing: -0.02em; color: var(--text-hi); }
#pvNext { font-size: 17px; line-height: 1.3; color: var(--dim); }
#pvNext[hidden] { display: none; }

#pvCur span {
	background-image: linear-gradient(90deg, var(--sung) 0%, var(--sung) var(--p, 0%), #fff var(--p, 0%), #fff 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

canvas {
	display: block;
	width: 100%;
	border-radius: 12px;
	background: linear-gradient(180deg, #0d0d14, #09090e);
	box-shadow: 0 0 0 1px var(--line), 0 1px 0 rgba(255, 255, 255, 0.03) inset;
}

#overview { margin: 0 0 8px; cursor: pointer; border-radius: 9px; }
#timeline { cursor: crosshair; }

/* mode bar under the timeline: "Ansehen" (nothing changes) or "Bearbeiten: Zeile n" */
#modeBar {
	display: flex;
	gap: 8px;
	align-items: center;
	padding: 6px 8px 6px 14px;
	border-radius: 12px;
	background: var(--panel);
	border: 1px solid var(--line);
	font-size: 13px;
	transition: background 0.2s, border-color 0.2s;
}

#modeText { flex: 1; }
#modeText span { color: var(--dim); margin-left: 6px; }
#modeBar.on { background: rgba(79, 209, 255, 0.1); border-color: rgba(79, 209, 255, 0.5); }
#modeBar.on #modeText b { color: var(--cursor); }
#btnEdit { background: var(--cursor); color: var(--ink); border-color: transparent; font-weight: 600; }
#btnOk { background: var(--ok); color: var(--ink); border-color: transparent; font-weight: 600; }
body.editing #timeline { box-shadow: 0 0 0 2px var(--cursor), 0 0 30px -6px rgba(79, 209, 255, 0.5); }

/* splitters: grip under the timeline (height), bar left of the side panel (width); double click = default */
.split { flex: none; position: relative; touch-action: none; user-select: none; }
.split::after { content: ''; position: absolute; border-radius: 3px; background: var(--line-hi); transition: background 0.15s; }
.split:hover::after, .split.drag::after { background: var(--cursor); }
.split.h { height: 10px; cursor: row-resize; }
.split.h::after { left: calc(50% - 28px); width: 56px; top: 3px; height: 4px; }
.split.v { width: 14px; cursor: col-resize; }
.split.v::after { top: calc(50% - 28px); height: 56px; left: 5px; width: 4px; }
body.resizing, body.resizing * { user-select: none; }
body.rs-y, body.rs-y * { cursor: row-resize !important; }
body.rs-x, body.rs-x * { cursor: col-resize !important; }

/* ---------------------------------------------------------------- main: word list + side panel */
main {
	flex: 1;
	min-height: 0;
	display: flex;
	padding: 12px 16px 16px;
}
body.side-left main { flex-direction: row-reverse; }      /* ⇆: side panel left of the word list */

#editor { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.tabs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.tab { border-color: transparent; background: transparent; color: var(--dim); }
.tab.active { background: rgba(255, 255, 255, 0.09); border-color: var(--line); color: var(--text-hi); }
#hint { flex-basis: 100%; color: var(--dim); font-size: 12.5px; padding: 2px 2px 0; }
#hint:empty { display: none; }
#btnLoop.on { background: var(--ok); color: var(--ink); border-color: transparent; }
#btnRepair.on { background: var(--accent); color: var(--ink); }
#btnSyl.on { background: var(--accent); color: var(--ink); border-color: transparent; }

#words, #raw, aside {
	background: var(--panel);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
}

#words, #raw {
	flex: 1;
	min-height: 0;
	overflow: auto;
	padding: 8px;
}

#words { padding-top: 26px; }               /* room for the swap suggestion over the words of the first line */
#raw { display: flex; flex-direction: column; gap: 8px; }
#raw[hidden] { display: none; }
#rawApply { align-self: flex-end; }

#rawText {
	flex: 1;
	width: 100%;
	background: var(--field);
	border: 1px solid var(--line);
	border-radius: 10px;
	padding: 10px 12px;
	font: 13px/1.6 var(--mono);
	resize: none;
}

.line {
	position: relative;
	display: flex;
	gap: 10px;
	align-items: flex-start;
	padding: 6px 8px;
	border-radius: 10px;
	transition: background 0.15s, opacity 0.2s;
}

.line:hover { background: rgba(255, 255, 255, 0.025); }
.line.playing { background: rgba(255, 200, 97, 0.06); }
.line.picked { box-shadow: inset 3px 0 0 var(--cursor); background: rgba(79, 209, 255, 0.07); }
.line.cur { background: rgba(79, 209, 255, 0.07); box-shadow: inset 3px 0 0 var(--cursor); }
.line.repair { box-shadow: inset 3px 0 0 var(--accent); }
.line.repair .tok.unset small { color: #6f7590; }
.line.brk { color: var(--dim); font-style: italic; }
.line.editing { box-shadow: inset 3px 0 0 var(--cursor), 0 0 0 1px rgba(79, 209, 255, 0.25); background: rgba(79, 209, 255, 0.08); }
body.editing .line:not(.editing) { opacity: 0.32; }

.ln {
	width: 74px;
	flex: none;
	cursor: pointer;
	user-select: none;
	color: var(--dim);
	font: 11.5px var(--mono);
	font-variant-numeric: tabular-nums;
	padding-top: 5px;
}

.ln .tools { visibility: hidden; display: inline-flex; gap: 2px; }
.line:hover .ln .tools { visibility: visible; }
.ln .tools button { height: 20px; padding: 0 5px; font-size: 11px; border-radius: 6px; }

.toks { display: flex; flex-wrap: wrap; row-gap: 6px; }

.tok, .endmark {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	padding: 2px 7px;
	margin-right: 5px;
	border-radius: 8px;
	border: 1px solid transparent;
	cursor: pointer;
	user-select: none;
	transition: background 0.12s, border-color 0.12s;
}

.tok:hover, .endmark:hover { background: rgba(255, 255, 255, 0.06); }
.tok, .endmark { position: relative; }
/* small buttons on a word: × delete (faint, clear on hover), + add a word after it (on hover), ✓ take a line end */
.tx, .tadd, .tok-ok {
	position: absolute;
	display: grid;
	place-items: center;
	width: 15px;
	height: 15px;
	border-radius: 50%;
	font: bold 11px/1 var(--font);
	cursor: pointer;
	z-index: 2;
}
.tx { top: -6px; right: -6px; background: var(--panel-solid); color: var(--dim); border: 1px solid var(--line-hi); opacity: 0; transition: opacity 0.12s; }
.tok:hover .tx, .tok.sel .tx { opacity: 1; }
.tx:hover { background: var(--err); color: var(--ink); border-color: transparent; }
.tadd { top: 50%; right: -12px; transform: translateY(-50%); background: var(--ok); color: var(--ink); visibility: hidden; }
.tok:hover .tadd { visibility: visible; }
.tadd:hover { filter: brightness(1.2); }
.tok-ok { top: -6px; right: -6px; background: var(--ok); color: var(--ink); }
/* suggestion from the original over a word (on hover): a click swaps, on a swapped word it swaps back */
.tsug {
	position: absolute;
	bottom: calc(100% - 3px);
	left: 50%;
	transform: translateX(-50%);
	padding: 3px 9px;
	border-radius: 9px;
	background: #ff4f9a;
	color: var(--ink);
	font: bold 13px/1.2 var(--font);
	white-space: nowrap;
	cursor: pointer;
	z-index: 3;
	visibility: hidden;
	box-shadow: 0 6px 16px -6px rgba(0, 0, 0, 0.7);
}
/* syllable suggestion: orange dots where the word could be split, ✂ in the corner splits it */
.sdot { position: relative; color: var(--accent); font-style: normal; font-weight: 700; margin: 0 1px; padding: 0 2px; cursor: pointer; }
.sdot:hover { color: var(--text-hi); }
.sdot:hover::after {                       /* ✂ under the dot: a click splits the word just here */
	content: '✂';
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%);
	display: grid;                         /* same round badge as the ✂ that splits the whole word */
	place-items: center;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--accent);
	color: var(--ink);
	font: 400 10px/1 var(--font);
	z-index: 4;
}
.tsyl {
	position: absolute;
	top: -6px;
	left: -6px;
	display: grid;
	place-items: center;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--accent);
	color: var(--ink);
	font: 10px/1 var(--font);
	cursor: pointer;
	z-index: 2;
}
.tsyl:hover { filter: brightness(1.2); transform: scale(1.15); }
.tsug.back { background: var(--panel-solid); color: var(--text); border: 1px solid var(--line-hi); font-weight: 600; }
.tok:hover .tsug { visibility: visible; }
.tsug:hover { filter: brightness(1.15); }
.tok-ok:hover { filter: brightness(1.2); }
.tok.glue { margin-left: -5px; border-left: 1px dashed #555a6a; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.tok .w { font-size: 16px; color: var(--text-hi); }
.tok small, .endmark small { font: 10px var(--mono); color: var(--dim); font-variant-numeric: tabular-nums; }
.tok.unset .w { color: var(--dim); }
.tok.sung .w { color: var(--sung); }
.tok.now { background: rgba(255, 200, 97, 0.14); }
.tok.err, .endmark.err { background: rgba(255, 84, 118, 0.14); border-color: var(--err); }
.tok.warn { border-color: rgba(255, 173, 66, 0.7); }
.tok.sel, .endmark.sel { outline: 2px solid var(--cursor); outline-offset: 0; background: rgba(79, 209, 255, 0.1); }

.endmark { color: var(--ok); font-size: 12px; }
.endmark.missing { color: var(--warn); border: 1px dashed var(--warn); }
.endmark.auto { color: var(--dim); opacity: 0.4; }

/* empty word list */
.empty { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 14px 16px; text-align: center; color: var(--dim); }
.empty img { width: 92px; height: 92px; object-fit: contain; animation: bob 3.2s ease-in-out infinite; filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.5)); }
.empty .steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; width: min(760px, 100%); text-align: left; }
.empty .steps div { padding: 12px 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.035); border: 1px solid var(--line); color: var(--text); font-size: 13px; }
.empty .steps i {
	display: inline-grid;
	place-items: center;
	width: 20px;
	height: 20px;
	margin-right: 8px;
	border-radius: 50%;
	background: var(--grad);
	color: #fff;
	font: 700 11px var(--font);
}
.empty p { margin: 0; font-size: 12.5px; }

/* side panel */
aside {
	width: 340px;
	flex: none;
	overflow: auto;
	padding: 4px 14px 14px;
}

.side-top { display: flex; justify-content: flex-end; gap: 4px; margin: 6px -6px -30px 0; position: relative; z-index: 1; pointer-events: none; }
.side-top button { pointer-events: auto; height: 24px; min-width: 24px; padding: 0 6px; font-size: 13px; color: var(--dim); }
.side-top button:hover { color: var(--text-hi); }
#sideMini { display: none; }

/* help open (?): the side panel folds up to full height on the right, the stage and word list make room */
@media (min-width: 681px) {
	body.help-open aside {
		position: fixed;
		top: var(--help-top, 120px);
		right: 16px;
		bottom: 16px;
		width: 400px !important;
		z-index: 6;
		background: var(--panel-solid);
		animation: help-up 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.1);
	}
	body.help-open #stage, body.help-open main { margin-right: 416px; }
	body.help-open main { padding-right: 0; }
	body.help-open .side-top, body.help-open #splitSide { display: none; }
}
@keyframes help-up {
	from { transform: translateY(35%); opacity: 0.3; }
	to { transform: none; opacity: 1; }
}

/* folded side panel: a narrow strip with error counts and a map of where in the song they are */
@media (min-width: 681px) {
	body.side-mini aside { width: 46px !important; padding: 6px 5px; display: flex; flex-direction: column; overflow: hidden; }
	body.side-mini aside > :not(.side-top):not(#sideMini) { display: none !important; }
	body.side-mini .side-top { flex-direction: column; align-items: center; margin: 0 0 8px; }
	body.side-mini #splitSide { visibility: hidden; width: 10px; }
	body.side-mini #sideMini { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; min-height: 0; }
}
#miniBadges { display: flex; flex-direction: column; gap: 5px; align-items: center; }
.mb {
	min-width: 30px;
	height: 22px;
	padding: 0 5px;
	border-radius: 11px;
	display: grid;
	place-items: center;
	font: 700 11px var(--font);
	font-variant-numeric: tabular-nums;
	color: var(--ink);
	cursor: default;
}
.mb.err { background: var(--err); }
.mb.warn { background: var(--warn); }
.mb.unset { background: #5d5d72; color: var(--text-hi); }
.mb.ref { background: var(--bgv); }
.mb.ok { background: var(--ok); }
#miniMap { position: relative; flex: 1; width: 14px; min-height: 60px; border-radius: 7px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); cursor: pointer; }
#miniMap i { position: absolute; left: 1px; right: 1px; min-height: 3px; border-radius: 2px; }
#miniMap i:hover { left: -3px; right: -3px; }
#miniMap i.err { background: var(--err); z-index: 3; }
#miniMap i.warn { background: var(--warn); z-index: 2; }
#miniMap i.unset { background: #5d5d72; }
#miniMap i.ref { background: var(--bgv); z-index: 1; }

aside h3 { margin: 14px 0 8px; font: 600 11px var(--font); text-transform: uppercase; letter-spacing: 0.08em; color: var(--dim); }
#sum { font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--text); margin-left: 4px; }
#meta { display: grid; gap: 6px; }
#meta[hidden] { display: none; }
/* Song heading as a fold button: ▾ open, ▸ folded with artist – title · status next to it */
aside h3 .fold {
	height: auto;
	padding: 2px 4px 2px 0;
	margin-left: -2px;
	display: flex;
	align-items: baseline;
	gap: 6px;
	width: 100%;
	min-width: 0;
	background: none;
	border: 0;
	font: inherit;
	letter-spacing: inherit;
	text-transform: inherit;
	color: inherit;
	text-align: left;
}
aside h3 .fold:hover { color: var(--text-hi); background: none; }
aside h3 .fold:active { transform: none; }
.fold .arr { display: inline-block; width: 14px; font-size: 15px; line-height: 1; color: var(--text); transition: transform 0.15s; }
.fold.closed .arr { transform: rotate(-90deg); }
#metaSum {
	display: none;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-weight: 500;
	text-transform: none;
	letter-spacing: 0;
	color: var(--text);
}
.fold.closed #metaSum { display: block; }
#meta label { display: grid; grid-template-columns: 92px 1fr; align-items: center; color: var(--dim); font-size: 13px; }
#meta input { min-width: 0; }
.fixes { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.fixes button { font-size: 12.5px; }

.issue {
	padding: 5px 8px;
	border-left: 3px solid var(--dim);
	border-radius: 0 8px 8px 0;
	margin: 3px 0;
	cursor: pointer;
	font-size: 13px;
	background: rgba(255, 255, 255, 0.02);
	transition: background 0.12s;
}

.issue:hover { background: rgba(255, 255, 255, 0.06); }
.issue.err { border-color: var(--err); }
.issue.warn { border-color: var(--warn); }
.issue b { font-weight: 600; }
.issue.rd { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; border-color: #ff4f9a; }
.issue.rd.miss { border-color: var(--cursor); }
.issue.rd.extra { border-color: var(--warn); }
.issue.rd.nomatch { border-color: var(--dim); color: var(--dim); }
.issue.rd button { font-size: 11.5px; padding: 2px 8px; }
.issue.rd .skip { margin-left: auto; background: none; border-color: transparent; color: var(--dim); }

/* differences to the original lyrics in the word list: wrong word pink, extra word struck out, + where one is missing */
.tok.rd-sub { border-color: #ff4f9a; background: rgba(255, 79, 154, 0.14); }
.tok.rd-sub .w { color: #ff9ccb; }
.tok.rd-extra { border-color: var(--warn); border-style: dashed; }
.tok.rd-extra .w { text-decoration: line-through var(--warn) 2px; }
.tok.rd-miss, .tok.rd-miss-after { position: relative; }
.tok.rd-miss::before, .tok.rd-miss-after::after {
	position: absolute; top: -7px; width: 16px; height: 16px; border-radius: 50%;
	content: '+'; font: 700 12px/16px var(--font); text-align: center; color: var(--ink); background: var(--cursor);
}
.tok.rd-miss::before { left: -10px; }
.tok.rd-miss-after::after { right: -10px; }

/* what the mouse and a few keys do in the timeline */
#legend { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 2px 4px 6px; font-size: 11.5px; color: var(--dim); }
#legend kbd { font: 600 10.5px var(--font); color: var(--text); background: var(--field); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; margin-right: 3px; }

#help table { border-collapse: collapse; font-size: 12px; }
.tour-tip { margin: 0 0 6px; font-size: 12px; color: var(--dim); }
#tour, .steps-help { margin: 0 0 6px; padding-left: 20px; font-size: 12.5px; }
#tour li, .steps-help li { padding: 4px 4px 5px; }
#tour li { border-radius: 8px; cursor: help; transition: background 0.15s; }
#tour li:hover { background: rgba(79, 209, 255, 0.08); }
#tour li::marker, .steps-help li::marker { color: var(--accent); font-weight: 700; }
/* area of the tour entry under the mouse */
.tour-hl { outline: 2px solid var(--cursor) !important; outline-offset: 3px; box-shadow: 0 0 0 6px rgba(79, 209, 255, 0.15), 0 0 40px -6px rgba(79, 209, 255, 0.6) !important; border-radius: 12px; }
#help td { padding: 5px 4px; vertical-align: top; border-top: 1px solid var(--line); }
#help td:first-child { white-space: nowrap; font-weight: 600; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
#help p { font-size: 12px; color: var(--dim); }
#help a { color: var(--cursor); }

/* ---------------------------------------------------------------- dialogs */
dialog {
	background: rgba(22, 22, 31, 0.96);
	color: var(--text);
	border: 1px solid var(--line-hi);
	border-radius: 18px;
	padding: 20px 22px;
	width: min(720px, 92vw);
	box-shadow: 0 40px 120px -20px rgba(0, 0, 0, 0.9);
}

dialog[open] { animation: pop 0.22s cubic-bezier(0.2, 1.2, 0.4, 1); }
dialog h3 { margin: 0 0 8px; font: 600 18px var(--font-display); letter-spacing: -0.01em; color: var(--text-hi); }
dialog p { color: var(--dim); }
dialog::backdrop { background: rgba(5, 5, 9, 0.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
dialog textarea { width: 100%; background: var(--field); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font: 13px/1.6 var(--mono); }
dialog .row { display: flex; gap: 12px; margin: 10px 0; }
dialog .row label { display: flex; gap: 8px; align-items: center; flex: 1; color: var(--dim); }
dialog .row label input { flex: 1; }
dialog .row.end { justify-content: flex-end; }
dialog .row.end button:last-child { background: var(--grad); color: #fff; border-color: transparent; font-weight: 600; }

#dlgFolder { width: min(900px, 94vw); }
#folderList { max-height: 60vh; overflow: auto; margin: 8px 0; }
.folder-ok { margin: 4px 0 6px; padding: 10px 12px; border-radius: 10px; color: var(--text) !important; background: color-mix(in srgb, var(--ok) 14%, transparent); border: 1px solid color-mix(in srgb, var(--ok) 45%, transparent); }
.folder-ok b { color: var(--ok); }
.folder-ok.none { background: color-mix(in srgb, var(--warn) 14%, transparent); border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.frow { display: grid; grid-template-columns: 90px 1fr 1fr auto; gap: 10px; align-items: center; padding: 6px 8px; border-bottom: 1px solid var(--line); border-radius: 8px; }
.frow:hover { background: rgba(255, 255, 255, 0.04); }
.frow .fn { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.frow .fd { color: var(--dim); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fs { font-size: 12px; font-weight: 700; }
.fs.ok { color: var(--ok); }
.fs.warn { color: var(--warn); }
.fs.err { color: var(--err); }

body.drop::after {
	content: "Audio oder LRC hier ablegen";
	position: fixed;
	inset: 12px;
	z-index: 50;
	display: grid;
	place-items: center;
	font: 600 28px var(--font-display);
	color: var(--text-hi);
	background: rgba(11, 11, 16, 0.85);
	backdrop-filter: blur(8px);
	border: 2px dashed var(--accent);
	border-radius: 24px;
}

/* ---------------------------------------------------------------- voices */
.vb { display: inline-block; padding: 0 5px; border-radius: 5px; font: 600 10px var(--font); color: var(--ink); background: #c9ccd8; }
.vb.inh { opacity: 0.45; }
.vb.v2 { background: #59ccff; }
.vb.v3 { background: #8cff73; }
.vb.v9 { background: #ff80d9; }
.vb.bg { background: #b98cff; }
.line.voice2 { border-left: 3px solid #59ccff; }
.line.voice3 { border-left: 3px solid #8cff73; }
.line.voice9 { border-left: 3px solid #ff80d9; }
.line.bgline .toks { margin-left: 28px; font-style: italic; opacity: 0.85; }
.line.bgline .tok .w { font-size: 14px; color: #c9b3ff; }

/* ---------------------------------------------------------------- bubbles when something is deleted */
#fx { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 90; pointer-events: none; background: none; box-shadow: none; border-radius: 0; }
.popping { position: fixed; z-index: 89; margin: 0; pointer-events: none; animation: squish 0.38s cubic-bezier(0.3, 0, 0.6, 1) forwards; }
@keyframes squish {
	0% { transform: scale(1); opacity: 1; filter: none; }
	35% { transform: scale(1.12, 0.9); opacity: 0.9; }
	100% { transform: scale(0.5, 1.3) translateY(-12px); opacity: 0; filter: blur(4px); }
}

/* ---------------------------------------------------------------- splash */
#splash {
	position: fixed;
	inset: 0;
	z-index: 100;
	display: grid;
	place-items: center;
	cursor: pointer;
	background:
		radial-gradient(600px 400px at 50% 40%, rgba(255, 79, 154, 0.22), transparent 70%),
		radial-gradient(500px 360px at 62% 62%, rgba(155, 107, 255, 0.2), transparent 70%),
		#09090d;
	transition: opacity 0.6s ease, visibility 0.6s;
}

#splash.out { opacity: 0; visibility: hidden; pointer-events: none; }
#splash.out .splash-card { transform: scale(1.06); }
.splash-card { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; transition: transform 0.6s ease; }

#splash .mascot {
	width: min(260px, 48vw);
	height: auto;
	filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.6));
	animation: drop-in 0.9s cubic-bezier(0.2, 1.4, 0.4, 1) both, bob 3.2s ease-in-out 0.9s infinite;
}

#splash h1 {
	margin: 18px 0 4px;
	font: 800 clamp(30px, 5vw, 48px)/1.05 var(--font-display);
	letter-spacing: -0.035em;
	color: var(--text-hi);
	animation: rise 0.7s 0.25s ease both;
}

#splash p { margin: 0; color: var(--dim); font-size: 15px; animation: rise 0.7s 0.35s ease both; }

#splashGo {
	display: none;
	margin-top: 24px;
	height: 44px;
	padding: 0 26px;
	border: 0;
	border-radius: 99px;
	background: var(--grad);
	color: #fff;
	font-weight: 600;
	font-size: 15px;
	box-shadow: 0 14px 40px -12px rgba(255, 79, 154, 0.9);
	animation: rise 0.5s ease both;
}

#splash.wait #splashGo { display: inline-block; }
.empty .tut-start { font-size: 14px; }
.tut-go { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

.splash-bar { width: 160px; height: 3px; margin-top: 26px; border-radius: 3px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.splash-bar i { display: block; height: 100%; width: 40%; border-radius: 3px; background: var(--grad); animation: load 1.1s ease-in-out infinite; }
#splash.wait .splash-bar { display: none; }

.bubbles { position: absolute; left: 50%; top: 0; width: 260px; height: 260px; transform: translateX(-10%); pointer-events: none; }
.bubbles i {
	position: absolute;
	bottom: 40%;
	left: 55%;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.1) 40%, rgba(180, 220, 255, 0.15) 70%, rgba(255, 150, 220, 0.4));
	box-shadow: inset 0 0 4px rgba(255, 255, 255, 0.4);
	opacity: 0;
	animation: bubble 3s ease-out infinite;
}

.bubbles i:nth-child(2) { left: 62%; width: 22px; height: 22px; animation-delay: 0.4s; animation-duration: 3.4s; }
.bubbles i:nth-child(3) { left: 58%; width: 10px; height: 10px; animation-delay: 0.9s; }
.bubbles i:nth-child(4) { left: 70%; width: 18px; height: 18px; animation-delay: 1.3s; animation-duration: 3.8s; }
.bubbles i:nth-child(5) { left: 60%; width: 26px; height: 26px; animation-delay: 1.8s; animation-duration: 4s; }
.bubbles i:nth-child(6) { left: 66%; width: 12px; height: 12px; animation-delay: 2.2s; }
.bubbles i:nth-child(7) { left: 74%; width: 16px; height: 16px; animation-delay: 2.6s; animation-duration: 3.6s; }
.bubbles i:nth-child(8) { left: 56%; width: 8px; height: 8px; animation-delay: 3s; }

@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-10px) rotate(1.5deg); } }
@keyframes drop-in { from { opacity: 0; transform: translateY(-40px) scale(0.8); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes load { 0% { transform: translateX(-110%); } 100% { transform: translateX(260%); } }
@keyframes pop { from { opacity: 0; transform: scale(0.96) translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes bubble {
	0% { opacity: 0; transform: translate(0, 0) scale(0.4); }
	15% { opacity: 1; }
	100% { opacity: 0; transform: translate(70px, -170px) scale(1.15); }
}

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

/* ---------------------------------------------------------------- narrow windows: the side panel stays on the right,
   narrower; only on very narrow ones it goes under the word list */
@media (max-width: 1000px) {
	body { height: auto; min-height: 100vh; overflow: auto; }
	main { flex: none; height: 88vh; }
	aside { width: 270px; }
	header .bar { display: flex; flex-wrap: wrap; justify-content: center; }
	header .checks { margin-left: 0 !important; }
}
@media (max-width: 680px) {
	main, body.side-left main { height: auto; flex-direction: column; gap: 14px; }
	#words { min-height: 50vh; }
	aside { width: auto !important; }
	.split.v, .side-top { display: none; }
}

/* tutorial (🎓): a card that walks through every tool with the example song, moved by its head */
#tut, #asst {
	position: fixed;
	right: 20px;
	bottom: 20px;
	width: min(400px, calc(100vw - 32px));
	max-height: calc(100vh - 40px);
	overflow: auto;
	padding: 12px 14px;
	border: 1px solid var(--line-hi);
	border-radius: var(--radius);
	background: var(--panel-solid);
	box-shadow: 0 0 0 1px rgba(255, 79, 154, 0.25), 0 24px 60px -16px rgba(0, 0, 0, 0.85);
	font-size: 13px;
	line-height: 1.45;
	z-index: 50;
}
#tut[hidden], #asst[hidden] { display: none; }
.tut-head { display: flex; align-items: center; gap: 8px; margin: -2px 0 8px; cursor: move; user-select: none; }
.tut-head img { width: 28px; height: 28px; }
.tut-head b { flex: 1; font: 600 14px var(--font-display); color: var(--text-hi); }
#tutStep { color: var(--dim); font-size: 12px; }
#tutBody { color: var(--text); }
#tutTask { margin: 10px 0 0; padding: 7px 10px; border-radius: 10px; background: rgba(255, 154, 92, 0.12); color: var(--accent); font-weight: 600; }
#tutTask.done { background: rgba(61, 220, 151, 0.14); color: var(--ok); }
#tut .row { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; }
#tutNext.go { animation: tut-go 1.2s ease-in-out infinite; }
@keyframes tut-go { 50% { box-shadow: 0 0 0 4px rgba(61, 220, 151, 0.35); } }
.tut-err { color: var(--err); }
.tut-warn { color: var(--warn); }
#helpTut { width: 100%; margin: 4px 0 6px; }
/* the arrow on what to use in the current tutorial step: red, bold, blinking */
.tut-arrow { position: fixed; z-index: 55; width: 34px; height: 46px; pointer-events: none; }
.tut-arrow[hidden] { display: none; }
.tut-arrow.up { transform: rotate(180deg); }
.tut-arrow svg { width: 100%; height: 100%; fill: var(--err); stroke: #fff; stroke-width: 2; stroke-linejoin: round;
	filter: drop-shadow(0 0 6px var(--err)) drop-shadow(0 0 14px rgba(255, 84, 118, 0.6)); animation: tut-blink 0.9s ease-in-out infinite; }
@keyframes tut-blink { 0%, 100% { transform: translateY(-6px); opacity: 1; } 50% { transform: translateY(2px); opacity: 0.35; } }

/* assistant (Juicy head / ✨ simple mode): a card that says what is next, the red arrow shows where */
#asst { box-shadow: 0 0 0 1px rgba(255, 154, 92, 0.35), 0 24px 60px -16px rgba(0, 0, 0, 0.85); }
#asstCount { color: var(--accent); font-size: 12px; font-weight: 600; white-space: nowrap; }
#asstBody small { color: var(--dim); }
#asstActs:empty { display: none; }
.asst-task { margin: 10px 0 0; padding: 7px 10px; border-radius: 10px; background: rgba(255, 154, 92, 0.12); color: var(--accent); font-weight: 600; }
/* the first mission: drag the card into this field */
#asstZone {
	position: fixed; z-index: 49; display: grid; place-items: center; pointer-events: none;
	border: 3px dashed var(--accent); border-radius: 18px; background: rgba(255, 154, 92, 0.08);
	color: var(--accent); font: 700 18px var(--font-display); animation: zone-pulse 1.4s ease-in-out infinite;
}
#asstZone[hidden] { display: none; }
@keyframes zone-pulse { 50% { background: rgba(255, 154, 92, 0.18); box-shadow: 0 0 30px -4px rgba(255, 154, 92, 0.5); } }
#btnAsst img { width: 22px; height: 22px; object-fit: contain; vertical-align: middle; }
#btnAsst.on { background: rgba(255, 154, 92, 0.22); box-shadow: 0 0 0 1px var(--accent) inset; }
#btnSimple { font-weight: 600; }
/* start page: the simple mode is the recommended way in, a blinking arrow and a badge say so */
.splash-rec { position: relative; width: max-content; margin: 18px auto 0; animation: rise 0.6s 0.35s ease both; }
#splash.wait .splash-rec { margin-top: 12px; }
.rec-arrow { position: absolute; right: 100%; top: 50%; width: 34px; height: 46px; margin-right: 10px; transform: translateY(-50%) rotate(-90deg); pointer-events: none; }
.rec-arrow svg { width: 100%; height: 100%; fill: var(--err); stroke: #fff; stroke-width: 2; stroke-linejoin: round;
	filter: drop-shadow(0 0 6px var(--err)) drop-shadow(0 0 14px rgba(255, 84, 118, 0.6)); animation: tut-blink 0.9s ease-in-out infinite; }
.rec-badge {
	position: absolute; top: -11px; right: -16px; padding: 2px 8px; border-radius: 99px; transform: rotate(6deg); pointer-events: none;
	background: var(--err); color: #fff; font: 700 11px/1.3 var(--font); letter-spacing: 0.02em; box-shadow: 0 4px 12px -4px var(--err);
}
#splashSimple {
	display: block;
	margin: 0;
	height: 40px;
	padding: 0 22px;
	border: 0;
	border-radius: 99px;
	background: var(--grad);
	color: #fff;
	font-weight: 700;
	font-size: 14px;
	box-shadow: 0 10px 26px -10px rgba(255, 79, 154, 0.9);
}
#splashSimple:hover { filter: brightness(1.1); }
/* the line and the word the assistant is about */
.line.afocus { box-shadow: inset 3px 0 0 var(--accent); }
.tok.aword { border-color: var(--accent); }
.tok.aword .tsug { visibility: visible; }
.tok.ademo .tadd { visibility: visible; }
.tok.ademo .tx { opacity: 1; }
body.simple .tok.ademo .tx, body.simple .tok.ademo .tadd { display: grid !important; opacity: 1; }
button.undo { padding: 0 9px; font-size: 13px; }

/* ✨ simple mode: only what is needed right now */
body.simple #checks, body.simple #btnSaveAs, body.simple #btnReset, body.simple #btnLoopMode, body.simple header .transport label,
body.simple #btnSettings, body.simple #btnTut, body.simple #btnHelp, body.simple #btnAsst, body.simple header .files .sep,
body.simple #legend, body.simple #overview, body.simple #splitPv, body.simple #splitTl, body.simple #modeText, body.simple #btnEdit,
body.simple aside, body.simple #splitSide, body.simple .tabs > button, body.simple .ln .tools, body.simple .tx, body.simple .tadd,
body.simple .tsyl { display: none !important; }
body.simple header .bar { display: flex; justify-content: space-between; }
body.simple #modeBar { justify-content: center; }
body.simple #modeBar:not(.on) { display: none; }
body.simple #modeBar button { height: 38px; padding: 0 20px; font-size: 15px; }
body.simple.afocus-on #words .line:not(.afocus) { display: none; }
body.simple #words .line { padding: 10px 8px; }
body.simple #words .tok .w { font-size: 20px; }
body.simple #asst { width: min(440px, calc(100vw - 32px)); font-size: 14px; }
body.simple #asst .tut-head b { font-size: 15px; }

/* chosen lines (☑ Auswählen, Shift / Strg+Klick) and linked lines (🔗, one colour per group) */
#btnPick.on { background: var(--cursor); color: var(--ink); border-color: transparent; }
.line.linked .ln { box-shadow: inset 3px 0 0 var(--lc); padding-left: 6px; }
.line.linked:not(.cur):not(.picked):not(.editing):not(.playing) { background: color-mix(in srgb, var(--lc) 8%, transparent); }
.ln .lk { height: 18px; padding: 0 5px; font-size: 10.5px; border-radius: 6px; border: 1px solid var(--lc, var(--line-hi)); color: var(--lc, var(--dim));
	background: color-mix(in srgb, var(--lc, transparent) 14%, transparent); font-family: var(--font); }
.ln .lk.twin { opacity: 0.55; border-style: dashed; }
.ln .lk.plus { margin-left: 2px; padding: 0 4px; font-weight: 700; }
.ln .lk.twin:hover { opacity: 1; }
body.simple .ln .lk { display: none; }

/* words chosen with the box in the timeline */
.tok.wpick { outline: 2px dashed var(--cursor); outline-offset: 1px; }

/* ⤒ word list folded up: lyrics display, timeline and draft bar make room */
body.tall #preview, body.tall #splitPv, body.tall #legend, body.tall #overview, body.tall #timeline, body.tall #draft { display: none; }
body.tall #stage { padding-top: 6px; }
#btnTall { font-weight: 600; }
body.tall #btnTall { background: var(--cursor); color: var(--ink); border-color: transparent; }
body.simple #btnTall { display: none; }

/* 🔍 similar sentences and sentence building */
#dlgSim { width: min(860px, 94vw); }
#simList { max-height: 60vh; overflow: auto; padding-right: 4px; }
#simList h4 { margin: 14px 0 6px; color: var(--text-hi); }
#simList .dim { color: var(--dim); font-weight: 400; }
.simrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 7px 8px; border-radius: 10px; border: 1px solid var(--line); margin-bottom: 6px; }
.simrow .simtx { flex: 1 1 240px; min-width: 0; font-size: 13px; line-height: 1.45; }
.simrow .pct { min-width: 50px; text-align: right; font: 600 13px var(--mono); color: var(--warn); }
.simrow .pct.hi { color: var(--ok); }
.simrow button { white-space: nowrap; }
body.simple #btnSim { display: none; }

/* ≈ compare view: only alike lines in the word list */
.line.cmp-hide { display: none; }
#cmpBar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 10px; margin-bottom: 8px; border-radius: 12px;
	border: 1px solid var(--cursor); background: color-mix(in srgb, var(--cursor) 10%, transparent); font-size: 13px; }
#cmpBar[hidden] { display: none; }
#cmpBar .dim { color: var(--dim); flex: 1 1 260px; }
#cmpBar .ok { color: var(--ok); }
.ln .lk.cmpb { --lc: var(--cursor); opacity: 0.7; }
.ln .lk.cmpb:hover { opacity: 1; }
.cmpp { margin-top: 4px; font: 600 12px var(--mono); color: var(--cursor); }
.cmpp button { height: 18px; padding: 0 5px; font-size: 11px; }
.cmpp.anchor { color: var(--ok); }
body.simple .ln .lk.cmpb { display: none; }
/* a word dragged to another line */
.wghost { position: fixed; z-index: 95; pointer-events: none; padding: 3px 10px; border-radius: 8px; background: var(--cursor); color: var(--ink);
	font-weight: 600; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5); }
body.wdrag, body.wdrag * { cursor: grabbing !important; user-select: none; }
.tok.wdragging { opacity: 0.35; }
.tok.drop-b { box-shadow: -3px 0 0 var(--cursor); }
.tok.drop-a { box-shadow: 3px 0 0 var(--cursor); }
.line.drop-end { outline: 2px dashed var(--cursor); outline-offset: -2px; }

/* a sentence typed into the timeline */
.qline { position: fixed; z-index: 96; width: 370px; height: 30px; padding: 0 10px; border-radius: 8px; border: 2px solid var(--cursor);
	background: var(--panel, #1b1b22); color: var(--text-hi, #fff); font-size: 14px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5); }
/* a box drawn in the word list */
.lband { position: fixed; z-index: 94; pointer-events: none; border: 1px dashed var(--cursor); background: color-mix(in srgb, var(--cursor) 12%, transparent); }

/* small buttons on a sentence, as on a word: + front / back = a sentence before / after, × = delete it (on hover).
   × and the back + sit in the middle of the right edge, clear of the word list's scrollbar */
.line > .lpre, .line > .lpost, .line > .lx {
	position: absolute; display: grid; place-items: center; width: 17px; height: 17px; min-width: 0; padding: 0; border-radius: 50%;
	font: bold 12px/1 var(--font); cursor: pointer; z-index: 3; visibility: hidden;
}
.line > .lpre, .line > .lpost { top: 50%; transform: translateY(-50%); background: var(--ok); color: var(--ink); border: none; }
.line > .lpre { left: -7px; }
.line > .lpost { right: 42px; }
.line > .lx { top: 50%; right: 12px; width: 22px; height: 22px; font-size: 14px; transform: translateY(-50%); background: var(--panel-solid); color: var(--dim); border: 1px solid var(--line-hi); }
.line:hover > .lpre, .line:hover > .lpost, .line:hover > .lx { visibility: visible; }
.line > .lpre:hover, .line > .lpost:hover { filter: brightness(1.2); }
.line > .lx:hover { background: var(--err); color: var(--ink); border-color: transparent; }
body.editing .line > .lpre, body.editing .line > .lpost, body.editing .line > .lx, body.simple .line > .lpre, body.simple .line > .lpost, body.simple .line > .lx { display: none; }

/* ⌃ header folded into one slim row: symbols only, the words stay in the tooltips */
#btnHead { position: absolute; top: 10px; right: 16px; width: 26px; height: 26px; padding: 0; font-size: 15px; }
body.slimhead header { flex-wrap: nowrap; flex-shrink: 0; min-height: 38px; gap: 6px 10px; padding: 4px 44px 4px 10px; overflow-x: auto; scrollbar-width: none; }
body.slimhead header::-webkit-scrollbar { display: none; }
body.slimhead #btnHead { top: 6px; right: 10px; }
body.slimhead .brand span, body.slimhead #fileInfo, body.slimhead header .sep, body.slimhead .songnav .sep { display: none; }
body.slimhead .brand img { width: 24px; height: 24px; }
body.slimhead header .group { flex-wrap: nowrap; gap: 3px; }
body.slimhead header .files { flex: 0 0 auto; padding-right: 0; }
body.slimhead header .bar { flex: 1 1 auto; flex-basis: auto; display: flex; gap: 8px; justify-content: space-between; min-width: 0; }
body.slimhead header button { height: 28px; }
body.slimhead header button[data-i] { font-size: 0; padding: 0 7px; min-width: 30px; }
body.slimhead header button[data-i]::before { content: attr(data-i); font-size: 14px; }
body.slimhead #btnPlay { width: 30px; height: 30px; font-size: 12px; }
body.slimhead #btnLoopMode, body.slimhead #btnAsst, body.slimhead #btnSettings, body.slimhead #btnTut, body.slimhead #btnHelp { width: 28px; height: 28px; }
body.slimhead #btnAsst img { width: 20px; height: 20px; }
body.slimhead #clock { min-width: 0; padding: 3px 6px; font-size: 11.5px; }
body.slimhead .seg { padding: 2px; }
body.slimhead .seg button { height: 22px; padding: 0 6px; font-size: 11px; }
body.slimhead header label { font-size: 0; gap: 0; }
body.slimhead header label input { margin: 0; }
body.slimhead #songSel { height: 28px; max-width: 150px; font-size: 12px; }
body.slimhead header button { transition: background 0.15s, border-color 0.15s, transform 0.12s; }
body.slimhead header button:hover { transform: scale(1.18); position: relative; z-index: 1; }
/* the card under a symbol of the folded header: the button in its normal size, with what it does */
.headTip { position: fixed; z-index: 60; max-width: 300px; padding: 7px 11px; display: flex; flex-direction: column; gap: 3px; pointer-events: none;
	background: var(--panel-solid); border: 1px solid var(--line-hi); border-radius: 9px; box-shadow: var(--shadow); animation: headTip 0.12s ease-out; }
.headTip b { font-size: 13.5px; font-weight: 600; color: var(--text-hi); white-space: nowrap; }
.headTip span { font-size: 12px; color: var(--dim); line-height: 1.35; }
@keyframes headTip { from { opacity: 0; transform: translateY(-4px); } }
