:root {
  --bg: #f4faff;
  --ink: #12263a;
  --muted: #516a80;
  --line: #cfe0ef;
  --panel: #ffffff;
  --primary: #0ea5a4;
  --secondary: #2563eb;
  --warn: #f59e0b;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: "Nunito Sans", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 6% 8%, rgba(14, 165, 164, 0.2), transparent 35%),
    radial-gradient(circle at 94% 10%, rgba(37, 99, 235, 0.17), transparent 35%),
    linear-gradient(180deg, #f6fbff, #eff6ff);
}

.launch {
  width: min(1240px, calc(100% - 2rem));
  margin: 1rem auto;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 36px rgba(18, 38, 58, 0.1);
  padding: 1rem;
  display: grid;
  gap: 1rem;
}

.launch-head {
  text-align: center;
  display: grid;
  gap: 0.4rem;
}

.back-link {
  justify-self: start;
  text-decoration: underline;
  color: #326089;
  font-weight: 700;
  font-size: 0.9rem;
}

.mode-badge {
  margin: 0;
  justify-self: center;
  border: 1px solid #9adfd7;
  border-radius: 999px;
  background: #e8fbf8;
  color: #0c6663;
  font-weight: 800;
  font-size: 0.72rem;
  line-height: 1;
  letter-spacing: 0.03em;
  padding: 0.3rem 0.55rem;
}

h1 {
  margin: 0;
  font-family: "Poppins", sans-serif;
  font-size: clamp(1.5rem, 3.2vw, 2.8rem);
  line-height: 1.1;
  color: #184770;
}

.join-prompt {
  margin: 0;
  font-size: clamp(1rem, 1.8vw, 1.32rem);
  color: var(--muted);
  font-weight: 700;
}

.qr-panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  padding: 1rem;
  display: grid;
  gap: 0.72rem;
  justify-items: center;
}

.qr-shell {
  width: 100%;
  display: grid;
  place-items: center;
  background: #f5f9ff;
  border: 1px dashed #b8cfe6;
  border-radius: 18px;
  padding: 0.9rem;
}

.qr-code {
  width: min(74vw, 760px);
  min-width: 280px;
  min-height: 280px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #d2deea;
  overflow: hidden;
}

.qr-code img,
.qr-code canvas {
  width: 100%;
  height: 100%;
  image-rendering: crisp-edges;
}

.typed-label {
  margin: 0;
  color: #57728c;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.typed-link-wrap {
  margin: 0;
  width: 100%;
  text-align: center;
}

.typed-link {
  color: #1d4fa6;
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-weight: 800;
  text-decoration: underline;
  word-break: break-word;
}

.typed-link:not([href]) {
  color: #5f7892;
  text-decoration: none;
}

.controls {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
}

.btn {
  border: 1px solid;
  border-radius: 12px;
  padding: 0.58rem 0.9rem;
  font-weight: 800;
  font-size: 0.92rem;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  min-width: 154px;
  transition: transform 120ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.primary {
  border-color: #59cdc7;
  color: #fff;
  background: linear-gradient(110deg, var(--primary), var(--secondary));
}

.btn.secondary {
  border-color: #a8c2ed;
  color: #1f4fae;
  background: #edf3ff;
}

.btn.disabled {
  border-color: #d5deea;
  color: #839bb4;
  background: #f5f8fc;
  pointer-events: none;
}

.status {
  margin: 0;
  min-height: 1.1rem;
  font-size: 0.88rem;
  color: #57708a;
  font-weight: 700;
}

.status.warn {
  color: #a7650f;
}

.shortcuts {
  text-align: center;
  color: #5f7b95;
  font-size: 0.8rem;
  font-weight: 700;
}

@media (max-width: 800px) {
  .launch {
    width: min(1240px, calc(100% - 1rem));
    margin: 0.5rem auto;
    padding: 0.7rem;
  }

  .qr-panel {
    padding: 0.72rem;
  }

  .qr-shell {
    padding: 0.6rem;
  }

  .btn {
    min-width: 132px;
    flex: 1 1 180px;
  }
}
