
/* Modal and toasts */
.modal-wrap { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 18px; background: var(--scrim-modal); }
.modal { width: min(520px, 100%); max-height: calc(100vh - 36px); overflow: auto; border: 1px solid var(--line-light); border-radius: var(--radius-lg); background: var(--surface-modal); box-shadow: var(--shadow); }
.modal-head { padding: 20px 20px 0; }
.modal-head h2 { font-size: 18px; }
.modal-body { padding: 18px 20px 20px; }
.modal-body p { color: var(--muted); font-size: 12px; line-height: 1.6; }
.auth-switch { justify-content: center; gap: 14px; margin-top: 16px; color: var(--muted); font-size: 11px; }
.auth-switch .text-btn { padding: 0; font-size: 11px; }
/* 验证码一行：输入框 + 「获取验证码」。输入框吃掉剩余宽度，但必须允许收缩
   （`min-width: 0`），否则窄屏上按钮会被挤出弹层。数字用等宽字体，和站点里
   其他数字一视同仁。 */
.code-row { display: flex; align-items: center; gap: 8px; }
.code-row input { flex: 1 1 auto; min-width: 0; letter-spacing: .16em; font-family: "DM Mono", monospace; }
.code-row .secondary-btn { flex: 0 0 auto; white-space: nowrap; }

/* 保存赛程前的确认清单：必须逐条列出会被删掉的比赛页面，
   以及其中哪些已经上传过 demo —— 那些 demo 会一起消失。 */
.bracket-save-lead { margin: 0 0 14px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.bracket-save-block { margin-bottom: 14px; }
.bracket-save-block h3 { margin: 0 0 8px; font-size: 12px; }
.bracket-save-list { display: grid; gap: 6px; max-height: 220px; margin: 0; padding: 0; overflow-y: auto; list-style: none; }
.bracket-save-list li { display: grid; gap: 2px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-input); background: var(--panel-soft); }
.bracket-save-list strong { font-size: 12px; }
.bracket-save-list span { color: var(--muted); font-size: 10px; }
.bracket-loss { color: var(--coral); }
.bracket-loss-none { color: var(--muted-2); }
.bracket-save-alert { margin: 0 0 14px; padding: 10px 12px; border: 1px solid var(--danger); border-radius: var(--radius-input); background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); font-size: 11px; }

#toast-region { position: fixed; z-index: 50; right: 20px; bottom: 20px; display: grid; gap: 8px; }
.toast { gap: 8px; padding: 10px 12px; border: 1px solid var(--line-light); border-radius: var(--radius-btn); color: var(--text); background: var(--panel-raised); box-shadow: var(--shadow); font-size: 11px; animation: toast-in .2s ease-out; }
.toast::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--lime); }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.empty { padding: 40px 20px; color: var(--muted); text-align: center; border: 1px dashed var(--line-light); border-radius: var(--radius-card); font-size: 12px; }
