/* static/karaoke/karaoke.css — shared design system for all karaoke surfaces.
   The site dropped the Tailwind CDN (base.html keeps ~20 utilities), so karaoke
   pages style themselves with these purpose-built classes. Mobile-first. */

.kwrap { max-width: 860px; margin: 0 auto; padding: 16px 14px 48px; color: #e5e7eb; }
@media (min-width: 768px) { .kwrap { padding: 24px 20px 64px; } }

/* Header */
.khead { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.khead h1 { font-size: 1.6rem; font-weight: 700; margin: 0; flex: 1; color: #fff; }
@media (min-width: 768px) { .khead h1 { font-size: 2rem; } }
.kback { color: #9ca3af; text-decoration: none; font-size: .95rem; padding: 8px 12px;
         border: 1px solid #1f2937; border-radius: 10px; background: #0b0f19; white-space: nowrap; }
.kback:hover { color: #fff; border-color: #4b5563; }

/* Cards */
.kcard { background: linear-gradient(180deg, #0f1420, #0b0f19); border: 1px solid #1f2937;
         border-radius: 16px; padding: 16px; margin-bottom: 16px; }
@media (min-width: 768px) { .kcard { padding: 20px; } }
.kcard h2 { font-size: 1.05rem; font-weight: 600; margin: 0 0 12px; color: #f3f4f6;
            display: flex; align-items: center; gap: 8px; }

/* Home menu tiles */
.kmenu { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 640px) { .kmenu { grid-template-columns: 1fr 1fr; } }
.ktile { display: flex; align-items: center; gap: 14px; padding: 18px 16px; border-radius: 16px;
         background: linear-gradient(180deg, #111827, #0b0f19); border: 1px solid #1f2937;
         color: #f3f4f6; text-decoration: none; transition: border-color .15s, transform .15s; }
.ktile:hover { border-color: #7c3aed; transform: translateY(-1px); }
.ktile .kemoji { font-size: 1.7rem; line-height: 1; }
.ktile .klabel { font-size: 1.1rem; font-weight: 600; flex: 1; }

/* Tooltip: <span class="ktip" tabindex="0" data-tip="...">i</span>
   Hover on desktop, tap (focus) on mobile. */
.ktip { position: relative; display: inline-flex; align-items: center; justify-content: center;
        width: 20px; height: 20px; border-radius: 50%; border: 1px solid #4b5563;
        color: #9ca3af; font-size: 12px; font-style: italic; font-family: Georgia, serif;
        cursor: help; user-select: none; flex: none; }
.ktip:hover, .ktip:focus { color: #e5e7eb; border-color: #a78bfa; outline: none; }
.ktip::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 50%;
               transform: translateX(-50%); width: max-content; max-width: 240px;
               background: #1f2937; color: #e5e7eb; font-style: normal; font-family: inherit;
               font-size: 12.5px; line-height: 1.45; padding: 8px 10px; border-radius: 8px;
               border: 1px solid #374151; box-shadow: 0 8px 24px rgba(0,0,0,.5);
               opacity: 0; pointer-events: none; transition: opacity .12s; z-index: 40;
               white-space: normal; text-align: left; }
.ktip:hover::after, .ktip:focus::after { opacity: 1; }
.ktile .ktip { margin-left: auto; }
.ktile .ktip::after { left: auto; right: 0; transform: none; }

/* Inputs + buttons */
.kinput { width: 100%; box-sizing: border-box; padding: 12px 14px; border-radius: 12px;
          background: #111827; border: 1px solid #374151; color: #f3f4f6; font-size: 16px; }
.kinput:focus { outline: none; border-color: #7c3aed; box-shadow: 0 0 0 3px rgba(124,58,237,.25); }
.kinput::placeholder { color: #6b7280; }
textarea.kinput { min-height: 120px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }

.kbtn { display: inline-flex; align-items: center; justify-content: center; gap: 6px;
        padding: 11px 16px; border-radius: 12px; border: 1px solid transparent;
        font-size: 15px; font-weight: 600; cursor: pointer; color: #fff;
        background: #7c3aed; transition: background .12s, border-color .12s; }
.kbtn:hover { background: #8b5cf6; }
.kbtn:disabled { opacity: .5; cursor: default; }
.kbtn-ghost { background: #0b0f19; border-color: #374151; color: #d1d5db; }
.kbtn-ghost:hover { background: #111827; border-color: #4b5563; }
.kbtn-green { background: #059669; } .kbtn-green:hover { background: #10b981; }
.kbtn-blue { background: #2563eb; } .kbtn-blue:hover { background: #3b82f6; }
.kbtn-danger { background: transparent; border-color: #7f1d1d; color: #f87171; padding: 7px 10px; font-size: 13px; }
.kbtn-danger:hover { background: rgba(153,27,27,.25); }
.kbtn-sm { padding: 8px 12px; font-size: 13.5px; }

.krow { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.krow > .kinput { flex: 1 1 200px; width: auto; }
.kgrid2 { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 640px) { .kgrid2 { grid-template-columns: 1fr 1fr; } }

.kmuted { color: #9ca3af; font-size: .9rem; }
.kstatus { color: #a7f3d0; font-size: .9rem; }

/* Search results (audience: mobile-friendly tap list instead of a datalist) */
.kresults { margin-top: 10px; border: 1px solid #1f2937; border-radius: 12px; overflow: hidden;
            max-height: 46vh; overflow-y: auto; }
.kresults:empty { display: none; }
.kresult { display: flex; align-items: baseline; gap: 8px; width: 100%; text-align: left;
           padding: 12px 14px; background: #0b0f19; border: 0; border-bottom: 1px solid #151b29;
           color: #e5e7eb; cursor: pointer; font-size: 15px; }
.kresult:last-child { border-bottom: 0; }
.kresult:hover, .kresult:focus { background: #151b29; outline: none; }
.kresult .krtitle { font-weight: 600; }
.kresult .krartist { color: #9ca3af; font-size: 13.5px; flex: 1; min-width: 0;
                     overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kbadge { font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px solid #374151;
          color: #a78bfa; white-space: nowrap; }

/* Selected-song signup card */
.kpick { border: 1px solid #4c1d95; background: linear-gradient(180deg, #17102b, #0b0f19); }
.kpick .kpick-title { font-size: 1.15rem; font-weight: 700; color: #fff; margin: 0; }
.kpick .kpick-artist { color: #a78bfa; margin: 2px 0 12px; font-size: .95rem; }

/* Queue */
.kqueue { list-style: none; margin: 0; padding: 0; }
.kqueue li { display: flex; align-items: center; gap: 10px; padding: 11px 4px;
             border-bottom: 1px solid #151b29; font-size: 15px; }
.kqueue li:last-child { border-bottom: 0; }
.kqueue .kqname { font-weight: 600; color: #f3f4f6; }
.kqueue .kqsong { color: #9ca3af; flex: 1; min-width: 0; overflow: hidden;
                  text-overflow: ellipsis; white-space: nowrap; }
.kqueue .kqnum { color: #6b7280; font-size: 13px; width: 20px; text-align: right; flex: none; }
.kqueue .kqhandle { cursor: move; color: #6b7280; padding: 0 6px; user-select: none; }
.kqueue li.kq-singing .kqname { color: #fbbf24; }

/* Player bits (display + fallback surfaces) */
.knotice { color: #fbbf24; font-size: .9rem; margin: 8px 0; }
.kvideo { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 12px;
          overflow: hidden; background: #000; }
.kvideo iframe, .kvideo-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.kvideo-frame { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; }

.kline { padding: 8px 12px; opacity: 0.45; border-radius: 10px; }
.kline.line-now { opacity: 1; background: #111827; }
.kline-static { opacity: .9; padding: 2px 12px; }
.kword { transition: color 120ms linear; }
.kword.sung { color: #f59e0b; }
.kword.sung-now { color: #fbbf24; text-shadow: 0 0 12px #f59e0b; }
.display-big { font-size: clamp(22px, 5vw, 48px); line-height: 1.4; }

/* Musician lead sheet */
.lyric-line { padding: 10px 12px; border-radius: 10px; margin: 6px 0; }
.lyric-line .chords { display: block; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
                      font-size: 12px; color: #a78bfa; white-space: pre; overflow-x: auto; }
.lyric-line .lyrics { display: block; font-size: 17px; color: #e5e7eb; white-space: pre-wrap;
                      word-wrap: break-word; overflow-wrap: anywhere; }
#chordTimeline .chord-cell { display: inline-block; padding: 2px 10px; margin-right: 6px;
                             border-radius: 6px; background: #1f2937; color: #9ca3af; }
#chordTimeline .chord-cell.active { background: #7c3aed; color: #fff; font-weight: 700; }
.kchordbar { position: sticky; top: 0; z-index: 10; background: #030712; border: 1px solid #374151;
             padding: 12px 14px; border-radius: 12px; margin-bottom: 16px;
             box-shadow: 0 10px 30px rgba(0,0,0,.6); }
