.channels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.channel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(12px, 2vw, 26px);
  min-height: 216px;
  padding: clamp(20px, 2.8vw, 30px);
  border: 1px solid #d9e2e3;
  border-radius: 12px;
  background-color: #fff;
  background-image: linear-gradient(90deg, #fff0, #fff 48%);
  box-shadow: 0 6px 18px #172d3608, 0 1px 2px #172d3607;
  transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.channel:hover, .channel:focus-within, .channel:target {
  border-color: #a9cbcf;
  background-color: #eef8f8;
  box-shadow: 0 14px 30px #172d3611;
}

.channel-actions .pill span {
  transition: transform .18s ease;
}

.channel:hover .channel-actions .pill span,
.channel:focus-within .channel-actions .pill span {
  transform: translate(2px, -1px);
}

.channel-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: clamp(1.32rem, 2vw, 1.65rem);
  line-height: 1.25;
  font-weight: 750;
  letter-spacing: -.035em;
}

.channel-logo {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border-radius: 22.5%;
  background: #fff;
  object-fit: cover;
  box-shadow: 0 1px 2px #17243a18, 0 4px 9px #17243a10;
}

.channel-description {
  margin: 11px 0 0;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.5;
}

.identifier { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

.channel-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px 9px;
  margin-top: 14px;
}

.pill, .copy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  font-size: .85rem;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.pill {
  border: 0;
  border-radius: 7px;
  padding: 0 15px;
  background: #101b21;
  color: #f8ffff;
  transition: background-color .18s ease, color .18s ease;
}

.pill span { color: #68e6ec; }
.pill:hover { background: #17464b; }

.copy-button {
  border: 0;
  padding: 0 5px;
  background: transparent;
  color: #506169;
}

.copy-button:hover { color: var(--accent); text-decoration: underline; }

.qr-button {
  --size: clamp(112px, 13vw, 152px);
  position: relative;
  display: block;
  width: var(--size);
  height: var(--size);
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.qr-button img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.qr-expand {
  position: absolute;
  right: -10px;
  bottom: -10px;
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border: 1px solid #c9d9dc;
  border-radius: 50%;
  background: #fff;
  color: var(--accent);
  font-size: 1rem;
  line-height: 1;
}

.qr-button:hover .qr-expand { background: #e0f1f1; }

.qr-dialog {
  width: min(390px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  overflow: auto;
  padding: 25px;
  border: 1px solid #c5d7d9;
  border-radius: 12px;
  color: inherit;
  background: #fff;
  box-shadow: 0 24px 75px #07141b55;
  text-align: center;
}

.qr-dialog::backdrop {
  background: #071419c7;
  backdrop-filter: blur(5px);
}

.qr-dialog h2 { margin: 0; font-size: 1.4rem; line-height: 1.4; }
.qr-dialog p { margin: 5px 0 11px; color: var(--muted); font-size: .875rem; }
.qr-dialog img { width: min(100%, 290px); height: auto; margin: 10px auto; border-radius: 16px; }
.qr-dialog .pill { margin-top: 3px; }

.qr-dialog .dialog-close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  position: absolute;
  top: 12px;
  right: 12px;
  margin: 0;
  border: 1px solid #c5d7d9;
  border-radius: 6px;
  background: #f9fdfd;
  color: #32474e;
  font-size: 1.32rem;
  cursor: pointer;
}

.qr-dialog .dialog-close:hover { background: #e1f0f0; }

.notice {
  position: fixed;
  z-index: 10;
  inset-inline-start: 50%;
  inset-block-end: 22px;
  width: max-content;
  max-width: calc(100% - 32px);
  transform: translateX(-50%);
  padding: 11px 17px;
  border-radius: 999px;
  background: #111b20;
  color: #fff;
  font-size: .875rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease;
}

.notice[data-visible] { opacity: 1; }


@media (max-width: 760px) {
  .channels { grid-template-columns: 1fr; gap: 12px; }
  .channel { min-height: 160px; }
  .channel-logo { width: 42px; height: 42px; }
  .qr-button { --size: clamp(104px, 30vw, 134px); }
}

@media (max-width: 375px) {
  .channel { padding: 15px; }
  .channel-heading { gap: 6px; }
  .channel-logo { width: 34px; height: 34px; }
  .channel-description { font-size: .82rem; }
  .channel-actions { gap: 0 4px; margin-top: 8px; }
}
