/* The Holler Lounge (B-155). Phone first: 390 x 780 upright, every control 48 px or more. A TV gets a read-only board
   (the rooms and how many are in them, and a code to scan), sized from the screen so it reads across a room. */
.lg-body { margin: 0; min-height: 100%; background: var(--ha-stage); color: var(--ha-text); font-family: var(--ha-font-body); }
.lg { box-sizing: border-box; display: flex; flex-direction: column; min-height: 100dvh; max-width: 560px; margin: 0 auto; padding: 0 14px calc(14px + env(safe-area-inset-bottom)); }
.lg * { box-sizing: border-box; }
.lg button, .lg input { font-family: inherit; }
.lg-wait { margin: 40vh 0 0; text-align: center; font-size: 18px; color: var(--ha-text-dim); }
.lg-top { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 8px 0; background: var(--ha-bg); }
.lg-top h1 { flex: 1; min-width: 0; margin: 0; font: 400 22px/1.1 var(--ha-font-display); text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-online { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 800; color: var(--ha-text-dim); }
.lg-online::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--ha-good); }
.lg-b { min-height: 48px; min-width: 48px; padding: 0 14px; border-radius: var(--ha-radius-md); border: 2px solid var(--ha-line); background: var(--ha-panel-2); color: var(--ha-text); font-size: 17px; font-weight: 800; cursor: pointer; }
.lg-b:focus-visible, .lg-in:focus-visible { outline: none; box-shadow: var(--ha-focus); }
.lg-istv .lg-b:focus, .lg-istv button:focus, .lg-istv a:focus { outline: none; box-shadow: var(--ha-focus); } /* a TV: the ring shows however the focus got there (arrows or a pointer remote) */
.lg-b--go { background: var(--ha-yellow); color: var(--ha-on-yellow); border-color: var(--ha-ink); }
.lg-b--bad { border-color: var(--ha-red); color: var(--ha-bad); background: transparent; }
.lg-b--wide { width: 100%; }
.lg-b[disabled] { opacity: .5; }
.lg-p { margin: 8px 0; font-size: 16px; line-height: 1.4; color: var(--ha-text-dim); }
.lg-safe.lg-safe--room { margin: 2px 0 6px; padding: 4px 10px; font-size: 13px; }
.lg-safe { margin: 6px 0 10px; padding: 8px 12px; border-left: 4px solid var(--ha-yellow); background: var(--ha-panel); border-radius: var(--ha-radius-sm); font-size: 15px; font-weight: 700; }
.lg-h2 { margin: 18px 0 8px; font: 400 18px/1.2 var(--ha-font-display); text-transform: uppercase; letter-spacing: .04em; color: var(--ha-text-dim); }
.lg-rooms { display: flex; flex-direction: column; gap: 8px; }
.lg-room { display: flex; align-items: center; gap: 10px; min-height: 64px; width: 100%; padding: 8px 14px; border-radius: var(--ha-radius-md); border: 2px solid var(--ha-line); background: var(--ha-panel); color: var(--ha-text); text-align: left; cursor: pointer; }
.lg-room b { flex: 1; min-width: 0; font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-room span { flex: 0 0 auto; font-size: 15px; font-weight: 800; color: var(--ha-text-dim); }
.lg-room[data-full="1"] { opacity: .6; }
.lg-room--support { border-color: var(--ha-yellow); flex-wrap: wrap; row-gap: 2px; } /* Holler Support (B-248): the public room, first on the list */
.lg-room--support .lg-sub { flex: 1 0 100%; font-size: 14px; font-weight: 700; color: var(--ha-text-dim); }
.lg-b--private { min-height: 48px; } /* Ask privately: the one-to-one chat (public/support/) */
.lg-safe--support { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lg-safe--support span { flex: 1 1 160px; }
.lg-ln .lg-b--private { display: block; margin-top: 6px; }
.lg-host.lg-host--ai { background: #7FE3FF; color: #10233A; } /* the Support room's AI helper: its own color, never mistaken for a person */
.lg-host.lg-host--staff { background: var(--ha-good, #3DDC84); color: #0E2A18; } /* a person at Holler answering from /admin */
.lg-ln--ai { border-left: 4px solid #7FE3FF; padding-left: 8px; }
.lg-ln--staff { border-left: 4px solid var(--ha-good, #3DDC84); padding-left: 8px; }
.lg-row { display: flex; gap: 8px; align-items: stretch; }
.lg-in { flex: 1; min-width: 0; min-height: 52px; padding: 0 12px; border-radius: var(--ha-radius-md); border: 2px solid var(--ha-line); background: var(--ha-bg-deep); color: var(--ha-text); font-size: 18px; font-weight: 600; }
.lg-in--code { text-transform: uppercase; letter-spacing: .3em; font-weight: 900; }
.lg-me { display: flex; align-items: center; gap: 10px; margin-top: 16px; font-size: 17px; }
.lg-me b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-say { min-height: 22px; margin: 6px 0 0; font-size: 15px; font-weight: 800; color: var(--ha-bad); }

/* a room */
.lg--room { height: 100dvh; min-height: 0; }
.lg-people { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 8px; flex: 0 0 auto; scrollbar-width: none; }
.lg-person { flex: 0 0 auto; max-width: 160px; min-height: 48px; padding: 0 12px; border-radius: var(--ha-radius-pill); border: 2px solid var(--ha-line); background: var(--ha-panel); color: var(--ha-text); font-size: 15px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.lg-person[data-me="1"] { border-color: var(--ha-cyan); cursor: default; }
.lg-person[data-muted="1"] { opacity: .5; text-decoration: line-through; }
.lg-log { flex: 1 1 auto; min-height: 120px; overflow-y: auto; padding: 6px 10px; border: 2px solid var(--ha-line); border-radius: var(--ha-radius-md); background: var(--ha-bg-deep); }
.lg-ln { margin: 7px 0; font-size: 17px; line-height: 1.35; overflow-wrap: anywhere; white-space: pre-wrap; }
.lg-ln b { margin-right: 6px; color: var(--ha-text-dim); }
.lg-ln[data-mine="1"] b { color: var(--ha-yellow); }
.lg-ln--emo span { font-size: 26px; line-height: 1; }
.lg-inv { display: flex; align-items: center; gap: 10px; margin: 8px 0; padding: 8px 10px; border-radius: var(--ha-radius-md); background: var(--ha-panel); border: 2px solid var(--ha-yellow); font-size: 16px; font-weight: 700; }
.lg-inv span { flex: 1; min-width: 0; }
.lg-compose { flex: 0 0 auto; display: flex; flex-direction: column; gap: 8px; padding-top: 8px; }
.lg-note { margin: 0; font-size: 15px; line-height: 1.35; color: var(--ha-text-dim); }
.lg-quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.lg-quick .lg-e { min-height: 52px; font-size: 26px; border-radius: var(--ha-radius-md); border: 2px solid var(--ha-line); background: var(--ha-bg-deep); color: var(--ha-text); cursor: pointer; }
.lg-lines[hidden], .lg-quick[hidden] { display: none; }
.lg-qhead { grid-column: 1 / -1; margin: 6px 0 0; font-weight: 800; font-size: 14px; color: var(--ha-text-dim, #c9b8f0); }
textarea.lg-in { box-sizing: border-box; height: 52px; padding: 13px 12px; resize: none; line-height: 1.3; font-family: inherit; white-space: nowrap; overflow: hidden; }
.lg-lines { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.lg-lines .lg-l { min-height: 52px; padding: 4px 8px; border-radius: var(--ha-radius-md); border: 2px solid var(--ha-line); background: var(--ha-bg-deep); color: var(--ha-text); font-size: 15px; font-weight: 800; line-height: 1.15; cursor: pointer; }
.lg-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* the person sheet */
.lg-sheet { position: fixed; inset: 0; z-index: 20; display: flex; align-items: flex-end; justify-content: center; background: color-mix(in srgb, var(--ha-bg-deep) 80%, transparent); }
.lg-sheet .lg-box { width: 100%; max-width: 460px; max-height: 92%; overflow-y: auto; padding: 14px 14px calc(14px + env(safe-area-inset-bottom)); border-top: 3px solid var(--ha-yellow); border-radius: var(--ha-radius-xl) var(--ha-radius-xl) 0 0; background: var(--ha-panel); box-shadow: var(--ha-shadow-lift); display: flex; flex-direction: column; gap: 8px; }
.lg-sheet h2 { margin: 0 0 4px; font: 400 22px/1.15 var(--ha-font-display); overflow-wrap: anywhere; }

/* the feel: times, hosts, @names, replies, reactions, comings and goings, typing */
.lg-ln { position: relative; cursor: pointer; border-radius: var(--ha-radius-sm); padding: 2px 4px; }
.lg-at { margin-right: 6px; font-size: 12px; font-weight: 700; color: var(--ha-text-dim); opacity: .8; }
.lg-host { margin-left: 6px; padding: 1px 6px; border-radius: 6px; background: var(--ha-yellow); color: var(--ha-on-yellow); font-size: 11px; font-weight: 900; letter-spacing: .06em; vertical-align: 2px; }
.lg-ln--host { background: color-mix(in srgb, var(--ha-yellow) 12%, transparent); }
.lg-ln--me { background: color-mix(in srgb, var(--ha-cyan) 16%, transparent); box-shadow: inset 3px 0 0 var(--ha-cyan); }
.lg-quote { margin: 0 0 2px; padding: 2px 8px; border-left: 3px solid var(--ha-line); font-size: 14px; color: var(--ha-text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-quote b { margin-right: 6px; }
.lg-rx { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.lg-rx:empty { display: none; }
.lg-rc { min-height: 32px; padding: 0 8px; border-radius: var(--ha-radius-pill); border: 2px solid var(--ha-line); background: var(--ha-panel); color: var(--ha-text); font-size: 15px; font-weight: 800; }
button.lg-rc { min-height: 48px; min-width: 56px; }
.lg-sys { margin: 6px 0; font-size: 14px; font-style: italic; color: var(--ha-text-dim); text-align: center; }
.lg-typing { flex: 0 0 auto; min-height: 20px; padding: 2px 4px 0; font-size: 14px; font-style: italic; color: var(--ha-text-dim); }
.lg-replying { display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 10px; border-left: 3px solid var(--ha-cyan); background: var(--ha-panel); border-radius: var(--ha-radius-sm); font-size: 14px; }
.lg-replying span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-top #lg-bell { padding: 0 10px; font-size: 20px; }

/* a TV: the room live, big, with who is here and a code to scan into it; read from the couch */
.lg--tv { max-width: none; height: 100vh; min-height: 0; padding: 3vh 3vw; overflow: hidden; display: grid; grid-template-columns: 1fr min(30vw, 46vh); grid-template-rows: auto minmax(0, 1fr) auto; gap: 2vh 2.5vw; }
.lg--tv .lg-tvhead { grid-column: 1 / 3; display: flex; align-items: center; gap: 3vw; }
.lg--tv .lg-tvhead h1 { flex: 1; min-width: 0; margin: 0; font: 400 min(5.4vh, 3.8vw)/1 var(--ha-font-display); text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg--tv .lg-online { font-size: min(3.2vh, 2.2vw); }
.lg--tv .lg-online::before { width: 1.6vh; height: 1.6vh; }
.lg--tv > * { min-width: 0; }
.lg--tv .lg-tvmain { display: flex; flex-direction: column; min-height: 0; }
.lg--tv .lg-tvlog { flex: 1; min-height: 0; overflow: hidden; padding: 1vh 1.4vw; border-width: 3px; }
.lg--tv .lg-ln { margin: 0.9vh 0; font-size: min(3.6vh, 2.4vw); line-height: 1.3; cursor: default; }
.lg--tv .lg-ln--emo span { font-size: min(5vh, 3.4vw); }
.lg--tv .lg-at { font-size: min(2vh, 1.4vw); }
.lg--tv .lg-host { font-size: min(1.8vh, 1.2vw); }
.lg--tv .lg-quote { font-size: min(2.4vh, 1.6vw); }
.lg--tv .lg-rc { min-height: 0; padding: 0.2vh 0.8vw; font-size: min(2.4vh, 1.6vw); }
.lg--tv .lg-sys { font-size: min(2.6vh, 1.8vw); }
.lg--tv .lg-inv { font-size: min(3vh, 2vw); }
/* "Ann is typing" on the TV: a lit pill with dots that bounce, big enough to catch from the couch */
.lg--tv .lg-typing { align-self: flex-start; min-height: min(6vh, 4vw); margin-top: 1vh; padding: 0 1.4vw; display: inline-flex; align-items: center; gap: 0.8vw; border-radius: var(--ha-radius-pill); font-size: min(3.6vh, 2.4vw); font-weight: 900; font-style: normal; color: var(--ha-on-yellow); background: var(--ha-yellow); box-shadow: 0 0 2vh color-mix(in srgb, var(--ha-yellow) 50%, transparent); }
.lg--tv .lg-typing:empty { visibility: hidden; }
.lg--tv .lg-typing::after { content: '• • •'; letter-spacing: .1em; animation: lg-dots 1s steps(3, end) infinite; }
@keyframes lg-dots { 0% { clip-path: inset(0 66% 0 0); } 33% { clip-path: inset(0 33% 0 0); } 66%, 100% { clip-path: inset(0 0 0 0); } }
/* emoji float up big across the TV and fade */
.lg-float { position: fixed; bottom: -16vh; z-index: 50; font-size: min(16vh, 11vw); line-height: 1; pointer-events: none; animation: lg-float 3.6s cubic-bezier(.2,.7,.3,1) forwards; filter: drop-shadow(0 1vh 1.4vh rgba(0,0,0,.35)); }
@keyframes lg-float {
  0% { transform: translate(0, 0) scale(.3) rotate(0deg); opacity: 0; }
  12% { transform: translate(calc(var(--dx) * .15), -18vh) scale(1.25) rotate(var(--r)); opacity: 1; }
  30% { transform: translate(calc(var(--dx) * .35), -38vh) scale(1) rotate(calc(var(--r) * -.5)); }
  70% { transform: translate(calc(var(--dx) * .8), -72vh) scale(1.05) rotate(var(--r)); opacity: 1; }
  100% { transform: translate(var(--dx), -98vh) scale(.9) rotate(0deg); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .lg-float { animation-duration: 2s; } .lg--tv .lg-typing::after { animation: none; } }
.lg--tv .lg-tvside { display: flex; flex-direction: column; align-items: center; gap: 1.2vh; min-height: 0; overflow: hidden; text-align: center; }
.lg--tv .lg-tvside p { margin: 0; font-size: min(2.6vh, 1.8vw); font-weight: 800; }
.lg--tv .lg-tvwho { align-self: stretch; text-align: left; color: var(--ha-text-dim); }
.lg--tv .lg-tvpeople { align-self: stretch; display: flex; flex-wrap: wrap; gap: 0.8vh 0.6vw; max-height: 26vh; overflow: hidden; }
.lg--tv .lg-tvp { padding: 0.5vh 0.8vw; border-radius: var(--ha-radius-pill); background: var(--ha-panel); border: 2px solid var(--ha-line); font-size: min(2.4vh, 1.6vw); font-weight: 800; }
.lg--tv .lg-dim { color: var(--ha-text-dim); }
.lg--tv .lg-qr { width: min(26vh, 20vw); height: min(26vh, 20vw); flex: 0 0 auto; padding: 1.2vh; background: #fff; border-radius: var(--ha-radius-lg); border: 4px solid var(--ha-yellow); }
.lg--tv .lg-qr svg { display: block; width: 100%; height: 100%; }
.lg--tv .lg-addr { color: var(--ha-yellow); }
.lg--tv .lg-tvfoot { grid-column: 1 / 3; display: flex; align-items: center; gap: 1vw; min-width: 0; }
.lg--tv .lg-tvrooms { flex: 1; display: flex; gap: 0.8vw; min-width: 0; overflow: hidden; }
.lg--tv .lg-tvrooms .lg-b { flex: 1 1 0; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 0.6vw; }
.lg--tv .lg-tvrooms .lg-rn { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg--tv .lg-tvrooms .lg-rc2 { flex: 0 0 auto; padding: 0 0.5vw; border-radius: var(--ha-radius-pill); background: color-mix(in srgb, var(--ha-bg-deep) 50%, transparent); }
.lg--tv .lg-tvfoot .lg-b { min-height: max(48px, 6.5vh); padding: 0 1.4vw; font-size: min(2.6vh, 1.7vw); white-space: nowrap; }
