/* Meet · Petr Hess Vision. Paleta jako Desk a web: krémová pro lobby a správu,
   hluboká inkoustová (#1D1836) pro samotný hovor, aby vynikla videa.
   Každý účastník dostane jednu z pěti barev značky; když mluví, jeho dlaždice se rozsvítí jeho barvou. */
:root {
  --bg: #FFF8EE; --card: #FFFFFF; --soft: #FFF1DE;
  --ink: #1D1836; --ink2: #2A2449; --ink3: #3A3361; --text: #3A3550; --muted: #6A6585; --line: rgba(46,32,96,.12); --line2: rgba(46,32,96,.24);
  --coral: #F0355B; --coral-d: #C81E45; --sun: #FFC83D; --mint: #19C8A6; --mint-d: #0B8F6A; --sky: #3D8BFF; --grape: #8B5CF6; --alert: #D92D20;
  --display: "Bricolage Grotesque", system-ui, sans-serif; --body: "Nunito Sans", system-ui, sans-serif;
  --r: 18px; --shadow: 0 1px 0 rgba(46,32,96,.04), 0 14px 34px -22px rgba(46,32,96,.35);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 var(--body); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--display); color: var(--ink); letter-spacing: -.02em; margin: 0; line-height: 1.12; }
h1 { font-size: clamp(28px, 4vw, 42px); font-weight: 800; } h2 { font-size: 21px; font-weight: 800; } h3 { font-size: 16.5px; font-weight: 700; }
p { margin: 0; } a { color: var(--coral-d); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; border-radius: 8px; }
.blobs { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.blobs i { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .32; }
.blobs i:nth-child(1) { width: 420px; height: 420px; background: var(--sun); top: -160px; right: -80px; }
.blobs i:nth-child(2) { width: 360px; height: 360px; background: var(--coral); bottom: -180px; left: 22%; opacity: .16; }
.blobs i:nth-child(3) { width: 300px; height: 300px; background: var(--mint); top: 38%; right: -140px; opacity: .2; }
.mark { display: inline-block; width: 30px; height: 30px; border-radius: 28%; background: url(/logo.svg) center/cover; flex: none; box-shadow: 0 8px 16px -8px rgba(240,53,91,.7); }
.brand { display: flex; align-items: center; gap: 10px; font: 800 16px var(--display); color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.brand small { font: 800 12px var(--body); color: var(--coral-d); margin-left: 2px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 999px; border: 1.5px solid var(--line2); background: var(--card); color: var(--ink); font-weight: 800; font-size: 15px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--ink); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; } .btn.primary:hover { background: var(--coral); border-color: var(--coral); }
.btn.go { background: var(--coral); border-color: var(--coral); color: #fff; font-size: 16px; min-height: 52px; padding: 0 28px; } .btn.go:hover { background: var(--coral-d); border-color: var(--coral-d); }
.btn.danger { color: var(--alert); } .btn.small { min-height: 34px; padding: 0 14px; font-size: 13.5px; } .btn.wide { width: 100%; }
.btn[disabled] { opacity: .5; cursor: default; }
label { display: block; font-size: 13.5px; font-weight: 800; color: var(--ink); margin: 0 0 6px; }
input, select { width: 100%; min-height: 46px; padding: 9px 14px; border: 1.5px solid var(--line2); border-radius: 14px; background: #fff; }
input:focus, select:focus { outline: 0; border-color: var(--sky); box-shadow: 0 0 0 3px rgba(61,139,255,.2); }
.err { color: var(--alert); font-weight: 700; font-size: 14px; min-height: 20px; }
.muted { color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: 110px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 14px; font-weight: 700; font-size: 14.5px; opacity: 0; transition: .25s; z-index: 90; max-width: calc(100vw - 32px); box-shadow: 0 18px 40px -18px rgba(0,0,0,.6); pointer-events: none; }
.toast.on { opacity: 1; transform: translateX(-50%); } .toast.bad { background: var(--alert); }

/* ───── správa místností (index) ───── */
.page { position: relative; z-index: 1; max-width: 1080px; margin: 0 auto; padding: 26px 22px 60px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 40px; }
.login-wrap { position: relative; z-index: 1; min-height: 100%; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(420px, 100%); background: var(--card); border-radius: 26px; padding: 34px 30px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.login-card .mark { width: 54px; height: 54px; margin-bottom: 18px; }
.login-card h1 { font-size: 30px; margin-bottom: 6px; } .login-card p { margin-bottom: 20px; }
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 28px; align-items: end; margin-bottom: 30px; }
.hero h1 { max-width: 14ch; } .hero p { margin-top: 12px; font-size: 17px; max-width: 42ch; }
.newroom { background: var(--card); border-radius: 22px; padding: 20px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.newroom form { display: flex; gap: 10px; } .newroom input { flex: 1; }
.notice { background: #FFF4D6; border: 1.5px solid #F5D27A; border-radius: 18px; padding: 16px 18px; margin-bottom: 24px; color: var(--ink); }
.notice b { display: block; margin-bottom: 4px; font-family: var(--display); font-size: 17px; }
.rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.room { background: var(--card); border-radius: 22px; padding: 20px; border: 1px solid var(--line); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; }
.room .link { font: 700 13.5px var(--body); color: var(--muted); word-break: break-all; }
.room .acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 800; color: var(--mint-d); background: #E3FAF3; border-radius: 99px; padding: 3px 10px; }
.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--mint); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.empty { text-align: center; padding: 50px 20px; background: var(--card); border-radius: 22px; border: 1.5px dashed var(--line2); }
.empty h3 { margin-bottom: 6px; }

/* ───── lobby ───── */
.lobby { position: relative; z-index: 1; min-height: 100%; display: grid; place-items: center; padding: 26px 20px; }
.lobby-in { width: min(1040px, 100%); display: grid; grid-template-columns: 1.35fr 1fr; gap: 34px; align-items: center; }
.preview { position: relative; aspect-ratio: 16/10; border-radius: 26px; overflow: hidden; background: var(--ink); box-shadow: 0 30px 60px -30px rgba(29,24,54,.7); }
.preview video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); display: block; }
.preview .off { position: absolute; inset: 0; display: grid; place-items: center; color: #CFC8EA; font-weight: 700; text-align: center; padding: 20px; }
.preview .ctrl { position: absolute; left: 0; right: 0; bottom: 16px; display: flex; justify-content: center; gap: 12px; }
.lobby-side h1 { margin: 8px 0 8px; } .lobby-side .who { margin: 22px 0 14px; }
.devices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.devices select { min-height: 40px; font-size: 13.5px; padding: 6px 10px; border-radius: 12px; }
.meter { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; margin-top: 10px; }
.meter i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--mint), var(--sun), var(--coral)); transition: width .08s; }

