/* 网站 4.13（WU1，SPEC_WEB_UPDATE 3.1，PLAN_WEB_UPDATE_BUILD 6.2）：
   - 登录页的「注册」（static/js/register.js 加的元素 .rg-*：两个标签、注册表单、注册成功）；
   - 对话页「还没有开通套餐」的账号（app.js：#app-view.noplan、欢迎画面的卡片 .npcard、「查看套餐」的弹窗 .modal.npm）。
   颜色全部用 app.css 的变量（浅色 / 深色跟随主题），不加新的颜色值（二维码的白底和 app.css .support-qr 一样）。
   动画（LOGIN-REDESIGN-SPEC §3 的 K 打勾、L 星星、M 二维码的光圈）只在 prefers-reduced-motion: no-preference 里：系统设置了
   「减少动态效果」时全部静止、直接显示。页面切到后台时 login.css 的 .lp.lp-paused 让它们暂停。 */

/* ---- 登录 / 注册两个标签（register.on 时代替登录框的标题，样子和 login.css 的 .lp-card-title 一样）---- */
.rg-tabs { display: grid; grid-template-columns: 1fr 1fr; margin: 0 0 22px; border-bottom: 1px solid var(--border); }
.rg-tab {
  position: relative; height: 42px; padding: 0 8px; border: 0; background: transparent;
  color: var(--text-2); font-size: 15px; font-weight: 500; cursor: pointer;
}
.rg-tab:hover { color: var(--text); }
.rg-tab.on { color: var(--accent); font-weight: 600; }
.rg-tab.on::after {
  content: ""; position: absolute; left: 50%; bottom: -1px; width: 72px; height: 2px; margin-left: -36px; border-radius: 2px; background: var(--accent);
}
.rg-tab:focus-visible, .rg-link:focus-visible, .rg-copy:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rg-switch { margin: 14px 0 0; text-align: center; }
.rg-link { border: 0; background: none; padding: 4px 2px; color: var(--text-2); font-size: 13px; cursor: pointer; }
.rg-link:hover { color: var(--accent); text-decoration: underline; }

/* ---- 注册表单 ---- */
.rg-form { position: relative; }
.rg-info {
  color: var(--ok); background: color-mix(in srgb, var(--ok) 10%, transparent);
  border-radius: 8px; padding: 8px 12px; font-size: 13.5px; line-height: 1.55; margin-bottom: 14px;
}
.rg-code-row { display: flex; gap: 8px; }
.rg-code-row .input { flex: 1 1 auto; min-width: 0; }
.rg-send { flex: none; height: 44px; padding: 0 14px; border-radius: 10px; font-size: 13.5px; }
.rg-invite:not(:placeholder-shown) { text-transform: uppercase; }
/* 隐藏的输入框（SPEC M10）：不用 display:none，放到屏幕外；看不见、不占位置 */
.rg-hp { position: absolute; left: -10000px; top: 0; width: 1px; height: 1px; overflow: hidden; }
.rg-privacy { margin: 12px 0 0; font-size: 12.5px; line-height: 1.6; color: var(--text-2); text-align: center; }

/* ---- 注册成功 ---- */
.rg-done { text-align: center; outline: none; }
.rg-tick { position: relative; width: 64px; height: 64px; margin: 4px auto 14px; }
.rg-tick-svg { position: relative; display: block; width: 64px; height: 64px; }
.rg-tick-svg circle { fill: var(--ok); }
.rg-tick-svg path { fill: none; stroke: #fff; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.rg-burst { position: absolute; inset: 0; pointer-events: none; }
.rg-burst svg { position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; opacity: 0; fill: var(--accent); }
.rg-burst svg:nth-child(even) { fill: var(--ok); }
.rg-done-h { margin: 0 0 12px; font-size: 16px; line-height: 1.5; font-weight: 600; color: var(--text); }
.rg-acct, .rg-wx {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 10px;
  margin: 0 0 14px; font-size: 13.5px; color: var(--text-2); overflow-wrap: anywhere;
}
.rg-acct span, .rg-wx span { min-width: 0; }
.rg-wx { margin: 10px 0 0; font-size: 14px; color: var(--text); }
.rg-copy {
  height: 28px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text-2); font-size: 12.5px; cursor: pointer;
}
.rg-copy:hover { color: var(--text); border-color: var(--accent); }
.rg-qr { margin: 0 auto; width: max-content; max-width: 100%; }
.rg-qr img {
  display: block; width: 168px; height: auto; max-height: min(320px, 60vh); object-fit: contain; margin: 0 auto;
  padding: 8px; border-radius: 12px; background: #fff; border: 1px solid var(--border);
}
.rg-qr figcaption { margin-top: 6px; font-size: 12px; color: var(--text-2); }
.rg-mobile { display: none; }
.rg-note { margin: 6px 0 0; font-size: 12.5px; line-height: 1.6; color: var(--text-2); white-space: pre-line; overflow-wrap: anywhere; }
.rg-actions { display: flex; gap: 10px; margin-top: 18px; }
.rg-actions .btn { flex: 1 1 0; min-width: 0; height: auto; min-height: 42px; padding: 6px 8px; border-radius: 12px; white-space: normal; line-height: 1.3; }

@media (max-width: 760px) {
  .rg-mobile { display: block; margin: 6px 0 0; font-size: 12px; color: var(--text-2); }
  .rg-send { padding: 0 10px; }
  .rg-burst svg:nth-child(n+7) { display: none; }   /* 手机上 6 颗星星（LOGIN-REDESIGN-SPEC §3 L） */
}

