/* ============================================================
   Live Presentation — flat theme (no gradients).
   Palette: black/white + yellow #f5c518, blue #2563eb,
   green #22a35a, red #d93025.
   Controller defaults to dark; body.light switches to light.
   ============================================================ */

/* ===================== DISPLAY PAGE (live.php) ===================== */

body.live-display {
    margin: 0;
    background: #000;
    color: #fff;
    overflow: hidden;
    height: 100vh;
    font-family: 'Segoe UI', Arial, sans-serif;
    user-select: none;
}

#pinScreen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    gap: 24px;
}

#pinScreen h1 {
    font-size: 28px;
    font-weight: 600;
    margin: 0;
    opacity: 0.85;
    text-align: center;
}

#pinDots { display: flex; gap: 16px; }

.pin-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.pin-dot.filled { background: #fff; border-color: #fff; }

#pinDots.shake { animation: shake 0.4s; }

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

#pinError { color: #ff6b6b; font-size: 18px; min-height: 24px; }

#keypad {
    display: grid;
    grid-template-columns: repeat(3, 88px);
    gap: 14px;
}

.key {
    width: 88px;
    height: 72px;
    font-size: 32px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    cursor: pointer;
}

.key:active { background: rgba(255, 255, 255, 0.25); }

.key-spacer { visibility: hidden; }

#waiting {
    display: none;
    align-items: center;
    justify-content: center;
    height: 100vh;
    font-size: 26px;
    opacity: 0.5;
}

#stage {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    padding: 4vw;
    box-sizing: border-box;
    text-align: center;
    /* containing block for #stageBg (so the picture disappears with the stage) */
    position: relative;
    overflow: hidden;
}

/* Operator-chosen background picture, as its own layer: that lets it carry an
   opacity without fading the lyrics, which sit above it. The stage's own
   background-colour stays underneath as the base. */
#stageBg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    opacity: 0;
    pointer-events: none;
    z-index: 0;
    transition: opacity 0.2s linear;
}

#sectionHeader, #lyrics { position: relative; z-index: 1; }

/* Vertical placement of the lyric block (controller: Юқори / Ўрта / Паст) */
#stage.valign-top { justify-content: flex-start; }
#stage.valign-middle { justify-content: center; }
#stage.valign-bottom { justify-content: flex-end; }

#lyrics { font-size: min(6vw, 88px); }

#lyrics p {
    font-weight: 700;
    line-height: 1.22;
    margin: 0.18em 0;
    text-transform: uppercase;
    font-size: inherit;
}

/* small fixed button cluster, bottom center (fades out when idle) */

#displayControls {
    position: fixed;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 50;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s;
}

#displayControls.visible {
    opacity: 0.85;
    pointer-events: auto;
}

#displayControls button {
    /* fixed physical size on every screen (px are not affected by zoom,
       viewport scaling or device pixel ratio) */
    width: 38px;
    height: 38px;
    min-width: 38px;
    max-width: 38px;
    min-height: 38px;
    max-height: 38px;
    box-sizing: border-box;
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.10);
    color: #fff;
    font-size: 14px;
    font-family: Arial, sans-serif;
    /* flex centering: works for inline SVG *and* text glyphs,
       unlike the old line-height:38px baseline hack */
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    text-align: center;
    flex: 0 0 38px;
    cursor: pointer;
}

#displayControls button > svg {
    display: block;
    flex: 0 0 auto;
    margin: auto;
    pointer-events: none;
}

#displayControls button:active { background: rgba(255, 255, 255, 0.25); }

/* Light / photographic backgrounds: white-on-transparent disappears, so the
   buttons flip to solid dark chips with a shadow (class toggled by JS after
   measuring the background brightness). */
body.controls-light #displayControls button {
    background: rgba(18, 21, 27, 0.62);
    border-color: rgba(18, 21, 27, 0.85);
    color: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

body.controls-light #displayControls button:active { background: rgba(18, 21, 27, 0.85); }

#blackOverlay {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 40;
}

/* ===================== CONTROLLER PAGE ===================== */

body.live-controller {
    margin: 0;
    background: #000;
    color: #fff;
    font-family: 'Segoe UI', Arial, sans-serif;
    min-height: 100vh;
    transition: background 0.2s, color 0.2s;
    /* stop mobile Chrome font-boosting from inflating list rows */
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body.live-controller.light {
    background: #fff;
    color: #111;
}

/* ---------- header ---------- */

.lc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 22px;
    border-bottom: 2px solid #f5c518;
    /* pinned to the top while scrolling */
    position: sticky;
    top: 0;
    z-index: 400;
    background: #000;
}

