/* Guest page — phone first, portrait */
html { font-size: clamp(1rem, 0.5vw + 0.4rem, 1.5rem); } /* fluid root: 1rem up to 120rem wide, grows to 1.5rem at 4K */
body { padding: 0 0.875rem calc(5.625rem + env(safe-area-inset-bottom)); max-width: 47.5rem; margin: 0 auto; }
.g-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.25rem 0.625rem; padding: 0.875rem 0 0.5rem; }
.g-head .kd-brand { font-size: 0.9375rem; white-space: normal; flex: 1 1 auto; min-width: 0; }
/* session name: its own line under the KaraDirector name, shown in full (wraps if long) */
.g-session { flex: 1 0 100%; order: 3; font-size: 0.8125rem; white-space: normal; overflow-wrap: anywhere; }
.g-session:empty { display: none; }
.g-nosession { text-align: center; padding: 18vh 0.625rem; }
.g-singer { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.75rem; display: grid; gap: 0.5rem; }
.singer-label { display: grid; gap: 0.375rem; font-weight: 700; font-size: 0.875rem; color: var(--muted); }
.g-nav { display: grid; grid-template-columns: 1fr 1fr auto; gap: 0.5rem; margin: 0.75rem 0; }
.g-nav .btn.on { border-color: var(--accent); color: var(--accent); }
.g-nav a.btn { text-decoration: none; }

/* added confirmation */
.g-added { text-align: center; padding: 8vh 0.375rem; }
.g-added-icon { width: 4.75rem; height: 4.75rem; margin: 0 auto 0.75rem; border-radius: 50%; display: grid; place-items: center; background: var(--ok); color: #06210f; font-size: 2.625rem; font-weight: 800; }
.g-added-actions { display: grid; gap: 0.625rem; max-width: 22.5rem; margin: 1.125rem auto 0; }

/* queue */
.q-row { display: grid; grid-template-columns: 2.125rem 6.75rem 1fr auto; gap: 0.625rem; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.5rem; margin-bottom: 0.5rem; }
.q-row.playing { border-color: var(--accent); }

.q-thumb { width: 6.75rem; height: 3.75rem; }

/* Thumbnail size switch (body.thumb-s / thumb-m / thumb-l), remembered on each phone */
#search .ss-tabs { grid-template-columns: 1fr 1fr auto; }









/* All sizes: the title gets the full width, then details, then the Add button */
#search .ss-titleline { display: contents; }
#search .ss-title { order: 1; }
#search .ss-meta { order: 2; }
#search .ss-add, #search .ss-added { order: 3; justify-self: start; margin-top: 0.25rem; }
/* Queue rows (small and medium): the Delete button sits under the song details */
body.thumb-s .q-row, body.thumb-m .q-row { grid-template-areas: "num thumb info" "num thumb del"; row-gap: 0.375rem; }

body.thumb-s .q-thumb, body.thumb-m .q-thumb { grid-area: thumb; }
body.thumb-s .q-info, body.thumb-m .q-info { grid-area: info; }
body.thumb-s .q-row > .btn, body.thumb-m .q-row > .btn { grid-area: del; justify-self: start; }

/* Small: thumbnail 120 px (search) / 72 px (queue) */
body.thumb-s .q-row { grid-template-columns: 2.125rem 4.5rem 1fr; }
body.thumb-s .q-thumb { width: 4.5rem; height: 2.5rem; }

/* Medium: thumbnail 180 px (search) / 108 px (queue) */
body.thumb-m #search .ss-item { grid-template-columns: 11.25rem 1fr; }
body.thumb-m #search .ss-thumb { width: 11.25rem; height: 6.3125rem; }
body.thumb-m .q-row { grid-template-columns: 2.125rem 6.75rem 1fr; }

/* Large: the thumbnail fills the card, with the title underneath (like the YouTube app) */
body.thumb-l #search .ss-item { grid-template-columns: 1fr; }
body.thumb-l #search .ss-thumb { width: 100%; height: auto; aspect-ratio: 16 / 9; }
body.thumb-l #search .ss-title { font-size: 1rem; }
body.thumb-l .q-row { grid-template-columns: 2.125rem 1fr auto; grid-template-areas: "num thumb thumb" "num info del"; row-gap: 0.5rem; }

body.thumb-l .q-thumb { grid-area: thumb; width: 100%; height: auto; aspect-ratio: 16 / 9; }
body.thumb-l .q-info { grid-area: info; }
body.thumb-l .q-row > .btn { grid-area: del; align-self: center; }
.q-info { min-width: 0; }
.q-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-meta, .q-when { font-size: 0.8125rem; }
.g-empty { text-align: center; padding: 1.875rem 0; }
.g-queue-actions { margin-top: 0.875rem; display: grid; }

.g-sticky { position: fixed; left: 0; right: 0; bottom: 0; padding: 0.625rem 0.875rem calc(0.625rem + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--bg) 35%); display: grid; max-width: 47.5rem; margin: 0 auto; }
.g-sticky .btn { background: var(--panel2); border-color: var(--accent); }

