:root {
  --primary: #4f46e5;
  --primary-light: #eef2ff;
  --primary-dark: #3730a3;
  --accent: #ec4899;
  --success: #10b981;
  --success-bg: #ecfdf5;
  --danger: #f43f5e;
  --danger-bg: #fff1f2;
  --warning: #f59e0b;
  --bg: #f5f6fa;
  --card: #ffffff;
  --text: #0f172a;
  --text-secondary: #475569;
  --muted: #94a3b8;
  --border: rgba(15, 23, 42, 0.07);
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.06);
  --radius: 18px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  background: #eaeef6;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.app-shell {
  max-width: 500px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  box-shadow: 0 0 40px rgba(15, 23, 42, 0.08);
}

.hidden { display: none !important; }
.muted { color: var(--text-secondary); opacity: 0.78; }
.small { font-size: 12.5px; }
.full-width { width: 100%; }

.center-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #e0e7ff;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes slideUp {
  from { transform: translateY(24px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ==================== 首页沉浸式 Hero ==================== */
.hero-header {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, #0f1026 0%, #1e1b4b 48%, #312e81 100%);
  color: #fff;
  padding: 20px 18px 26px;
  border-radius: 0 0 28px 28px;
  box-shadow: 0 12px 32px rgba(30, 27, 75, 0.25);
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(46px);
  pointer-events: none;
}

.hero-orb-1 {
  width: 180px;
  height: 180px;
  background: rgba(124, 58, 237, 0.45);
  top: -50px;
  right: -30px;
}

.hero-orb-2 {
  width: 150px;
  height: 150px;
  background: rgba(56, 189, 248, 0.28);
  bottom: -40px;
  left: -30px;
}

.hero-wave {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 44px;
  pointer-events: none;
}

.hero-top {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.brand-col { flex: 1; min-width: 0; }

.version-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 3px 10px 3px 8px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px #34d399;
}

.version-pill {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: #e0e7ff;
}

.hero-top h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.2px;
  line-height: 1.3;
}

.hero-sub {
  margin: 4px 0 0;
  font-size: 12px;
  color: rgba(224, 231, 255, 0.72);
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(10px);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 5px 11px 5px 5px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  max-width: 142px;
  flex-shrink: 0;
  transition: background 0.15s;
}

.user-chip:active { background: rgba(255, 255, 255, 0.22); }

.user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #38bdf8, #a855f7);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-name-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 环形进度卡片 */
.progress-card {
  position: relative;
  z-index: 2;
  margin-top: 18px;
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.ring-wrap {
  position: relative;
  width: 78px;
  height: 78px;
  flex-shrink: 0;
}

.progress-ring {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.14);
  stroke-width: 7;
}

.ring-fg {
  fill: none;
  stroke-width: 7;
  stroke-linecap: round;
  stroke-dasharray: 226.19;
  stroke-dashoffset: 226.19;
  transition: stroke-dashoffset 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.ring-center strong {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.1;
}

.ring-center span {
  font-size: 10px;
  color: rgba(224, 231, 255, 0.78);
  margin-top: 2px;
}

.progress-metrics {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.metric-box {
  background: rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 8px 6px;
  text-align: center;
}

.metric-label {
  display: block;
  font-size: 10.5px;
  color: rgba(224, 231, 255, 0.76);
  margin-bottom: 3px;
}

.metric-val strong {
  font-size: 17px;
  font-weight: 800;
}

.metric-val small {
  font-size: 11px;
  opacity: 0.75;
  margin-left: 1px;
}

.metric-warn strong { color: #fda4af; }

/* ==================== 首页主体 ==================== */
.home-body {
  padding: 16px 16px calc(30px + env(safe-area-inset-bottom));
}

/* Bento 主行动双大卡 */
.mode-grid-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.hero-mode-card {
  position: relative;
  overflow: hidden;
  border: none;
  border-radius: 20px;
  padding: 16px 14px 15px;
  text-align: left;
  color: #fff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 124px;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.hero-mode-card:active { transform: scale(0.97); }

.card-seq {
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  box-shadow: 0 10px 22px rgba(79, 70, 229, 0.28);
}

.card-exam {
  background: linear-gradient(135deg, #7c3aed 0%, #db2777 100%);
  box-shadow: 0 10px 22px rgba(192, 38, 211, 0.26);
}

.corner-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(4px);
}

.mode-card-bg-icon {
  position: absolute;
  right: -8px;
  bottom: -10px;
  opacity: 0.14;
  pointer-events: none;
}

.mode-icon-circle {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.mode-info h3 {
  margin: 0;
  font-size: 16.5px;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.mode-info p {
  margin: 4px 0 0;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.35;
}

/* 次级双卡 */
.mode-grid-sub {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.sub-mode-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 13px 12px;
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.12s ease;
}

.sub-mode-card:active { transform: scale(0.97); }

.sub-icon {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-red { background: #fff1f2; color: #e11d48; }
.icon-green { background: #ecfdf5; color: #059669; }

.sub-info h3 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
}

.sub-info p {
  margin: 2px 0 0;
  font-size: 11.5px;
  color: var(--text-secondary);
}

/* 快捷胶囊条 */
.quick-bar {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.quick-btn {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 11px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.12s;
}

.quick-btn:active { transform: scale(0.97); }

.quick-icon { display: flex; align-items: center; }
.qi-red { color: #f43f5e; }
.qi-amber { color: #f59e0b; }
.qi-blue { color: #4f46e5; }

.badge {
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  background: #fff1f2;
  color: #e11d48;
}

.badge-amber { background: #fffbeb; color: #d97706; }
.badge-soft { background: var(--primary-light); color: var(--primary); }

/* 章节专项 */
.section-header {
  margin: 22px 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-bar {
  width: 4px;
  height: 16px;
  border-radius: 4px;
  background: linear-gradient(180deg, #4f46e5, #ec4899);
}

.section-header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}

.chapter-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chapter-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.12s, box-shadow 0.12s;
}

.chapter-item:active { transform: scale(0.985); background: #fafbff; }

.chapter-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.chapter-num {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  color: var(--primary);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.chapter-info { flex: 1; min-width: 0; }

.chapter-title {
  font-weight: 700;
  font-size: 14.5px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chapter-progress-row {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chapter-bar-track {
  flex: 1;
  height: 5px;
  border-radius: 999px;
  background: #f1f5f9;
  overflow: hidden;
}

.chapter-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #4f46e5, #818cf8);
  transition: width 0.35s ease;
}

.chapter-meta {
  font-size: 11.5px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.chapter-arrow {
  color: #cbd5e1;
  display: flex;
  align-items: center;
}

.home-footer {
  margin-top: 26px;
  text-align: center;
}

.admin-link {
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 999px;
}

/* ==================== 刷题 / 模拟考界面 ==================== */
.quiz-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 54px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
}

.quiz-top-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2.5px;
  background: #e2e8f0;
}

.quiz-top-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #4f46e5, #ec4899);
  transition: width 0.25s ease;
}

.icon-btn {
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  padding: 6px 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.quiz-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quiz-mode-label {
  font-weight: 800;
  font-size: 15px;
}

.quiz-timer {
  font-size: 12.5px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  background: #fff7ed;
  color: #ea580c;
  border: 1px solid #fed7aa;
  font-variant-numeric: tabular-nums;
}

.sheet-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid #e0e7ff;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

.quiz-body {
  padding: 16px 15px calc(96px + env(safe-area-inset-bottom));
}

.question-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 18px 16px;
  box-shadow: var(--shadow-md);
}

.q-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 14px;
}

.q-badge {
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 8px;
  background: var(--primary-light);
  color: var(--primary);
}

.q-badge-red {
  background: linear-gradient(135deg, #fff1f2, #ffe4e6);
  color: #e11d48;
  border: 1px solid #fecdd3;
}

.q-chapter-tag {
  font-size: 12px;
  color: var(--muted);
  margin-left: auto;
}

.q-stem {
  margin: 0 0 18px;
  font-size: 16.5px;
  line-height: 1.65;
  font-weight: 700;
  color: var(--text);
}

.q-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.opt-item {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 13px 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  transition: all 0.16s ease;
  text-align: left;
  width: 100%;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--text);
}

.opt-item:active { transform: scale(0.99); }

.opt-letter {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  border: 1.5px solid #cbd5e1;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 0;
}

.opt-text { flex: 1; padding-top: 1px; }

.opt-item.selected {
  border-color: var(--primary);
  background: #eef2ff;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.1);
}
.opt-item.selected .opt-letter {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.opt-item.correct {
  border-color: var(--success);
  background: var(--success-bg);
}
.opt-item.correct .opt-letter {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.opt-item.wrong {
  border-color: var(--danger);
  background: var(--danger-bg);
}
.opt-item.wrong .opt-letter {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

/* 解析面板 */
.explanation-box {
  margin-top: 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--shadow-sm);
  animation: slideUp 0.22s ease;
}

.exp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.exp-tag {
  font-weight: 800;
  font-size: 14.5px;
}
.exp-tag.ok { color: var(--success); }
.exp-tag.err { color: var(--danger); }

.exp-correct {
  font-size: 13px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--primary);
}

.exp-divider {
  height: 1px;
  background: #f1f5f9;
  margin: 11px 0;
}

.exp-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 5px;
}

.exp-text {
  margin: 0;
  font-size: 14px;
  color: #334155;
  line-height: 1.65;
}

/* 底部悬浮操作栏 */
.quiz-bottombar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 500px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  display: flex;
  gap: 8px;
  z-index: 25;
}

.nav-btn {
  flex: 1;
  height: 44px;
  border-radius: 13px;
  border: 1px solid #e2e8f0;
  background: #fff;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  transition: transform 0.12s;
}

.nav-btn:active { transform: scale(0.97); }
.nav-btn:disabled { opacity: 0.4; }

.nav-primary {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  border: none;
  color: #fff;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.nav-submit {
  background: linear-gradient(135deg, #7c3aed, #db2777);
  border: none;
  color: #fff;
  box-shadow: 0 4px 12px rgba(219, 39, 119, 0.25);
}

.nav-fav.active {
  color: #d97706;
  border-color: #fde68a;
  background: #fffbeb;
}

/* 通用按钮 */
.btn-primary {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #fff;
  border: none;
  border-radius: 13px;
  padding: 13px 18px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.25);
}

.btn-secondary {
  background: #fff;
  color: var(--text);
  border: 1.5px solid #e2e8f0;
  border-radius: 13px;
  padding: 13px 18px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

/* ==================== 成绩单与复盘 ==================== */
.result-body {
  padding: 16px;
  padding-bottom: 44px;
}

.cert-wrap {
  background: #fff;
  border-radius: 22px;
  padding: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  text-align: center;
}

.cert-tip-bar {
  display: inline-block;
  margin-bottom: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 12.5px;
  font-weight: 700;
}

.cert-image {
  width: 100%;
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
}

.result-actions {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.wrong-review-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wrong-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 15px;
  box-shadow: var(--shadow-sm);
}

.wrong-card h4 { margin: 0 0 8px; font-size: 14.5px; line-height: 1.5; }
.wrong-card p { margin: 5px 0; font-size: 13px; line-height: 1.55; }

/* ==================== 规则手册 ==================== */
.rules-body {
  padding: 16px;
  padding-bottom: 44px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rule-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.rule-card h3 {
  margin: 0 0 10px;
  font-size: 15.5px;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.rule-card pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.75;
  color: #334155;
}

/* ==================== 弹窗 ==================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(4px);
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn 0.16s ease;
}

.modal-sheet {
  width: 100%;
  max-width: 500px;
  max-height: 76vh;
  background: #fff;
  border-radius: 24px 24px 0 0;
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  animation: slideUp 0.22s ease;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}

.modal-header h3 { margin: 0; font-size: 17px; font-weight: 800; }

.sheet-legend {
  display: flex;
  gap: 12px;
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--text-secondary);
}

.sheet-legend span { display: inline-flex; align-items: center; gap: 4px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-cur { background: var(--primary); }
.dot-ok { background: var(--success); }
.dot-err { background: var(--danger); }
.dot-done { background: #93c5fd; }

.close-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: #f1f5f9;
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
}

.sheet-grid {
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 9px;
  padding-bottom: 8px;
}

.sheet-cell {
  height: 40px;
  border-radius: 12px;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
}

.sheet-cell.current { border: 2px solid var(--primary); color: var(--primary); background: var(--primary-light); }
.sheet-cell.done { background: #eff6ff; border-color: #93c5fd; color: #2563eb; }
.sheet-cell.ok { background: var(--success-bg); border-color: var(--success); color: var(--success); }
.sheet-cell.err { background: var(--danger-bg); border-color: var(--danger); color: var(--danger); }

.modal-dialog {
  align-self: center;
  width: calc(100% - 36px);
  max-width: 380px;
  background: #fff;
  border-radius: 24px;
  padding: 24px 22px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
  animation: slideUp 0.22s ease;
}

.dialog-emblem {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  margin: 0 auto 14px;
  background: linear-gradient(135deg, #4f46e5, #ec4899);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
}

.modal-dialog h3 { margin: 0 0 6px; font-size: 19px; font-weight: 800; }
.modal-dialog code {
  background: #f1f5f9;
  padding: 1px 5px;
  border-radius: 5px;
  color: var(--primary);
  font-weight: 700;
}

.modal-dialog input {
  width: 100%;
  padding: 13px 14px;
  margin: 14px 0 16px;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  font-size: 15px;
  text-align: center;
  outline: none;
  background: #f8fafc;
}

.modal-dialog input:focus {
  border-color: var(--primary);
  background: #fff;
}