body.live-controller.light .lc-header {
    background: #fff;
}

.lc-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lc-brand h1 { font-size: 20px; margin: 0; font-weight: 700; }

.lc-screen-icon {
    display: inline-flex;
    color: #2563eb;
}

.lc-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lc-chip {
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid #444;
    color: #9aa4b2;
}

body.light .lc-chip { border-color: #ccc; color: #667; }

.lc-chip[data-state="ok"] {
    border-color: #22a35a;
    color: #22a35a;
}

body.light .lc-chip[data-state="ok"] {
    border-color: #22a35a;
    color: #1d8a4d;
}

.lc-theme-toggle {
    background: none;
    border: 1px solid #555;
    border-radius: 8px;
    color: #fff;
    font-size: 18px;
    line-height: 1;
    padding: 5px 11px;
    cursor: pointer;
}

body.light .lc-theme-toggle {
    border-color: #ccc;
    color: #333;
}

/* ---------- layout ---------- */

.lc-main { padding: 18px 22px 40px; }

.lc-view { max-width: 1150px; margin: 0 auto; }

.lc-columns {
    display: grid;
    grid-template-columns: minmax(300px, 5fr) 7fr;
    gap: 18px;
    align-items: start;
}

@media (max-width: 900px) {
    .lc-columns { grid-template-columns: 1fr; }
}

.lc-panel {
    border: 1px solid #333;
    border-radius: 12px;
    padding: 16px;
    background: #0d0d0d;
}

body.light .lc-panel { border-color: #ddd; background: #fafafa; }

.lc-center { max-width: 480px; margin: 40px auto; text-align: center; }

.lc-panel-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.lc-panel-title-row h2 { font-size: 16px; margin: 0; }

.lc-muted { color: #9aa4b2; }
body.light .lc-muted { color: #667; }

.lc-pad { padding: 8px; }
.lc-error { color: #ff5c5c; min-height: 20px; font-size: 14px; }
.lc-mono { font-family: monospace; }

/* ---------- buttons (flat) ---------- */

.lc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 15px;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    color: #fff;
    transition: filter 0.12s, transform 0.08s;
}

.lc-btn:hover { filter: brightness(1.12); }
.lc-btn:active { transform: scale(0.98); }
.lc-btn:disabled { opacity: 0.5; cursor: default; }

.lc-btn-blue   { background: #2563eb; }
.lc-btn-yellow { background: #f5c518; color: #111; }
.lc-btn-green  { background: #22a35a; }
.lc-btn-red    { background: #d93025; }

.lc-btn-ghost {
    background: transparent;
    border: 1px solid #555;
    color: inherit;
}

body.light .lc-btn-ghost { border-color: #bbb; }

.lc-btn-big { padding: 14px 26px; font-size: 17px; }
.lc-btn-sm  { padding: 5px 12px; font-size: 13px; }
.lc-wide    { width: 100%; margin-top: 10px; }

/* ---------- inputs ---------- */

.lc-input {
    background: #111;
    border: 1px solid #444;
    border-radius: 8px;
    color: #fff;
    padding: 9px 12px;
    font-size: 14px;
}

body.light .lc-input { background: #fff; border-color: #ccc; color: #111; }

.lc-input:focus {
    outline: none;
    border-color: #2563eb;
}

.lc-pin-row {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 10px 0;
}

.lc-pin-input {
    font-size: 28px;
    text-align: center;
    letter-spacing: 0.4em;
    width: 170px;
}

.lc-pin-big {
    font-size: 54px;
    font-weight: 800;
    letter-spacing: 0.3em;
    color: #f5c518;
    margin: 10px 0;
}

/* ---------- collapse toggle ---------- */

.lc-collapse-btn {
    background: none;
    border: 1px solid #444;
    border-radius: 8px;
    color: #9aa4b2;
    padding: 3px;
    cursor: pointer;
    display: inline-flex;
    line-height: 1;
}

body.light .lc-collapse-btn { border-color: #ccc; }

.lc-collapse-btn svg { transition: transform 0.15s; }

.lc-panel.list-collapsed .lc-collapse-btn svg { transform: rotate(-90deg); }

.lc-panel.list-collapsed .lc-list-body { display: none; }

/* ---------- search + list ---------- */

.lc-search-row { margin-bottom: 8px; }
.lc-search-row .lc-input { width: 100%; box-sizing: border-box; }

.lc-results { margin-bottom: 6px; }

.lc-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 10px;
    border-bottom: 1px solid #222;
    font-size: 14px;
}

body.light .lc-result { border-bottom-color: #e5e5e5; }

.lc-song-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 46vh;
    overflow-y: auto;
}

.lc-song-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 2px 10px;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid transparent;
    margin-bottom: 0;
    line-height: 1.1;
    min-height: 0;
}

.lc-song-item .lc-song-title {
    font-size: 13.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lc-song-item .lc-remove {
    font-size: 14px;
    line-height: 1;
    padding: 2px 4px;
}

.lc-song-item:hover { border-color: #444; }
body.light .lc-song-item:hover { border-color: #ccc; }

.lc-song-item.current {
    border-color: #2563eb;
    background: rgba(37, 99, 235, 0.10);
}

.lc-song-num {
    color: #9aa4b2;
    font-size: 13px;
    min-width: 20px;
}

.lc-song-title {
    flex: 1;
    font-weight: 600;
    font-size: 14.5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lc-remove {
    background: none;
    border: none;
    color: #9aa4b2;
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
    padding: 2px 6px;
}

.lc-remove:hover { color: #d93025; }

/* ---------- sections ---------- */

.lc-sections {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 100vh;
    overflow-y: auto;
    margin-bottom: 12px;
}

.lc-section {
    border: 1px solid #333;
    border-radius: 10px;
    padding: 10px 13px;
    cursor: pointer;
    font-size: 14px;
    color: #cbd5e1;
    line-height: 1.4;
}

body.light .lc-section { border-color: #ddd; color: #333; }

.lc-section-hdr {
    display: block;
    color: #f5c518;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 3px;
}

.lc-section:hover { border-color: #555; }
body.light .lc-section:hover { border-color: #bbb; }

.lc-section.current {
    border-color: #f5c518;
    background: rgba(245, 197, 24, 0.08);
    color: inherit;
}

.lc-controls {
    display: none; /* shown by JS when paired */
    /* Same circular icon buttons as the projector page. The row never wraps:
       the buttons share the width equally and shrink, so all 7 always fit on
       one line, however narrow the phone is. */
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 8px;
    /* lives OUTSIDE the scrolling content — always pinned to the viewport */
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 500;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    background: #000;
    border-top: 1px solid #333;
}

/* Circular icon button — mirrors #displayControls button on live.php */
.lc-ctl {
    /* flex:1 1 0 + max-width: equal share, capped so they don't get huge on
       desktop; aspect-ratio keeps them perfectly round at any size. */
    flex: 1 1 0;
    min-width: 0;
    max-width: 44px;
    aspect-ratio: 1 / 1;
    padding: 0;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.10);
    color: #fff;
    cursor: pointer;
    transition: background 0.15s, transform 0.08s;
}

.lc-ctl > svg { display: block; flex: 0 0 auto; margin: auto; pointer-events: none; width: 42%; height: 42%; }

.lc-ctl:hover { background: rgba(255, 255, 255, 0.20); }
.lc-ctl:active { transform: scale(0.94); }
.lc-ctl:disabled { opacity: 0.45; cursor: default; }

body.light .lc-ctl {
    border-color: rgba(0, 0, 0, 0.25);
    background: rgba(0, 0, 0, 0.06);
    color: #111;
}

body.light .lc-ctl:hover { background: rgba(0, 0, 0, 0.12); }

/* Stop is the one destructive action: red, and a second tap confirms it. */
.lc-ctl-stop {
    border-color: rgba(217, 48, 37, 0.75);
    background: rgba(217, 48, 37, 0.20);
    color: #ff7a6e;
}

.lc-ctl-stop:hover { background: rgba(217, 48, 37, 0.34); }

.lc-ctl-stop .ic-confirm { display: none; }

.lc-ctl-stop.armed {
    background: #d93025;
    border-color: #d93025;
    color: #fff;
}

.lc-ctl-stop.armed .ic-stop { display: none; }
.lc-ctl-stop.armed .ic-confirm { display: block; }

body.light .lc-controls {
    background: #fff;
    border-top-color: #ddd;
}

/* keep page content clear of the fixed bar */
body.live-controller.controls-visible { padding-bottom: 84px; box-sizing: border-box; }

/* ---------- colors ---------- */

.lc-color-row { display: flex; gap: 12px; }

/* Background image picker (operator uploads a picture from their PC) */
.lc-bg-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 10px;
}

/* Icon-only square button (background-image picker, sits on the colour row) */
.lc-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    flex: 0 0 auto;
    border-radius: 9px;
    border: 1px solid #555;
    background: transparent;
    color: inherit;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.lc-icon-btn:hover { background: rgba(255, 255, 255, 0.10); border-color: #7a7a7a; }
.lc-icon-btn:active { transform: scale(0.96); }
.lc-icon-btn > svg { display: block; pointer-events: none; }

body.light .lc-icon-btn { border-color: #bbb; }
body.light .lc-icon-btn:hover { background: rgba(0, 0, 0, 0.06); border-color: #999; }

/* Thumbnail + picker grouped so the thumbnail sits right next to the button */
.lc-title-tools {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

/* Background image thumbnail, in the title row next to the picker button */
.lc-bg-thumb {
    position: relative;
    display: block;
    flex: 0 0 auto;
    width: 44px;
    height: 32px;
}

.lc-bg-thumb[hidden] { display: none; }

.lc-bg-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #555;
}

body.light .lc-bg-thumb img { border-color: #bbb; }

/* Red [x] on the thumbnail's top-right corner — removes the image */
.lc-bg-remove {
    position: absolute;
    top: -7px;
    right: -7px;
    width: 18px;
    height: 18px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: none;
    background: #d93025;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 0 0 2px #0d0d0d;
    transition: background 0.15s, transform 0.08s;
}

body.light .lc-bg-remove { box-shadow: 0 0 0 2px #fafafa; }

.lc-bg-remove:hover { background: #f04438; }
.lc-bg-remove:active { transform: scale(0.9); }
.lc-bg-remove > svg { display: block; pointer-events: none; }

/* Lyric vertical alignment (segmented control) */
.lc-align-row {
    display: flex;
    align-items: stretch;   /* the align segment and the [-]/[+] stepper end up
                               exactly as tall as each other, at any font size */
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 10px;
}

.lc-seg {
    display: inline-flex;
    border: 1px solid #444;
    border-radius: 9px;
    overflow: hidden;
}

.lc-seg button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 11px;
    font-size: 12.5px;
    font-weight: 600;
    font-family: inherit;
    background: transparent;
    color: inherit;
    border: none;
    border-right: 1px solid #444;
    cursor: pointer;
    transition: background 0.15s;
}

.lc-seg button:last-child { border-right: none; }
.lc-seg button:hover:not(.active) { background: rgba(255, 255, 255, 0.10); }
.lc-seg button.active { background: #f5c518; color: #111; }
.lc-seg button > svg { display: block; pointer-events: none; }

body.light .lc-seg { border-color: #ccc; }
body.light .lc-seg button { border-right-color: #ccc; }
body.light .lc-seg button:hover:not(.active) { background: rgba(0, 0, 0, 0.06); }

/* Text-size stepper ([-] / [+]) — sits next to the alignment segment and must
   be exactly as tall as it, so both controls read as one row. The alignment
   buttons carry 14px icons plus 12.5px text; these carry only the icon, hence
   the explicit min-height. */
.lc-size-seg {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid #444;
    border-radius: 9px;
    overflow: hidden;
}

.lc-size-seg button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    padding: 6px 9px;
    font-size: 12.5px;
    font-weight: 600;
    font-family: inherit;
    background: transparent;
    color: inherit;
    border: none;
    border-right: 1px solid #444;
    cursor: pointer;
    transition: background 0.15s;
}

.lc-size-seg button:last-child { border-right: none; }
.lc-size-seg button:hover:not(:disabled) { background: rgba(255, 255, 255, 0.10); }
.lc-size-seg button:active:not(:disabled) { background: rgba(255, 255, 255, 0.20); }
.lc-size-seg button:disabled { opacity: 0.35; cursor: default; }
.lc-size-seg button > svg { display: block; pointer-events: none; }

/* Reset-to-100% button: same chip, tinted so it reads as a different action
   from the two steppers. */
#lcTextReset { color: #f5c518; }
body.light #lcTextReset { color: #a37a00; }

/* Percentage readout, between [-] and [+] */
.lc-size-value {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    padding: 0 4px;
    font-size: 12.5px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    border-right: 1px solid #444;
    user-select: none;
}

body.light .lc-size-value { border-right-color: #ccc; }

body.light .lc-size-seg { border-color: #ccc; }
body.light .lc-size-seg button { border-right-color: #ccc; }
body.light .lc-size-seg button:hover:not(:disabled) { background: rgba(0, 0, 0, 0.06); }
body.light .lc-size-seg button:active:not(:disabled) { background: rgba(0, 0, 0, 0.12); }

/* Background image opacity — a plain number input (0–100, typed by hand) */
.lc-bg-opacity {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12.5px;
    color: #9aa4b2;
    white-space: nowrap;
}

/* the UA `hidden` attribute would lose to display:flex above */
.lc-bg-opacity[hidden] { display: none; }

body.light .lc-bg-opacity { color: #667; }

.lc-bg-opacity input[type="number"] {
    width: 54px;
    padding: 5px 4px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    font-variant-numeric: tabular-nums;
    color: #fff;
    background: #111;
    border: 1px solid #444;
    border-radius: 7px;
    -moz-appearance: textfield;
    appearance: textfield;
}

.lc-bg-opacity input[type="number"]:focus {
    outline: none;
    border-color: #f5c518;
}

/* hide the spinner arrows — the value is typed, not clicked */
.lc-bg-opacity input[type="number"]::-webkit-outer-spin-button,
.lc-bg-opacity input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

body.light .lc-bg-opacity input[type="number"] { background: #fff; border-color: #ccc; color: #111; }
body.light .lc-bg-opacity input[type="number"]:focus { border-color: #d9a800; }

.lc-bg-opacity-pct { font-variant-numeric: tabular-nums; }

.lc-color-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12.5px;
    color: #9aa4b2;
}

body.light .lc-color-label { color: #667; }

.lc-color-label input[type="color"] {
    width: 34px;
    height: 26px;
    border: 1px solid #444;
    border-radius: 6px;
    background: none;
    padding: 0;
    cursor: pointer;
}

body.light .lc-color-label input[type="color"] { border-color: #ccc; }

/* ---------- [screen] button in the site header ---------- */
/* Site uses body.dark-mode for dark theme; light is the default. */

#livePresentationBtn,
#liveFavouritesBtn,
#liveDisplayBtn {
    color: #ffffff;
    background: #333333;
    border: 1px solid #ffffff;
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

#liveFavouritesBtn svg,
#livePresentationBtn svg,
#liveDisplayBtn svg {
    margin: 0 auto;
}

body:not(.dark-mode) #livePresentationBtn,
body:not(.dark-mode) #liveFavouritesBtn,
body:not(.dark-mode) #liveDisplayBtn {
    color: #333333;
    background: #ffffff;
    border: 1px solid #333333;
}

/* ---------- Icon-only buttons in the favourites action row ---------- */
/* The text labels (Ulashish / Note / Tozalash) were dropped to save space,
   so these are now icon-only. The show/hide JS sets display:flex, whose
   default justify-content is flex-start — without this the icon sits at the
   left edge instead of the centre. */
#shareFavouritesBtn,
#addNoteBtn,
#clearFavouritesBtn {
    justify-content: center;
    align-items: center;
    padding: 6px 10px;
}

/* Match the FontAwesome glyphs to the 18px inline SVGs of the monitor and
   wifi buttons so every button in the row looks the same weight. */
#favouriteActionsContainer .btn > i {
    font-size: 18px;
    line-height: 1;
}

/* ===================== MOBILE OVERRIDES =====================
   These MUST come after the base rules above. A media query adds no
   specificity, so an override placed earlier in the file loses to a plain
   rule further down — which is exactly why the control-bar sizing used to
   be ignored on phones (buttons stayed 44px and the 7th wrapped). */
@media (max-width: 700px) {
    .lc-main { padding: 10px 10px 20px; }
    .lc-song-title { font-size: 13px; }
    .lc-result { padding: 5px 8px; }
    .lc-section { font-size: 13px; padding: 8px 10px; }
    .lc-sections { max-height: 100vh; }
    .lc-song-list { max-height: 24vh; }
    .lc-brand h1 { font-size: 16px; }
    .lc-controls { gap: 6px; padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px)); }
    .lc-ctl { max-width: 40px; }
    body.live-controller.controls-visible { padding-bottom: 76px; }
    /* The align row holds 3 labelled buttons + the [-] / value / [+] / reset
       group. At 360px their natural widths overflow the row, and at 320px the
       overflow is worse, so trim both controls to keep the row on ONE line. */
    .lc-align-row { gap: 6px; }
    .lc-seg button { padding: 6px 6px; gap: 3px; font-size: 11px; }
    .lc-size-seg button { min-width: 24px; padding: 6px 4px; }
    .lc-size-value { min-width: 34px; padding: 0 1px; font-size: 11px; }
}