/* K / L / M：打勾（圆圈放大再回到原来大小，然后画出勾）、星星向外飞散、二维码的光圈（同一次成功只播放一次，光圈一直呼吸） */
@media (prefers-reduced-motion: no-preference) {
  .rg-done.play .rg-tick-svg { animation: rg-pop .4s cubic-bezier(.2, .8, .2, 1) both; }
  .rg-done.play .rg-tick-svg path { stroke-dasharray: 32; stroke-dashoffset: 32; animation: rg-draw .5s ease-out .35s forwards; }
  .rg-done.play .rg-burst svg { animation: rg-burst 1.2s ease-out .25s both; }
  .rg-burst svg:nth-child(1) { --rg-to: translate(0, -62px) rotate(90deg); }
  .rg-burst svg:nth-child(2) { --rg-to: translate(46px, -46px) rotate(-120deg); }
  .rg-burst svg:nth-child(3) { --rg-to: translate(66px, 0) rotate(150deg); }
  .rg-burst svg:nth-child(4) { --rg-to: translate(44px, 44px) rotate(-90deg); }
  .rg-burst svg:nth-child(5) { --rg-to: translate(0, 58px) rotate(120deg); }
  .rg-burst svg:nth-child(6) { --rg-to: translate(-48px, 42px) rotate(-150deg); }
  .rg-burst svg:nth-child(7) { --rg-to: translate(-68px, 0) rotate(100deg); }
  .rg-burst svg:nth-child(8) { --rg-to: translate(-42px, -48px) rotate(-100deg); }
  .rg-qr img { animation: rg-glow 3s ease-in-out infinite; }
  .rg-tab.on::after { animation: rg-bar .25s ease-out both; }
}
@keyframes rg-pop { 0% { transform: scale(0); } 70% { transform: scale(1.08); } 100% { transform: scale(1); } }
@keyframes rg-draw { to { stroke-dashoffset: 0; } }
@keyframes rg-burst {
  0% { opacity: 0; transform: translate(0, 0) scale(.4); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: var(--rg-to, translate(0, -60px)) scale(1); }
}
@keyframes rg-glow { 0%, 100% { box-shadow: 0 0 0 0 var(--accent-soft); } 50% { box-shadow: 0 0 0 6px var(--accent-soft); } }
@keyframes rg-bar { from { transform: scaleX(.3); opacity: 0; } }

/* ---- 对话页：还没有开通套餐（app.js 给 #app-view 加 .noplan）----
   这些按钮背后的接口对没有套餐的账号一律 403（服务器 security.current_user），所以整个藏起来；app.js 另外也不会去调用它们 */
.app.noplan .conv-search, .app.noplan #btn-select, .app.noplan #mode-switch, .app.noplan #btn-new, .app.noplan #btn-new2,
.app.noplan #btn-news, .app.noplan #btn-help, .app.noplan #btn-est, .app.noplan #saver-chip, .app.noplan #saver-line,
.app.noplan #suggestions, .app.noplan #btn-attach, .app.noplan #btn-deep, .app.noplan #btn-files, .app.noplan #btn-web,
.app.noplan #btn-model, .app.noplan #model-menu, .app.noplan #menu-back, .app.noplan #welcome-guide, .app.noplan #model-guide,
.app.noplan #pref-hint, .app.noplan #tip-bar, .app.noplan #pwa-banner, .app.noplan #quota-notice, .app.noplan #web-line,
.app.noplan #attach-list, .app.noplan #att-estimate, .app.noplan #media-refs, .app.noplan #media-opts, .app.noplan #code-side,
.app.noplan #conv-list { display: none !important; }   /* 审查 M-5：对话列表（不能聊天的账号不显示「还没有对话，开始聊点什么吧」） */
.app.noplan .composer textarea:disabled { cursor: not-allowed; }

.npcard { text-align: left; }
.np-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.np-head b { font-size: 15.5px; font-weight: 600; }
.np-sub { margin: 0 0 10px; font-size: 13.5px; line-height: 1.6; color: var(--text-2); }
.np-acct { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0 0 12px; font-size: 13.5px; overflow-wrap: anywhere; }
.np-contact { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px 18px; }
.np-contact .support-qr { flex: none; width: 152px; margin: 0; padding: 8px; }
.np-contact .support-qr img { width: 134px; max-height: min(320px, 60vh); object-fit: contain; }
.np-wx { flex: 1 1 200px; min-width: 0; text-align: left; }
.np-wx .support-id { font-size: 20px; margin: 2px 0 8px; }
.np-wx .support-tip { margin: 2px 0 10px; font-size: 12.5px; color: var(--text-2); }
.np-wx .support-note { margin-top: 10px; }
.np-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.np-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
.np-foot .lang-switch { position: static; margin: 0 0 0 auto; }   /* 审查 M-2：盖过 app.css ≤ 640 px 的 margin: -12px 0 24px */
.np-foot .lang-switch button { padding: 4px 9px; font-size: 12.5px; }
.modal .np-box .np-contact { justify-content: center; }
.modal.npm { width: min(1100px, 100%); }
.np-plans .lp-pgrid { margin-top: 8px; width: 100%; }
.np-plans .np-note { margin: 14px 0 0; font-size: 13px; color: var(--text-2); text-align: center; }
.np-plans .np-empty { margin: 8px 0; font-size: 14px; color: var(--text-2); text-align: center; }
@media (max-width: 520px) {
  .np-contact { flex-direction: column; align-items: center; }
  .np-wx { flex: 0 0 auto; width: 100%; text-align: center; }   /* 审查 M-1：竖排时 200px 的 flex-basis 会变成最小高度（空白） */
  .np-actions .btn { flex: 1 1 auto; min-height: 40px; }
  .np-foot .lang-switch { margin: 0; }
}