/* kulatá tlačítka (lobby i hovor) */
.rb { width: 52px; height: 52px; border-radius: 50%; border: 0; display: inline-grid; place-items: center; cursor: pointer; background: rgba(255,255,255,.14); color: #fff; backdrop-filter: blur(8px); position: relative; transition: background .15s, transform .15s; }
.rb:hover { background: rgba(255,255,255,.24); } .rb:active { transform: scale(.94); }
.rb.off { background: #fff; color: var(--alert); }
.rb.on { background: var(--sun); color: var(--ink); }
.rb.leave { width: 68px; border-radius: 26px; background: var(--coral); } .rb.leave:hover { background: var(--coral-d); }
.rb svg { width: 22px; height: 22px; }
.rb .badge { position: absolute; top: -2px; right: -2px; min-width: 19px; height: 19px; border-radius: 99px; background: var(--coral); color: #fff; font: 800 11px/19px var(--body); padding: 0 5px; }

/* ───── hovor ───── */
body.in-call { background: var(--ink); color: #E9E5F7; overflow: hidden; }
.call { position: fixed; inset: 0; display: grid; grid-template-rows: auto 1fr auto; }
.call-top { display: flex; align-items: center; gap: 14px; padding: 14px 20px; }
.call-top .brand { color: #fff; } .call-top .rname { font-weight: 800; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.call-top .clock { color: #A9A1CC; font-variant-numeric: tabular-nums; font-size: 14px; }
.call-top .sp { flex: 1; }
.pill { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 14px; border-radius: 99px; background: rgba(255,255,255,.1); border: 0; color: #fff; font-weight: 800; font-size: 13.5px; cursor: pointer; }
.pill:hover { background: rgba(255,255,255,.18); } .pill svg { width: 17px; height: 17px; }
.call-mid { display: grid; grid-template-columns: 1fr auto; min-height: 0; padding: 0 16px; gap: 14px; }
.stage { position: relative; min-height: 0; display: grid; gap: 12px; align-content: center; grid-template-columns: repeat(var(--cols, 1), 1fr); }
.tile { position: relative; border-radius: 22px; overflow: hidden; background: var(--ink2); aspect-ratio: 16/9; max-height: 100%; min-height: 0; box-shadow: 0 0 0 0 var(--c); transition: box-shadow .18s; }
.tile.speaking { box-shadow: 0 0 0 3px var(--c), 0 0 34px -4px var(--c); }
.tile video { width: 100%; height: 100%; object-fit: cover; display: block; background: var(--ink2); }
.tile.me video { transform: scaleX(-1); }
.tile.screen video { object-fit: contain; background: #120F24; }
.tile.nocam video { opacity: 0; }
.tile .av { position: absolute; inset: 0; display: none; place-items: center; }
.tile.nocam .av { display: grid; }
.tile .av span { width: clamp(64px, 22%, 128px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: #fff; font: 800 clamp(24px, 3.4vw, 46px) var(--display); }
.tile .name { position: absolute; left: 12px; bottom: 12px; display: flex; align-items: center; gap: 7px; max-width: calc(100% - 24px); padding: 5px 11px 5px 9px; border-radius: 99px; background: rgba(18,15,36,.62); backdrop-filter: blur(6px); color: #fff; font-weight: 800; font-size: 13.5px; }
.tile .name i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; }
.tile .name b { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .name svg { width: 15px; height: 15px; color: #FF8FA3; flex: none; }
.tile .hand { position: absolute; top: 12px; left: 12px; font-size: 24px; animation: wave 1.2s ease-in-out infinite; transform-origin: 70% 90%; }
@keyframes wave { 50% { transform: rotate(14deg); } }
.tile .kick { position: absolute; top: 10px; right: 10px; opacity: 0; transition: opacity .15s; }
.tile:hover .kick { opacity: 1; }
.float { position: absolute; bottom: 40px; font-size: 40px; pointer-events: none; animation: rise 2.4s ease-out forwards; }
@keyframes rise { from { transform: translateY(0) scale(.6); opacity: 0; } 15% { opacity: 1; transform: translateY(-20px) scale(1.1); } to { transform: translateY(-180px) scale(1); opacity: 0; } }
.stage.has-screen { grid-template-columns: 1fr 240px; grid-auto-rows: min-content; align-content: start; }
.stage.has-screen .tile.screen { grid-column: 1; grid-row: 1 / span 20; aspect-ratio: auto; height: 100%; }
.stage.has-screen .tile:not(.screen) { grid-column: 2; }
.waiting { position: absolute; inset: auto 0 18px; text-align: center; color: #A9A1CC; font-weight: 700; pointer-events: none; }
.side { width: 340px; background: #fff; color: var(--text); border-radius: 22px; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.side-h { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 10px; }
.side-h h2 { font-size: 18px; }
.x { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--soft); cursor: pointer; font-size: 18px; color: var(--ink); }
.chat-list { flex: 1; overflow-y: auto; padding: 4px 18px 12px; display: flex; flex-direction: column; gap: 12px; }
.chat-item .who { display: flex; align-items: center; gap: 7px; font-weight: 800; color: var(--ink); font-size: 13.5px; }
.chat-item .who i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.chat-item .who time { color: var(--muted); font-weight: 600; font-size: 12px; }
.chat-item p { margin-top: 2px; white-space: pre-wrap; word-wrap: break-word; }
.chat-item p a { color: var(--sky); }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.chat-form input { min-height: 42px; border-radius: 99px; }
.people { padding: 4px 12px 16px; overflow-y: auto; }
.person { display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 14px; }
.person:hover { background: var(--soft); }
.person .dot { width: 34px; height: 34px; border-radius: 50%; background: var(--c); color: #fff; display: grid; place-items: center; font: 800 14px var(--display); flex: none; }
.person b { flex: 1; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .person em { font-style: normal; color: var(--muted); font-size: 12.5px; font-weight: 700; }
.person svg { width: 18px; height: 18px; color: var(--muted); } .person .offi { color: var(--alert); }
.call-bar { display: flex; justify-content: center; align-items: center; gap: 12px; padding: 16px; flex-wrap: wrap; }
.call-bar .grp { display: flex; gap: 10px; padding: 8px; border-radius: 99px; background: rgba(255,255,255,.07); }
.reacts { position: absolute; bottom: 64px; left: 50%; transform: translateX(-50%); display: flex; gap: 4px; padding: 6px; border-radius: 99px; background: #fff; box-shadow: 0 18px 40px -16px rgba(0,0,0,.6); }
.reacts button { width: 44px; height: 44px; border: 0; background: none; border-radius: 50%; font-size: 24px; cursor: pointer; } .reacts button:hover { background: var(--soft); }
.rel { position: relative; }

/* konec hovoru */
.endcard { text-align: center; max-width: 460px; }
.endcard .mark { width: 54px; height: 54px; margin-bottom: 18px; } .endcard h1 { font-size: 32px; margin-bottom: 10px; } .endcard p { margin-bottom: 22px; }

@media (max-width: 900px) {
  .hero, .lobby-in { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 70px 10px 100px; width: auto; z-index: 20; }
  .stage.has-screen { grid-template-columns: 1fr; }
  .stage.has-screen .tile:not(.screen) { display: none; }
  .call-top .clock, .call-top .hide-s { display: none; }
}
@media (max-width: 560px) {
  .rb { width: 46px; height: 46px; } .rb.leave { width: 58px; } .call-bar { gap: 6px; padding: 10px 6px 14px; } .call-bar .grp { gap: 6px; padding: 6px; }
  .newroom form { flex-direction: column; } .devices { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
