/* Welcome Back + Connect streaming */

.welcome {
  width: min(420px, 100%);
  background: #fff;
  color: #111;
  border-radius: 16px;
  padding: 28px 28px 22px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
  animation: welcomeIn 0.22s cubic-bezier(.16, 1, .3, 1);
  max-height: min(92vh, 760px);
  overflow: auto;
}

.welcome-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.welcome h2 {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #111;
  font-family: inherit;
}

.welcome-x {
  width: 32px;
  height: 32px;
  border: 0;
  background: none;
  color: #444;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  border-radius: 8px;
}

.welcome-x:hover { background: #f3f3f3; }

.welcome-msg {
  margin: 0 0 14px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.45;
  color: #b42318;
}

.welcome-msg.ok { color: #0f7b3a; }

.welcome-providers {
  display: grid;
  gap: 10px;
}

.welcome-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 10px 16px;
  border: 1px solid #d8d8d8;
  border-radius: 10px;
  background: #fff;
  color: #111;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.welcome-btn:hover { background: #fafafa; border-color: #bbb; }
.welcome-btn:disabled { opacity: 0.55; cursor: not-allowed; }

.welcome-btn .wb-ico {
  width: 22px;
  height: 22px;
  flex: none;
  display: grid;
  place-items: center;
}

.welcome-btn .wb-ico svg { width: 22px; height: 22px; display: block; }

.welcome-email {
  display: grid;
  gap: 12px;
}

.welcome-email label {
  display: grid;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #666;
}

.welcome-email input {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #d8d8d8;
  background: #fff;
  color: #111;
  font-size: 14px;
  outline: none;
}

.welcome-email input:focus,
.welcome-email textarea:focus {
  border-color: #111;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}

.welcome-email textarea {
  color: #111;
  background: #fff;
}

.welcome-submit {
  width: 100%;
  border: 0;
  background: #111;
  color: #fff;
  padding: 13px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.welcome-submit:hover { background: #000; }

.welcome-back {
  border: 0;
  background: none;
  color: #444;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.welcome-switch {
  margin: 18px 0 0;
  text-align: center;
  font-size: 14px;
  color: #333;
}

.welcome-switch button {
  border: 0;
  background: none;
  color: #111;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
  font-size: 14px;
}

.welcome-legal {
  margin: 16px 0 0;
  text-align: center;
  font-size: 11.5px;
  line-height: 1.55;
  color: #777;
}

.welcome-legal button {
  border: 0;
  background: none;
  color: #555;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
  font-size: inherit;
}

.welcome-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
  color: #111;
  font-weight: 800;
  letter-spacing: -0.04em;
  font-size: 15px;
}

.welcome-brand .yt-logo {
  width: 22px;
  height: 22px;
}

.welcome-brand .yt-logo svg { width: 22px; height: 22px; }

/* Connect streaming band — matches ersy dark shelf */
.connect-band {
  margin: 8px 28px 12px;
  padding: 22px 24px 20px;
  border-radius: var(--radius, 14px);
  border: 1px solid var(--line);
  background: var(--panel, #11081c);
  color: var(--text);
  box-shadow: none;
}

#app.has-player .connect-band {
  margin-bottom: calc(var(--bar-h, 64px) + 28px);
}

.connect-band h2 {
  margin: 0;
  font-family: var(--ui, inherit);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--text);
}

.connect-lede {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
  max-width: 48ch;
}

.connect-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.connect-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  background: rgba(247, 240, 250, 0.04);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  box-shadow: none;
  min-width: 0;
  backdrop-filter: none;
}

.connect-card .svc {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.25;
  color: var(--text);
}

.connect-card .svc .wb-ico {
  flex: none;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
}

.connect-card .svc svg {
  width: 28px;
  height: 28px;
  display: block;
}

.connect-card .svc > span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.connect-go {
  width: 100%;
  border: 1.5px solid var(--line-3, rgba(247, 240, 250, 0.32));
  background: transparent;
  color: var(--text);
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  text-align: center;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.connect-go:hover {
  background: var(--magenta);
  border-color: var(--magenta);
  color: #fff;
}
.connect-go.on {
  border-color: var(--magenta-soft);
  color: var(--magenta-soft);
  background: rgba(255, 45, 111, 0.1);
}
.connect-go.on:hover {
  background: var(--magenta);
  border-color: var(--magenta);
  color: #fff;
}
.connect-go:disabled { opacity: 0.55; cursor: wait; }

.connect-note {
  margin: 14px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

/* Account connections */
.acct-services {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.acct-svc {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: var(--fill);
}

.acct-svc strong { display: block; font-size: 14px; }
.acct-svc em { font-size: 12px; color: var(--muted); font-style: normal; }

.legal-sheet {
  width: min(560px, 100%);
  background: #fff;
  color: #222;
  border-radius: 16px;
  padding: 28px;
  max-height: 84vh;
  overflow: auto;
}

.legal-sheet h2 { margin: 0 0 12px; color: #111; font-size: 26px; }
.legal-sheet p { margin: 0 0 12px; line-height: 1.6; color: #444; font-size: 14.5px; }

@media (max-width: 1100px) {
  .connect-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .connect-band { margin: 8px 16px 8px; padding: 22px 16px; }
}
