/* ============ Topic page layout ============ */
.topic-hero {
  padding: 9rem 0 3.5rem;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(ellipse 60% 50% at 70% 0%, rgba(239, 72, 44, 0.1), transparent),
    radial-gradient(ellipse 50% 40% at 20% 10%, rgba(245, 185, 66, 0.06), transparent);
}

.topic-hero__back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  margin-bottom: 1.6rem;
  transition: color 0.25s;
}
.topic-hero__back:hover { color: var(--gold); }

.topic-hero__title {
  font-size: clamp(2rem, 5.5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.topic-hero__lead {
  color: var(--text-dim);
  font-size: 1.08rem;
  max-width: 700px;
}
.topic-hero__lead strong { color: var(--text); }

/* ============ Widget shell ============ */
.widget {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.3rem, 3vw, 2.2rem);
}

.widget__title {
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.widget__hint { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 1.4rem; }

/* ============ Encryption playground ============ */
.enc__input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.9rem 1.1rem;
  resize: vertical;
  min-height: 70px;
  margin-bottom: 1.2rem;
}
.enc__input:focus { outline: 2px solid rgba(245, 185, 66, 0.5); border-color: transparent; }

.enc__panels { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 640px) { .enc__panels { grid-template-columns: 1fr; } }

.enc__panel {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  min-height: 120px;
}
.enc__panel--plain { border-color: rgba(239, 72, 44, 0.4); }
.enc__panel--cipher { border-color: rgba(45, 212, 191, 0.4); }

.enc__panel-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.enc__panel--plain .enc__panel-label { color: #ff8b76; }
.enc__panel--cipher .enc__panel-label { color: var(--teal); }

.enc__text {
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  font-size: 0.85rem;
  word-break: break-all;
  color: var(--text-dim);
  line-height: 1.7;
}
.enc__panel--plain .enc__text { color: var(--text); }

/* ============ Tor onion demo ============ */
.tor__stage {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.3rem;
  position: relative;
  padding: 1.4rem 0.2rem 0.6rem;
  min-height: 120px;
}

.tor__node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--text-dim);
  z-index: 2;
  width: 72px;
  text-align: center;
}
.tor__node-icon {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.tor__wire {
  flex: 1;
  height: 2px;
  margin-top: 26px;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,0.22) 0 8px, transparent 8px 16px);
}

.tor__packet {
  position: absolute;
  top: 30px;
  left: 0;
  z-index: 3;
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.tor__layer {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
}
.tor__layer--3 { border: 3px solid #a78bfa; inset: -1px; }
.tor__layer--2 { border: 3px solid var(--teal); inset: 5px; }
.tor__layer--1 { border: 3px solid var(--gold); inset: 11px; }

.tor__status {
  border-top: 1px solid var(--line);
  margin-top: 1.2rem;
  padding-top: 1rem;
  font-size: 0.92rem;
  color: var(--text-dim);
  text-align: center;
  min-height: 3em;
}
.tor__status strong { color: var(--gold); }

@media (max-width: 560px) {
  .tor__node { width: 52px; }
  .tor__node-icon { width: 40px; height: 40px; font-size: 1rem; }
}

/* ============ Checklist + score ring ============ */
.checkup { display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: center; }
@media (max-width: 700px) { .checkup { grid-template-columns: 1fr; } }

.checkup__list { display: flex; flex-direction: column; gap: 0.6rem; }

#checkup-widget .check-item,
.check-item {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.85rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 1.1rem;
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s;
  user-select: none;
  text-align: left;
  width: 100%;
  font: inherit;
  color: inherit;
}
.check-item:hover { border-color: rgba(245, 185, 66, 0.4); }
.check-item.is-done { border-color: rgba(45, 212, 191, 0.5); background: rgba(45, 212, 191, 0.06); }

.check-item__box {
  width: 22px; height: 22px;
  border-radius: 7px;
  border: 2px solid var(--text-dim);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: transparent;
  transition: all 0.25s;
  margin-top: 0.15rem;
}
.check-item.is-done .check-item__box {
  background: var(--teal);
  border-color: var(--teal);
  color: #05261f;
}

#checkup-widget .check-item__text,
.check-item__text {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
}
#checkup-widget .check-item__text strong,
.check-item__text strong {
  display: block;
  font-size: 0.95rem;
  color: var(--text);
  text-align: left;
}
#checkup-widget .check-item__text span,
.check-item__text span {
  display: block;
  font-size: 0.8rem;
  color: var(--text-dim);
  text-align: left;
}

.score { text-align: center; }
.score__ring { position: relative; width: 150px; height: 150px; margin: 0 auto 0.8rem; }
.score__ring svg { transform: rotate(-90deg); }
.score__ring-bg { fill: none; stroke: var(--surface-2); stroke-width: 10; }
.score__ring-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 10;
  stroke-linecap: round;
}
.score__value {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 800;
}
.score__label { font-size: 0.9rem; color: var(--text-dim); min-height: 2.4em; max-width: 180px; margin: 0 auto; }

/* ============ Permission audit ============ */
.perm__app {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.4rem;
}
.perm__app-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, #1f2937, #111827);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  flex-shrink: 0;
  overflow: hidden;
}
.perm__app-icon--uber {
  background: #000;
  padding: 0 8px;
}
.perm__app-icon--uber img {
  width: 100%;
  height: auto;
  display: block;
  filter: brightness(0) invert(1);
}
.perm__app-name { font-family: var(--font-head); font-weight: 700; }
.perm__app-sub { font-size: 0.8rem; color: var(--text-dim); }

