/* Hostgarden Live. The cloud's and the console's colours, type and logo
   (cloud/server/static/cloud.css), so it feels like the same family. Dark
   rules come twice: under prefers-color-scheme (unless the person chose
   light) and for data-theme="dark". */
:root {
  --bg: #f6f7f9; --panel: #ffffff; --panel-2: #f1f3f6; --line: #e2e5ea;
  --text: #1b1f24; --muted: #5f6873; --faint: #8b939d;
  --accent: #2f6f4f; --accent-2: #3f8f66; --accent-soft: #e5f1ea;
  --bad: #c0392b; --live: #e5484d;
  --brand: #072124; --brand-2: #0d3a35; --brand-text: #e9f4f0;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 32, .06);
  --shadow-lg: 0 12px 40px rgba(16, 24, 32, .18), 0 2px 6px rgba(16, 24, 32, .08);
  --size: 30px;
  --sp1: #2f7fbf; --sp2: #b5532a; --sp3: #7a4fbf; --sp4: #2f8f5f; --sp5: #b8467f; --sp6: #8a7a16; --sp7: #1f8a99; --sp8: #6a6f78;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111416; --panel: #181c1f; --panel-2: #1f2427; --line: #2b3135;
    --text: #e4e8eb; --muted: #a0a9b0; --faint: #6f7a82;
    --accent: #5fb88a; --accent-2: #74c89c; --accent-soft: #1d2e25;
    --shadow: none; --shadow-lg: 0 12px 40px rgba(0, 0, 0, .55);
    --sp1: #6ab0ea; --sp2: #ec9065; --sp3: #b096ef; --sp4: #6fd09b; --sp5: #ec8cbd; --sp6: #d8c45a; --sp7: #5fcbd8; --sp8: #a5abb3;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111416; --panel: #181c1f; --panel-2: #1f2427; --line: #2b3135;
  --text: #e4e8eb; --muted: #a0a9b0; --faint: #6f7a82;
  --accent: #5fb88a; --accent-2: #74c89c; --accent-soft: #1d2e25;
  --shadow: none; --shadow-lg: 0 12px 40px rgba(0, 0, 0, .55);
  --sp1: #6ab0ea; --sp2: #ec9065; --sp3: #b096ef; --sp4: #6fd09b; --sp5: #ec8cbd; --sp6: #d8c45a; --sp7: #5fcbd8; --sp8: #a5abb3;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
[hidden] { display: none !important; }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
.logo { display: block; width: 100%; height: 100%; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 8px 15px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel);
  color: var(--text); font-weight: 600; cursor: pointer; white-space: nowrap; line-height: 1.3;
}
.btn:hover { background: var(--panel-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
:root[data-theme="dark"] .btn.primary { color: #0d1a13; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.primary { color: #0d1a13; } }
.btn.big { padding: 11px 20px; font-size: 16px; }
.btn.wide { width: 100%; }
.btn.danger { color: var(--bad); }
input:not([type=range]), select {
  border: 1px solid var(--line); background: var(--panel); border-radius: 9px; padding: 8px 11px; min-width: 0;
}
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hint { color: var(--muted); font-size: 13px; margin: 8px 0 0; }
.rec { width: 10px; height: 10px; border-radius: 50%; background: currentColor; display: inline-block; }
.linkish { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; }

/* the live dot on the logo */
.mark { position: relative; display: inline-block; }
.live-dot {
  position: absolute; right: -2px; top: -2px; width: 26%; height: 26%; border-radius: 50%;
  background: var(--live); box-shadow: 0 0 0 3px var(--brand);
  animation: blink 1.6s ease-in-out infinite;
}
@keyframes blink { 50% { opacity: .35; } }

/* ---------------- the welcome page ---------------- */
body.home {
  min-height: 100vh; min-height: 100dvh; overflow-x: hidden;
  background: radial-gradient(120% 90% at 50% 0%, #0f4a42 0%, var(--brand-2) 35%, var(--brand) 75%);
  color: var(--brand-text);
}
.stage { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.glow {
  position: absolute; left: 50%; top: 38%; width: 900px; height: 900px; margin: -450px 0 0 -450px; border-radius: 50%;
  background: radial-gradient(circle, rgba(95, 184, 138, .22), rgba(95, 184, 138, 0) 60%);
  animation: breathe 6s ease-in-out infinite;
}
@keyframes breathe { 50% { transform: scale(1.12); opacity: .7; } }
.waves {
  position: absolute; left: 0; right: 0; bottom: 0; height: 34vh; display: flex; align-items: flex-end; gap: 6px;
  padding: 0 3vw; opacity: .5;
  -webkit-mask-image: linear-gradient(to top, #000 10%, transparent);
  mask-image: linear-gradient(to top, #000 10%, transparent);
}
.waves i {
  flex: 1; height: 100%; border-radius: 6px 6px 0 0; transform-origin: bottom;
  background: linear-gradient(to top, rgba(95, 184, 138, .65), rgba(95, 184, 138, .05));
  animation: bar 1.4s ease-in-out infinite;
}
.waves i:nth-child(3n) { animation-duration: 1.1s; }
.waves i:nth-child(3n+1) { animation-duration: 1.7s; }
.waves i:nth-child(4n) { animation-duration: 0.9s; }
.waves i:nth-child(5n+2) { animation-duration: 2.1s; }
.waves i:nth-child(odd) { animation-delay: -.6s; }
.waves i:nth-child(7n) { animation-delay: -1.1s; }
.waves i:nth-child(6n+3) { animation-delay: -.3s; }
@keyframes bar { 0%, 100% { transform: scaleY(.12); } 50% { transform: scaleY(.85); } }
.waves i:nth-child(8n+1) { animation-name: bar2; }
@keyframes bar2 { 0%, 100% { transform: scaleY(.3); } 40% { transform: scaleY(.55); } 70% { transform: scaleY(.15); } }

.words span {
  position: absolute; bottom: -10%; font-weight: 700; color: rgba(233, 244, 240, .0); white-space: nowrap;
  font-size: 20px; padding: 6px 14px; border-radius: 18px 18px 18px 4px;
  background: rgba(233, 244, 240, .0); border: 1px solid rgba(233, 244, 240, 0);
  animation: rise 16s linear infinite;
}
@keyframes rise {
  0% { transform: translateY(0) scale(.9); color: rgba(233, 244, 240, 0); background: rgba(233, 244, 240, 0); border-color: rgba(233, 244, 240, 0); }
  12% { color: rgba(233, 244, 240, .75); background: rgba(233, 244, 240, .06); border-color: rgba(233, 244, 240, .14); }
  70% { color: rgba(233, 244, 240, .55); background: rgba(233, 244, 240, .04); border-color: rgba(233, 244, 240, .1); }
  100% { transform: translateY(-115vh) scale(1.05); color: rgba(233, 244, 240, 0); background: rgba(233, 244, 240, 0); border-color: rgba(233, 244, 240, 0); }
}
.words span:nth-child(1) { left: 4%; animation-delay: 0s; }
.words span:nth-child(2) { left: 82%; animation-delay: -1.5s; font-size: 17px; }
.words span:nth-child(3) { left: 16%; animation-delay: -3s; font-size: 24px; }
.words span:nth-child(4) { left: 70%; animation-delay: -4.5s; }
.words span:nth-child(5) { left: 30%; animation-delay: -6s; font-size: 16px; }
.words span:nth-child(6) { left: 90%; animation-delay: -7.5s; font-size: 22px; }
.words span:nth-child(7) { left: 8%; animation-delay: -9s; font-size: 18px; }
.words span:nth-child(8) { left: 58%; animation-delay: -10.5s; }
.words span:nth-child(9) { left: 40%; animation-delay: -12s; font-size: 15px; }
.words span:nth-child(10) { left: 76%; animation-delay: -13.5s; font-size: 21px; }
.words span:nth-child(11) { left: 22%; animation-delay: -15s; }
.words span:nth-child(12) { left: 64%; animation-delay: -2.2s; font-size: 26px; }
.words span:nth-child(13) { left: 2%; animation-delay: -5.2s; font-size: 22px; }
.words span:nth-child(14) { left: 86%; animation-delay: -8.2s; font-size: 17px; }
.words span:nth-child(15) { left: 48%; animation-delay: -11.2s; font-size: 16px; }
.words span:nth-child(16) { left: 12%; animation-delay: -14.2s; }
.words span:nth-child(17) { left: 94%; animation-delay: -6.8s; font-size: 15px; }
.words span:nth-child(18) { left: 35%; animation-delay: -9.8s; font-size: 19px; }
.words span:nth-child(19) { left: 52%; animation-delay: -12.8s; }
.words span:nth-child(20) { left: 26%; animation-delay: -0.8s; font-size: 16px; }
.words span:nth-child(21) { left: 74%; animation-delay: -3.8s; font-size: 20px; }
.words span:nth-child(22) { left: 6%; animation-delay: -11.8s; font-size: 18px; }
.words span:nth-child(23) { left: 44%; animation-delay: -7s; font-size: 17px; }
.words span:nth-child(24) { left: 66%; animation-delay: -15.5s; font-size: 18px; }

.welcome { position: relative; z-index: 1; max-width: 560px; margin: 0 auto; padding: 9vh 16px 40px; }
.brand { display: flex; align-items: center; gap: 18px; animation: in .7s ease-out both; }
.brand .mark { width: 72px; height: 72px; color: var(--brand-text); flex: none; }
.brand h1 { font-size: 38px; letter-spacing: -.02em; font-weight: 750; }
.brand h1 em { font-style: normal; color: #7fd6a8; }
.brand .tag { margin: 4px 0 0; color: rgba(233, 244, 240, .78); font-size: 16px; }
.brand.small .mark { width: 44px; height: 44px; }
.brand.small h1 { font-size: 26px; }
@keyframes in { from { opacity: 0; transform: translateY(12px); } }

.ticker {
  margin: 28px 0 18px; padding: 14px 16px; border-radius: 14px; min-height: 92px;
  background: rgba(0, 0, 0, .22); border: 1px solid rgba(233, 244, 240, .12); backdrop-filter: blur(6px);
  animation: in .7s .15s ease-out both;
}
.tk-row { display: flex; gap: 10px; align-items: baseline; min-height: 30px; }
.tk-sp { font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 10px; flex: none; }
.tk-sp.sp1 { background: rgba(106, 176, 234, .2); color: #9ccdf3; }
.tk-sp.sp2 { background: rgba(236, 144, 101, .2); color: #f3b08f; }
.tk-text { font-size: 18px; font-weight: 550; }
.tk-text::after { content: ""; display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -2px; background: #7fd6a8; animation: blink 1s steps(1) infinite; }

.card {
  background: var(--panel); color: var(--text); border-radius: 16px; padding: 20px; box-shadow: var(--shadow-lg);
  animation: in .7s .3s ease-out both;
}
.card label { display: block; font-weight: 700; margin-bottom: 8px; }
.card .row { display: flex; gap: 8px; }
.card .row input { flex: 1; }
.card .join { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.card #code { text-transform: uppercase; letter-spacing: .12em; font-weight: 650; }
.card .note { background: var(--accent-soft); padding: 8px 12px; border-radius: 8px; margin: 0 0 14px; }
.card .who { margin-top: 14px; color: var(--muted); font-size: 13px; }
.start .rec { color: #fff; animation: blink 1.4s infinite; }
.mine { margin-top: 18px; }
.mine h2 { font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.myroom {
  display: grid; grid-template-columns: auto 1fr; gap: 0 12px; padding: 9px 11px; border-radius: 10px;
  border: 1px solid var(--line); margin-top: 6px; color: var(--text);
}
.myroom:hover { background: var(--panel-2); }
.myroom .code { grid-row: span 2; font-weight: 750; letter-spacing: .08em; color: var(--accent); align-self: center; }
.myroom .st { font-size: 12px; color: var(--muted); }
.myroom .on { color: var(--live); font-weight: 600; }
.points { list-style: none; padding: 0; margin: 22px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; animation: in .7s .45s ease-out both; }
.points li { font-size: 13.5px; color: rgba(233, 244, 240, .85); background: rgba(6, 28, 30, .78); backdrop-filter: blur(4px); border: 1px solid rgba(233, 244, 240, .08); border-radius: 12px; padding: 10px 12px; }
.points b { color: #fff; }
.foot { position: relative; z-index: 1; text-align: center; font-size: 12px; color: rgba(233, 244, 240, .5); padding: 0 16px 24px; }
body.plain .welcome { padding-top: 18vh; }
@media (max-width: 520px) {
  .brand h1 { font-size: 30px; }
  .brand .mark { width: 56px; height: 56px; }
  .points { grid-template-columns: 1fr; }
  .card .row { flex-wrap: wrap; }
  .card .row .btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .waves i, .words span, .glow, .live-dot, .tk-text::after { animation: none; }
  .words { display: none; }
}

/* ---------------- the room ---------------- */
body.room { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.bar {
  display: flex; align-items: center; gap: 12px; padding: 8px 14px; background: var(--brand); color: var(--brand-text);
  flex: none; flex-wrap: wrap;
}
.brand-sm { display: flex; align-items: center; gap: 8px; color: var(--brand-text); font-weight: 750; font-size: 17px; }
.brand-sm .mark { width: 30px; height: 30px; }
.brand-sm .live-dot { width: 9px; height: 9px; }
.rtitle { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rtitle b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status { font-size: 12px; color: rgba(233, 244, 240, .7); display: flex; align-items: center; gap: 6px; }
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: #8b939d; }
.status.on .dot { background: var(--live); animation: blink 1.2s infinite; }
.status.ok .dot { background: #5fb88a; }
.tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tools .sel { display: flex; align-items: center; gap: 4px; }
.tools select { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .18); color: var(--brand-text); padding: 6px 8px; }
.tools select option { color: #1b1f24; background: #fff; }
.ib {
  display: inline-flex; align-items: center; gap: 5px; height: 34px; min-width: 34px; justify-content: center; padding: 0 9px;
  border-radius: 8px; border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .06); color: var(--brand-text);
  cursor: pointer; font-weight: 650;
}
.ib:hover { background: rgba(255, 255, 255, .14); }
.ib[aria-pressed="false"] { opacity: .55; }
.seg { display: inline-flex; border: 1px solid rgba(255, 255, 255, .18); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; background: transparent; color: var(--brand-text); padding: 6px 11px; cursor: pointer; font-weight: 600; }
.seg button.on { background: #5fb88a; color: #072124; }

.layout { flex: 1; min-height: 0; display: flex; position: relative; }
.captions { flex: 1; overflow-y: auto; padding: 24px clamp(16px, 4vw, 56px) 40px; scroll-behavior: smooth; }
.empty { text-align: center; color: var(--muted); padding-top: 14vh; }
.empty p { font-size: 18px; max-width: 420px; margin: 18px auto 0; }
.eq { display: inline-flex; gap: 5px; height: 46px; align-items: center; }
.eq i { width: 6px; height: 100%; border-radius: 3px; background: var(--accent); animation: bar 1.2s ease-in-out infinite; transform-origin: center; }
.eq i:nth-child(2) { animation-delay: -.2s; } .eq i:nth-child(3) { animation-delay: -.5s; } .eq i:nth-child(4) { animation-delay: -.1s; }
.eq i:nth-child(5) { animation-delay: -.7s; } .eq i:nth-child(6) { animation-delay: -.35s; } .eq i:nth-child(7) { animation-delay: -.9s; }

#feed { max-width: 1100px; margin: 0 auto; }
.blk { display: grid; grid-template-columns: 112px 1fr; gap: 0 18px; padding: 12px 0; animation: pop .35s ease-out both; }
.blk + .blk { border-top: 1px solid var(--line); }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } }
.who-sp { font-size: 13px; font-weight: 750; padding-top: calc(var(--size) * .25); color: var(--spc, var(--sp8)); overflow-wrap: anywhere; }
.who-sp .t { display: block; font-weight: 500; color: var(--faint); font-size: 12px; }
.sents { min-width: 0; }
.sent { margin: 0 0 6px; }
.sent .tr { font-size: var(--size); line-height: 1.32; font-weight: 550; display: block; }
.sent .tr.wait { color: var(--faint); }
.sent .tr.wait::after { content: " …"; }
.sent .tr.fail { font-size: 14px; color: var(--bad); font-weight: 500; }
.sent .og { display: block; font-size: max(14px, calc(var(--size) * .55)); color: var(--muted); line-height: 1.4; margin-top: 2px; }
body.no-orig .sent .og { display: none; }
body.only-orig .sent .og { font-size: var(--size); color: var(--text); font-weight: 550; line-height: 1.32; }
.gist { padding: 16px 0; border-top: 1px solid var(--line); animation: pop .35s ease-out both; }
.gist:first-child { border-top: 0; }
.gist .gt { font-size: var(--size); line-height: 1.35; font-weight: 550; }
.gist .gt.wait { color: var(--faint); }
.gist .gt.wait::after { content: " …"; }
.gist .meta { font-size: 12px; color: var(--faint); margin-bottom: 4px; }
.gist details { margin-top: 6px; color: var(--muted); font-size: max(14px, calc(var(--size) * .5)); }
.gist summary { cursor: pointer; font-size: 13px; color: var(--faint); }
body.no-orig .gist details { display: none; }
.pending { color: var(--faint); font-size: max(14px, calc(var(--size) * .55)); padding: 12px 0; border-top: 1px dashed var(--line); }
.pending b { font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; display: block; margin-bottom: 4px; }
.draft { max-width: 1100px; margin: 8px auto 0; display: flex; gap: 10px; align-items: baseline; color: var(--faint); font-size: max(15px, calc(var(--size) * .7)); font-style: italic; }
.draft .rec { color: var(--live); width: 9px; height: 9px; flex: none; animation: blink 1s infinite; }
.newest {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); border: 0; border-radius: 20px; padding: 8px 16px;
  background: var(--accent); color: #fff; font-weight: 700; box-shadow: var(--shadow-lg); cursor: pointer;
}
.sp1 { --spc: var(--sp1); } .sp2 { --spc: var(--sp2); } .sp3 { --spc: var(--sp3); } .sp4 { --spc: var(--sp4); }
.sp5 { --spc: var(--sp5); } .sp6 { --spc: var(--sp6); } .sp7 { --spc: var(--sp7); } .sp8 { --spc: var(--sp8); }

.panel { width: 320px; flex: none; overflow-y: auto; background: var(--panel); border-left: 1px solid var(--line); padding: 16px; }
.panel section + section { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.panel h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 10px; }
.listen.on { background: var(--live); border-color: var(--live); color: #fff; }
.listen .rec { animation: none; }
.listen.on .rec { animation: blink 1s infinite; }
.meter { height: 6px; border-radius: 3px; background: var(--panel-2); margin: 10px 0 12px; overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), #e0b84a 80%, var(--live)); transition: width .1s linear; }
.fld { display: block; font-size: 13px; color: var(--muted); margin-top: 10px; }
.fld select, .fld input[type=range] { display: block; width: 100%; margin-top: 4px; }
.share { text-align: center; }
.share img { display: block; margin: 0 auto; border-radius: 10px; background: #fff; padding: 6px; image-rendering: pixelated; }
.code-big { font-size: 28px; font-weight: 800; letter-spacing: .16em; margin: 8px 0; color: var(--accent); }
.linkrow { display: flex; gap: 6px; }
.linkrow input { flex: 1; font-size: 13px; }
.speakers .spk { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.speakers .spk i { width: 12px; height: 12px; border-radius: 50%; background: var(--spc); flex: none; }
.speakers .spk input { flex: 1; padding: 6px 9px; }
.end { display: flex; flex-wrap: wrap; gap: 8px; }
.end .hint { width: 100%; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #1b1f24; color: #fff; padding: 10px 16px;
  border-radius: 10px; box-shadow: var(--shadow-lg); z-index: 9; max-width: calc(100vw - 32px);
}
body.full .bar .tools > :not(#full) { display: none; }
body.full .panel { display: none; }

@media (max-width: 860px) {
  .panel { position: absolute; right: 0; top: 0; bottom: 0; z-index: 5; box-shadow: var(--shadow-lg); width: min(340px, 92vw); }
  body.panel-off .panel { display: none; }
  .blk { grid-template-columns: 1fr; }
  .who-sp { padding-top: 0; margin-bottom: 2px; }
  .who-sp .t { display: inline; margin-left: 6px; }
}
@media (min-width: 861px) { body.panel-off .panel { display: none; } }
@media (max-width: 600px) {
  :root { --size: 22px; }
  .bar { padding: 8px 10px; gap: 8px; }
  .tools { width: 100%; }
  .tools .sel { flex: 1; }
  .tools select { width: 100%; }
  .ib span { display: none; }
}
.steps { padding-left: 20px; margin: 14px 0 0; color: var(--muted); }
.steps li { margin: 4px 0; }
.card .hint { overflow-wrap: anywhere; }
.sent.as-said .og { font-size: var(--size); color: var(--text); font-weight: 550; line-height: 1.32; }
.getapp {
  display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px 14px; border-radius: 12px;
  background: rgba(6, 28, 30, .78); border: 1px solid rgba(127, 214, 168, .35); color: rgba(233, 244, 240, .85); font-size: 13.5px;
  animation: in .7s .55s ease-out both;
}
.getapp:hover { background: rgba(13, 58, 53, .9); text-decoration: none; }
.getapp svg { color: #7fd6a8; }
.getapp b { color: #fff; display: block; font-size: 15px; }