.g-preview h2 { font-size: 1.0625rem; margin: 0.75rem 0 0.25rem; }
.g-frame { position: relative; padding-top: 56.25%; background: #000; border-radius: 0.625rem; overflow: hidden; }
.g-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Client Screen label */
.screen-label { font-size: 0.6875rem; font-weight: 700; color: var(--muted); border: 1px solid var(--line); border-radius: 62.4375rem; padding: 1px 0.5rem; white-space: nowrap; }
/* 2.10.57: Large thumbnails only (the size switch is gone); Change singer under the Added message */

.g-change-singer { display: block; margin: 0.875rem auto 0; }
.g-change-singer[hidden] { display: none; }
/* 2.10.58: the singer name box is gone ("Who's singing?" asks for every song) */
#singer.g-singer { display: none !important; }

/* === 2.10.60 === */
/* nav: "Queue (n)" and "Stats"; on the queue the Queue button becomes "← Back to search" in the same spot */
/* search follows the laptop: no YouTube / Local tabs; the host's own songs come first */
.ss-follow .ss-tabs { display: none !important; }
.ss-ours { color: #46c46e; font-weight: 800; }
.g-nav { grid-template-columns: 1fr auto !important; }
/* 2.10.71: Queue · QR code · Stats */
.g-nav { grid-template-columns: 1fr auto auto !important; align-items: stretch; }
.g-nav .g-qr { width: 3rem; height: 3rem; min-height: 0; }

/* 2.10.82: Queue · Help · QR code · Stats */
.g-nav { grid-template-columns: 1fr auto auto auto !important; }
.g-nav .g-help { padding: 0 0.875rem; }
.st-codes { width: 100%; border-collapse: collapse; margin: 0.5rem 0; }
.st-codes th, .st-codes td { text-align: left; padding: 0.25rem 0.5rem; border-bottom: 1px solid var(--line); }
.gh-head { display: flex; align-items: center; justify-content: space-between; gap: 0.625rem; }
.gh-head h2 { margin: 0; font-size: 1.25rem; }
.gh-x { width: 2.25rem; height: 2.25rem; border-radius: 0.625rem; border: 1px solid var(--line); background: var(--panel); color: var(--text); font-size: 1rem; }

/* 2.10.83: the guest search box is always black with white text, in every theme */
html body #search input.ss-q { background: #000 !important; background-image: none !important; color: #fff !important; -webkit-text-fill-color: #fff !important; caret-color: #fff !important; box-shadow: none !important; }
html body #search input.ss-q::placeholder { color: rgba(255,255,255,.55) !important; -webkit-text-fill-color: rgba(255,255,255,.55) !important; }

/* 2.11.80: "Client Screen" sits on the same line as the session name; Help, Photo, QR and Stats are one row of equal buttons */
.g-head .kd-brand { flex: 1 0 100%; }
.g-head .screen-label { order: 2; }
.g-session { flex: 1 1 0; min-width: 0; order: 3; }
.g-nav { display: grid !important; grid-template-columns: none !important; grid-auto-flow: column; grid-auto-columns: 1fr; }
.g-nav > .btn, .g-nav > a.btn { width: auto; min-width: 0; height: 3rem; min-height: 0; padding: 0 0.25rem; font-size: 0.875rem; white-space: nowrap; display: flex; align-items: center; justify-content: center; }
.g-nav .g-qr { width: auto; }

/* 2.12.47: Search inside the Admin Phone Remote: uses the whole screen; thumbnails sized to fit, portrait or landscape */
html.in-remote body { max-width: none; padding-left: 0.625rem; padding-right: 0.625rem; }
html.in-remote .g-sticky { max-width: none; }
html.in-remote #search .ss-results { grid-template-columns: repeat(auto-fill, minmax(min(100%, 10rem), 1fr)); gap: 0.5rem; }
html.in-remote body.thumb-l #search .ss-item, html.in-remote #search .ss-item { grid-template-columns: 1fr; gap: 0.375rem; padding: 0.375rem; align-content: start; }
html.in-remote #search .ss-thumb { width: 100%; height: auto; aspect-ratio: 16 / 9; }
html.in-remote #search .ss-title, html.in-remote body.thumb-l #search .ss-title { font-size: 0.875rem; -webkit-line-clamp: 2; }
html.in-remote #search .ss-meta { font-size: 0.75rem; }
html.in-remote #search .ss-add { width: 100%; min-height: 2.5rem; justify-self: stretch; }
@media (orientation: landscape) {
  html.in-remote #search .ss-results { grid-template-columns: repeat(auto-fill, minmax(min(100%, 11.5rem), 1fr)); }
}
/* === 2.13.111: no gap between the QR key and the Stats key: the QR key takes only the width it needs, the other keys share the rest equally === */
.g-nav { display: flex !important; gap: 0.5rem; }
.g-nav > .btn, .g-nav > a.btn { flex: 1 1 0; min-width: 0; }
.g-nav > .g-qr { flex: 0 0 auto; }

#search .ss-act { display: contents; }

/* Reservation switch on in the app: the Add button is purple "Add to Reservation" */
#search .ss-add.ss-reserve, .ss .ss-add.ss-reserve { background: #8e44ec !important; border-color: #b57cff !important; color: #fff !important; }
.rs-head { color: #b57cff; margin: 0.25rem 0 0.5rem; letter-spacing: .05em; }
.rs-q-row { border-color: #9b59f5 !important; background: rgba(142,68,236,.22) !important; }
.rs-q-row .q-meta b { color: #cfa8ff; }
.g-res-note { margin: 0.5rem 0 1rem; padding: 0.625rem 0.75rem; border: 0.0625rem solid #9b59f5; border-radius: 0.5rem; background: rgba(142,68,236,.18); font-size: 1.8rem; font-weight: 500; color: var(--text); line-height: 1.45; text-align: left; }
.g-closed { margin: 0.5rem 0; padding: 0.75rem; border: 0.0625rem solid #9b59f5; border-radius: 0.5rem; background: rgba(142,68,236,.18); text-align: center; font-weight: 600; }
body.res-closed .ss-add { display: none !important; }

/* === 2.16.8: the phone design on the guest page === */
/* search result cards: big thumbnail; the title with the result number and a small + key on the same line; details underneath */
html body #search .ss-item .ss-info { display: flex !important; flex-direction: column; min-width: 0; }
html body #search .ss-item .ss-titleline { display: flex !important; flex-direction: row !important; align-items: center; gap: 0.5rem; order: 0; }
html body #search .ss-item .ss-title { flex: 1 1 auto; min-width: 0; order: 0 !important; }
html body #search .ss-item .ss-act { display: flex !important; flex-direction: row; align-items: center; gap: 0.5rem; flex: none; order: 1 !important; margin: 0 0 0 auto !important; }
html body #search .ss-item .ss-meta { order: 2; }

/* the result number is a boxed number in front of the title (like the PC search list); the big grey number is gone */

html body #search .ss-item .ss-title .ss-qn { display: inline-flex; align-items: center; justify-content: center; min-width: 1.9em; height: 1.3em; padding: 0 0.3125rem; margin-right: 0.45rem; box-sizing: border-box; border: 1.33px solid var(--accent); border-radius: 0.3125rem; color: var(--accent); font-weight: 800; font-size: 0.9em; line-height: 1; font-variant-numeric: tabular-nums; vertical-align: 0.08em; }
html body #search .ss-item .ss-add { order: 1; width: 2.75rem; min-width: 2.75rem; height: 2.75rem; min-height: 0; padding: 0; margin: 0; justify-self: auto; display: grid; place-items: center; font-size: 1.5rem; font-weight: 700; line-height: 1; border-radius: 0.625rem; background: var(--accent); border: 0.0625rem solid var(--accent); color: var(--accent-ink, #1a1306); }
html body #search .ss-item .ss-add.ss-reserve { width: auto; min-width: 0; padding: 0 0.75rem; font-size: 0.9375rem; white-space: nowrap; }   /* "Add to Reservation" text key */
html body #search .ss-item .ss-added { order: 1; width: 2.75rem; height: 2.75rem; margin: 0; padding: 0; display: grid; place-items: center; border-radius: 0.625rem; background: transparent; border: 0.0625rem solid var(--line); color: var(--muted); font-weight: 700; }
html.in-remote #search .ss-add { width: 2.75rem; justify-self: auto; }
/* queue rows: the number is boxed and in front of the title (like the PC playlist); the thumbnail runs the full width */

/* the title gets the full width; the Delete button sits lower, on the details lines, so it no longer covers the title */
body.thumb-l .q-row { grid-template-columns: 1fr auto; grid-template-areas: "thumb thumb" "title title" "meta del" "when del"; row-gap: 0; }
body.thumb-l .q-info { display: contents; }
body.thumb-l .q-thumb { margin-bottom: 0.5rem; }
body.thumb-l .q-title { grid-area: title; white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }   /* a long title wraps instead of being cut off */
body.thumb-l .q-meta { grid-area: meta; }
body.thumb-l .q-when { grid-area: when; }
body.thumb-l .q-row > .btn { grid-area: del; align-self: end; }
.qn-box { display: inline-block; flex: none; font-weight: 800; color: var(--accent); border: 0.0938rem solid var(--accent); border-radius: 0.3125rem; padding: 0 0.3125rem; line-height: 1.15; margin-right: 0.3125rem; font-variant-numeric: tabular-nums; }