.perm__list { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1.3rem; }

.perm-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem 1rem;
}
.perm-row__label { display: flex; align-items: center; gap: 0.7rem; font-size: 0.92rem; }
.perm-row__icon { font-size: 1.1rem; }

.perm-row .toggle { font-size: 0.8rem; color: var(--text-dim); }

.perm__verdict {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  font-size: 0.93rem;
  color: var(--text-dim);
  min-height: 2.6em;
}
.perm__verdict.is-bad { color: #ff8b76; }
.perm__verdict.is-good { color: var(--teal); }

/* ============ Convene room wizard ============ */
.wizard__dots { display: flex; gap: 0.5rem; margin-bottom: 1.6rem; }
.wizard__dot {
  width: 30px; height: 5px;
  border-radius: 999px;
  background: var(--surface-2);
  transition: background 0.3s;
}
.wizard__dot.is-active { background: var(--accent); }
.wizard__dot.is-past { background: rgba(245, 185, 66, 0.6); }

.wizard__step { display: none; }
.wizard__step.is-current { display: block; }

.wizard__question { font-family: var(--font-head); font-size: 1.15rem; font-weight: 700; margin-bottom: 1.1rem; }

.room-types { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0.8rem; margin-bottom: 1.4rem; }
.room-type {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.1rem 1rem;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.25s, transform 0.25s;
  color: var(--text);
  font-family: var(--font-body);
}
.room-type:hover { transform: translateY(-3px); border-color: rgba(245, 185, 66, 0.45); }
.room-type.is-selected { border-color: var(--accent); background: var(--accent-soft); }
.room-type__icon { font-size: 1.6rem; margin-bottom: 0.4rem; }
.room-type strong { display: block; font-size: 0.95rem; margin-bottom: 0.25rem; }
.room-type span { font-size: 0.76rem; color: var(--text-dim); }

.wizard__settings { display: flex; flex-direction: column; gap: 0.9rem; margin-bottom: 1.5rem; }

.wizard__timer {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  font-size: 0.92rem;
  color: var(--text);
}
.wizard__timer[hidden] { display: none; }
.wizard__timer select {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.45rem 0.7rem;
  font-family: var(--font-body);
  font-size: 0.88rem;
  cursor: pointer;
}
.wizard__timer select:focus { outline: 2px solid rgba(245, 185, 66, 0.5); }

.wizard__nav { display: flex; gap: 0.8rem; align-items: center; }
.wizard__nav .btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }

