:root {
  --bg: #0f1116;
  --panel: #181b23;
  --panel-2: #1f232d;
  --line: #2a2f3b;
  --text: #eef1f6;
  --dim: #9aa3b2;
  --accent: #4d8ae5;
  --ok: #3ac97e;
  --off: #e5484d;
  --radius: 16px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100dvh;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.dim { color: var(--dim); font-weight: 400; }

/* ---------- horní lišta ---------- */
.bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: rgba(15, 17, 22, .85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.brand { font-weight: 650; font-size: 15px; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--dim);
  white-space: nowrap;
}

.status .dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--off);
  transition: background .2s;
}

.status.online .dot { background: var(--ok); box-shadow: 0 0 0 4px rgba(58, 201, 126, .16); }

main {
  max-width: 560px;
  margin: 0 auto;
  padding: 20px 18px 48px;
  display: grid;
  gap: 16px;
}

/* ---------- velké číslo ---------- */
.hero {
  text-align: center;
  padding: 26px 18px 22px;
  background: linear-gradient(160deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.hero-label { font-size: 13px; color: var(--dim); letter-spacing: .04em; text-transform: uppercase; }

.hero-number {
  font-size: clamp(64px, 22vw, 108px);
  font-weight: 750;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  margin: 4px 0 2px;
}

.hero-number.bump { animation: bump .35s ease; }

.hero-sub { font-size: 14px; color: var(--dim); }

@keyframes bump {
  0% { transform: scale(1); }
  40% { transform: scale(1.12); color: var(--accent); }
  100% { transform: scale(1); }
}

/* ---------- identita ---------- */
.me { text-align: center; font-size: 15px; color: var(--dim); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 13px;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 600;
}

.chip::before {
  content: "";
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--chip-color, var(--accent));
}

/* ---------- panely ---------- */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

.panel-title { font-size: 13px; color: var(--dim); margin-bottom: 12px; font-weight: 600; }

/* ---------- tlačítko ---------- */
.tap {
  width: 100%;
  border: none;
  border-radius: 14px;
  padding: 26px 18px;
  background: linear-gradient(165deg, #5b96ea, #3a6fd0);
  color: #fff;
  font-family: inherit;
  cursor: pointer;
  display: grid;
  gap: 4px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform .08s, filter .15s;
}

.tap:active { transform: scale(.975); filter: brightness(1.12); }
.tap:disabled { opacity: .45; cursor: not-allowed; }
.tap-label { font-size: 30px; font-weight: 700; }
.tap-hint { font-size: 13px; opacity: .82; }

.counter {
  margin-top: 14px;
  text-align: center;
  font-size: 15px;
  color: var(--dim);
}

.counter strong { color: var(--text); font-size: 19px; font-variant-numeric: tabular-nums; }

.last-tap {
  margin-top: 6px;
  font-size: 13px;
  min-height: 18px;
  transition: opacity .3s;
}

/* ---------- reakce ---------- */
.reactions { display: flex; flex-wrap: wrap; gap: 10px; }

.reactions button {
  flex: 1 1 60px;
  font-size: 28px;
  padding: 12px 0;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform .08s, background .15s;
}

.reactions button:active { transform: scale(.92); background: #2a3040; }

/* ---------- seznam zařízení ---------- */
.roster { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }

.roster li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  padding: 8px 12px;
  background: var(--panel-2);
  border-radius: 10px;
  animation: fadein .25s ease;
}

.roster li .swatch { width: 12px; height: 12px; border-radius: 50%; flex: 0 0 auto; }
.roster li .tag { margin-left: auto; font-size: 12px; color: var(--dim); }

@keyframes fadein { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; } }

/* ---------- létající emoji ---------- */
.floaties {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 10;
}

.floatie {
  position: absolute;
  bottom: 12%;
  font-size: 40px;
  animation: fly 2.2s ease-out forwards;
}

@keyframes fly {
  0% { opacity: 0; transform: translateY(0) scale(.6); }
  15% { opacity: 1; transform: translateY(-20px) scale(1.1); }
  100% { opacity: 0; transform: translateY(-46vh) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .floatie, .hero-number.bump, .roster li { animation: none; }
}