.invite { display: grid; grid-template-columns: auto 1fr; gap: 1.6rem; align-items: center; margin-bottom: 1.5rem; }
@media (max-width: 560px) { .invite { grid-template-columns: 1fr; justify-items: center; } }

.invite__qr {
  background: #fff;
  padding: 10px;
  border-radius: 12px;
  width: 148px; height: 148px;
}
.invite__qr canvas { width: 128px; height: 128px; image-rendering: pixelated; }

.invite__links { display: flex; flex-direction: column; gap: 0.7rem; width: 100%; }
.invite__link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.6rem 0.9rem;
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  font-size: 0.78rem;
  color: var(--text-dim);
  overflow: hidden;
}
.invite__link code { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.invite__link button {
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 7px;
  padding: 0.3rem 0.7rem;
  font-size: 0.72rem;
  cursor: pointer;
  flex-shrink: 0;
}
.invite__link button:hover { border-color: var(--gold); }
.invite__link-tag {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--gold);
  flex-shrink: 0;
}

.room-card {
  background: var(--bg);
  border: 1px solid rgba(45, 212, 191, 0.5);
  border-radius: 14px;
  padding: 1.4rem;
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin-bottom: 1.4rem;
}
.room-card__icon {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), #0d9488);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.room-card__info { flex: 1; }
.room-card__info strong { font-family: var(--font-head); display: block; }
.room-card__info span { font-size: 0.82rem; color: var(--text-dim); }

.btn--danger {
  background: transparent;
  color: #ff8b76;
  border: 1px solid rgba(239, 72, 44, 0.5);
}
.btn--danger:hover { background: var(--accent-soft); transform: translateY(-2px); }

/* ============ Trace wiper ============ */
.traces { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.9rem; margin-bottom: 1.6rem; }

.trace {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.2rem 0.9rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.25s, transform 0.25s;
  color: var(--text);
  font-family: var(--font-body);
}
.trace:hover:not(.is-wiped) { transform: translateY(-3px); border-color: rgba(239, 72, 44, 0.5); }
.trace.is-wiped { cursor: default; border-style: dashed; }
.trace__icon { font-size: 1.7rem; margin-bottom: 0.5rem; }
.trace strong { display: block; font-size: 0.88rem; margin-bottom: 0.2rem; }
.trace span { font-size: 0.72rem; color: var(--text-dim); }

.footprint { margin-bottom: 0.6rem; }
.footprint__track {
  height: 10px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
}
.footprint__fill {
  height: 100%;
  width: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  transform-origin: left center;
}
.footprint__label {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 0.5rem;
}

.wiper__done {
  text-align: center;
  padding: 0.8rem 0 0.2rem;
  color: var(--teal);
  font-weight: 600;
  visibility: hidden;
  opacity: 0;
}

/* ============ Growth curve (hand-drawn line) ============ */
.growth {
  margin-top: 2.2rem;
  background:
    radial-gradient(ellipse 70% 60% at 20% 20%, rgba(245, 185, 66, 0.06), transparent),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.3rem, 3vw, 2rem);
}
.growth__head { margin-bottom: 0.8rem; }
.growth__title {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}
.growth__hint { color: var(--text-dim); font-size: 0.92rem; max-width: 540px; }
.growth__caption {
  margin-top: 0.6rem;
  font-size: 0.78rem;
  color: var(--text-dim);
  text-align: center;
}

.curve { width: 100%; }
.curve__svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

.curve__grid line {
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 1;
  stroke-dasharray: 3 7;
}

.curve__axis text,
.curve__years text {
  fill: var(--text-dim);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
}
.curve__year--projected { fill: var(--teal); font-weight: 700; }

.curve__line {
  fill: none;
  stroke: url(#curveStroke);
  stroke-width: 3.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.curve__projected {
  fill: none;
  stroke: var(--teal);
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-dasharray: 8 7;
}

.curve__fill {
  fill: url(#curveFill);
  opacity: 0;
}

.curve__point circle:first-child {
  fill: var(--gold);
  stroke: #1a1405;
  stroke-width: 1.5;
}
.curve__point--projected circle:first-child { fill: var(--teal); }
.curve__dot-ring {
  fill: none;
  stroke: rgba(245, 185, 66, 0.45);
  stroke-width: 1.5;
  opacity: 0;
}
.curve__point--projected .curve__dot-ring { stroke: rgba(45, 212, 191, 0.55); }

.curve__label {
  fill: var(--gold);
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 700;
  opacity: 0;
}
.curve__label--peak { font-size: 13px; fill: #ff9a87; }
.curve__label--projected {
  fill: var(--teal);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

body.projector .growth__title { font-size: 1.3rem; }
body.projector .curve__line { stroke-width: 5; }
body.projector .curve__projected { stroke-width: 4.2; }
body.projector .curve__label { font-size: 13px; }
body.projector .curve__label--peak { font-size: 15px; }

/* ============ Group-chat-only settings visibility ============ */
.wizard__settings [hidden] { display: none !important; }

/* ============ Projector mode boosts for widgets ============ */
body.projector .widget {
  border-width: 2px;
  border-color: rgba(245, 185, 66, 0.5);
  box-shadow: 0 0 46px rgba(245, 185, 66, 0.12);
}
body.projector .widget__title { font-size: 1.35rem; }
body.projector .widget__hint { font-size: 1.02rem; }
body.projector .enc__text { font-size: 1rem; }
body.projector .enc__input { font-size: 1.12rem; }
body.projector .tor__node-icon { width: 66px; height: 66px; font-size: 1.65rem; border-width: 2px; }
body.projector .tor__node { font-size: 0.9rem; color: var(--text); width: 84px; }
body.projector .tor__packet { width: 56px; height: 56px; font-size: 1.45rem; }
body.projector .tor__status { font-size: 1.14rem; color: var(--text); }
body.projector .check-item__text strong { font-size: 1.08rem; }
body.projector .check-item__text span { font-size: 0.92rem; }
body.projector .perm-row__label { font-size: 1.05rem; }
body.projector .perm__verdict { font-size: 1.08rem; font-weight: 600; }
body.projector .score__value { font-size: 2.4rem; }
body.projector .score__label { font-size: 1rem; }
body.projector .room-type strong { font-size: 1.08rem; }
body.projector .room-type span { font-size: 0.86rem; }
body.projector .wizard__question { font-size: 1.35rem; }
body.projector .trace strong { font-size: 1rem; }
body.projector .trace span { font-size: 0.82rem; }
body.projector .trace__icon { font-size: 2rem; }
body.projector .footprint__track { height: 14px; }
body.projector .footprint__label { font-size: 0.95rem; }
body.projector .invite__link { font-size: 0.9rem; }

/* ============ Practice roles (leave-no-trace) ============ */
.practice-roles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin-bottom: 1.5rem;
}
@media (max-width: 700px) {
  .practice-roles { grid-template-columns: 1fr; }
}
.practice-role {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem;
}
.practice-role__tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.45rem;
}
.practice-role__title {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0 0 1rem;
}
.practice-role__list {
  margin: 0;
  padding-left: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  color: var(--text-dim);
  font-size: 0.95rem;
}
.practice-role__list strong { color: var(--text); }
body.projector .practice-role__title { font-size: 1.4rem; }
body.projector .practice-role__list { font-size: 1.05rem; }

/* ============ Help / support panel ============ */
.help {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin-top: 1.6rem;
}
@media (max-width: 700px) { .help { grid-template-columns: 1fr; } }

.help__card {
  background: var(--surface);
  border: 1px solid rgba(245, 185, 66, 0.28);
  border-radius: var(--radius);
  padding: 1.7rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.55rem;
  transition: transform 0.3s, border-color 0.3s;
}
.help__card:hover { transform: translateY(-3px); border-color: rgba(245, 185, 66, 0.55); }
.help__card .card__icon { margin-bottom: 0.2rem; }
.help__card h3 { font-size: 1.12rem; }
.help__card p { color: var(--text-dim); font-size: 0.93rem; margin-bottom: 0.6rem; }
.help__card p strong { color: var(--text); }
.help__card .help__note {
  font-size: 0.82rem;
  color: var(--gold);
  background: rgba(245, 185, 66, 0.08);
  border: 1px solid rgba(245, 185, 66, 0.25);
  border-radius: 10px;
  padding: 0.5rem 0.8rem;
}

body.projector .help__card h3 { font-size: 1.25rem; }
body.projector .help__card p { font-size: 1.02rem; }

/* ============ Convene demo join ============ */
.demo-join {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}
.demo-join__qr-wrap {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  background: #fff;
  padding: 1rem 1rem 0.75rem;
  border: none;
  border-radius: 18px;
  margin-bottom: 1.35rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
  cursor: zoom-in;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  font: inherit;
  color: inherit;
}
.demo-join__qr-wrap:hover {
  transform: scale(1.03);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.38);
}
.demo-join__qr-wrap:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}
.demo-join__qr {
  width: min(280px, 72vw);
  height: auto;
  display: block;
  image-rendering: pixelated;
  pointer-events: none;
}
.demo-join__qr-hint {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  color: #4b5568;
  letter-spacing: 0.02em;
}

.qr-zoom {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}
.qr-zoom[hidden] { display: none; }
.qr-zoom__backdrop {
  position: absolute;
  inset: 0;
  border: none;
  background: rgba(4, 8, 18, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: zoom-out;
}
.qr-zoom__panel {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 22px;
  padding: clamp(1.2rem, 3vw, 1.8rem);
  text-align: center;
  max-width: min(92vw, 560px);
  width: 100%;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  animation: qrZoomIn 0.28s ease;
}
@keyframes qrZoomIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}
.qr-zoom__close {
  position: absolute;
  top: 0.65rem;
  right: 0.7rem;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.08);
  color: #111;
  font-size: 1rem;
  cursor: pointer;
  line-height: 1;
}
.qr-zoom__close:hover { background: rgba(0, 0, 0, 0.14); }
.qr-zoom__img {
  width: min(72vw, 420px);
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0.4rem auto 1rem;
  image-rendering: pixelated;
}
.qr-zoom__title {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 800;
  color: #111;
  margin: 0 0 0.35rem;
}
.qr-zoom__hint {
  font-size: 0.85rem;
  color: #6b7280;
  margin: 0;
}
body.qr-zoom-open { overflow: hidden; }
.demo-join__title {
  font-family: var(--font-head);
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 800;
  margin-bottom: 0.45rem;
}
.demo-join__trust {
  color: var(--text-dim);
  font-size: 0.95rem;
  margin-bottom: 1.4rem;
}
.demo-join__open {
  display: inline-flex;
  margin-bottom: 1.8rem;
}
.demo-join__links {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}
.demo-join__group {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.demo-join__label {
  font-family: var(--font-head);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0;
}
.demo-join__hint {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin: 0 0 0.15rem;
}
.demo-join .invite__link {
  text-align: left;
}
.demo-join .invite__link code {
  white-space: nowrap;
}
.demo-join__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
  margin-top: 1.5rem;
}

body.projector .demo-join__title { font-size: 2rem; }
body.projector .demo-join__trust { font-size: 1.1rem; }
body.projector .demo-join__qr { width: min(340px, 70vw); }

/* ============ Topic pager ============ */
.pager {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
  padding: 2.5rem 0 0;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}
.pager a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.25s;
}
.pager a:hover { color: var(--gold); }
.pager a strong { display: block; color: var(--text); font-family: var(--font-head); margin-top: 0.2rem; }
.pager a:hover strong { color: var(--gold); }
.pager__next { text-align: right; margin-left: auto; }
