:root {
  --red: #b4182a;
  --red-2: #d8353f;
  --red-soft: #fdecee;
  --gold: #e7b45a;
  --gold-soft: #fdf3e2;
  --ink: #23262d;
  --ink-2: #4a4f5a;
  --muted: #82879a;
  --line: #ece7dd;
  --bg: #f5f1ea;
  --card: #ffffff;
  --radius: 16px;
  --shadow: 0 6px 20px rgba(90, 60, 30, 0.08);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

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

html, body {
  margin: 0;
  padding: 0;
  background: #e9e3d8;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
b { font-weight: 700; }

.phone {
  position: relative;
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg);
  box-shadow: 0 0 60px rgba(80, 50, 20, 0.14);
  padding-bottom: calc(66px + var(--safe-b));
  overflow-x: hidden;
}

/* ---------------- 顶部 ---------------- */
.hero {
  position: relative;
  padding: 26px 20px 42px;
  color: #fff;
  overflow: hidden;
  background: linear-gradient(158deg, #7d0f1d 0%, #b4182a 48%, #d94a34 100%);
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 82% 12%, rgba(255, 220, 150, 0.28), transparent 46%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 14px);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 2; }
.hero-badge {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 2px;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.34);
  margin-bottom: 10px;
}
.hero h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.35;
  letter-spacing: 1px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}
.hero p {
  margin: 6px 0 0;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.82);
  letter-spacing: 0.5px;
}
.hero-stats {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}
.hero-stats > div {
  flex: 1;
  text-align: center;
  padding: 8px 4px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.16);
}
.hero-stats b { display: block; font-size: 17px; }
.hero-stats span { font-size: 11px; color: rgba(255, 255, 255, 0.75); }
.hero-wave {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 26px;
  background: var(--bg);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  transform: scaleX(1.4);
}

/* ---------------- 布局 ---------------- */
.main { padding: 0 14px 20px; margin-top: -10px; position: relative; z-index: 3; }
.page { display: none; animation: fade 0.28s ease; }
.page.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 18px 2px 10px;
}
.section-head h2 {
  margin: 0;
  font-size: 16px;
  letter-spacing: 0.5px;
  position: relative;
  padding-left: 11px;
}
.section-head h2::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 4px; height: 15px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--red), #e5754a);
}
.section-sub, .section-head > span { font-size: 12px; color: var(--muted); }

/* ---------------- 通用卡片 ---------------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 12px;
}
.panel {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 16px;
  margin-top: 14px;
}
.panel-red {
  background: linear-gradient(170deg, #fff 0%, #fff 62%, #fff6f4 100%);
  border: 1px solid #f6e2dc;
}
.panel-gold {
  background: linear-gradient(170deg, #fffdf8 0%, #fffaf0 100%);
  border: 1px solid #f3e5c9;
}
.panel-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.panel-red .panel-title { color: var(--red); }
.panel-gold .panel-title { color: #a8761c; }
.panel-desc { margin: 0 0 12px; font-size: 13px; color: var(--ink-2); }
.panel-desc b { color: var(--red); }

.rule-list {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  font-size: 12.5px;
  color: var(--muted);
}
.rule-list li { position: relative; padding-left: 14px; margin-bottom: 5px; }
.rule-list li::before {
  content: "";
  position: absolute;
  left: 2px; top: 9px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--gold);
}
.order-tip {
  margin: 0 0 14px;
  padding: 8px 11px;
  border-radius: 10px;
  background: #fdf6e9;
  border: 1px dashed #ead5ac;
  font-size: 12px;
  color: #8a6a24;
  line-height: 1.6;
}
.order-tip b { color: #a8761c; }

.notice {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin-top: 14px;
  padding: 11px 13px;
  border-radius: 12px;
  background: var(--gold-soft);
  border: 1px solid #f0dfbd;
}
.notice p { margin: 0; font-size: 12.5px; color: #8a6a24; line-height: 1.55; }
.notice-icon {
  flex: 0 0 17px;
  width: 17px; height: 17px;
  line-height: 17px;
  text-align: center;
  border-radius: 50%;
  background: #d9a53f;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  margin-top: 1px;
}

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 20px;
  border-radius: 22px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 1px;
  transition: transform 0.12s ease, box-shadow 0.2s ease, opacity 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: linear-gradient(135deg, #c01526, #e0503a);
  color: #fff;
  box-shadow: 0 6px 16px rgba(190, 30, 45, 0.28);
}
.btn-gold {
  background: linear-gradient(135deg, #d9a03a, #f0c46e);
  color: #5a3c07;
  box-shadow: 0 6px 16px rgba(200, 150, 40, 0.28);
}
.btn-ghost {
  background: #f2ede4;
  color: var(--ink-2);
}
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; box-shadow: none; }
.tip { margin: 10px 0 0; font-size: 12px; color: var(--muted); text-align: center; }
.tip-warn { color: #946a24; background: #fdf3e6; border: 1px solid #f0dcb8; border-radius: 8px; padding: 8px 10px; line-height: 1.55; }

/* ---------------- 学习列表 ---------------- */
.chips-wrap { position: relative; }
.chips-fade {
  position: absolute;
  top: 0; right: 0;
  width: 36px;
  height: calc(100% - 8px);
  pointer-events: none;
  background: linear-gradient(90deg, rgba(245, 241, 234, 0), var(--bg) 78%);
  opacity: 1;
  transition: opacity 0.22s;
}
.chips-fade.hide { opacity: 0; }
.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 10px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scroll-behavior: smooth;
  cursor: grab;
}
.chips.dragging { cursor: grabbing; scroll-behavior: auto; user-select: none; }
.chips.dragging .chip { pointer-events: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  padding: 6px 13px;
  border-radius: 20px;
  font-size: 12.5px;
  color: var(--ink-2);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 2px 6px rgba(120, 90, 50, 0.04);
  transition: all 0.18s;
}
.chip.on {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
  box-shadow: 0 4px 12px rgba(180, 24, 42, 0.24);
}

.card-list { display: flex; flex-direction: column; gap: 10px; }
.learn-card {
  display: flex;
  gap: 12px;
  background: var(--card);
  border-radius: 14px;
  padding: 14px;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease;
}
.learn-card:active { transform: scale(0.985); }
.learn-icon {
  flex: 0 0 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: linear-gradient(140deg, #fdeaea, #fbf2e2);
  border: 1px solid #f6e4d8;
}
.learn-main { flex: 1; min-width: 0; }
.learn-title {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.learn-sum {
  font-size: 12.5px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.learn-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 7px;
  font-size: 11px;
  color: #a9adba;
}
.learn-meta .cat {
  color: var(--red);
  background: var(--red-soft);
  padding: 1px 7px;
  border-radius: 8px;
}
.empty {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 26px 0;
}

/* ---------------- 答题 ---------------- */
.quiz-top { margin: 16px 2px 10px; }
.progress {
  height: 6px;
  border-radius: 4px;
  background: #eae3d7;
  overflow: hidden;
}
.progress i {
  display: block;
  height: 100%;
  width: 20%;
  border-radius: 4px;
  background: linear-gradient(90deg, #d8353f, #ef8a4d);
  transition: width 0.3s ease;
}
.quiz-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}
.quiz-meta-right { display: inline-flex; align-items: center; gap: 8px; }
.quiz-timer {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 20px;
  padding: 0 9px;
  border-radius: 10px;
  background: #f2ede4;
  color: #7d6a4c;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.5px;
  transition: background 0.2s, color 0.2s;
}
.quiz-timer::before { content: "⏱"; font-size: 11px; font-weight: 400; }
.quiz-timer.urgent {
  background: #fdeceb;
  color: var(--red);
  animation: timerPulse 1s ease-in-out infinite;
}
@keyframes timerPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}
.tag {
  padding: 2px 9px;
  border-radius: 9px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 11px;
}
.question-card { padding: 18px 16px 14px; }
.q-stem {
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.65;
  margin-bottom: 14px;
  letter-spacing: 0.2px;
}
.q-stem .qno { color: var(--red); margin-right: 4px; }
.options { display: flex; flex-direction: column; gap: 9px; }
.opt {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 13px;
  border-radius: 12px;
  border: 1.5px solid #ece6db;
  background: #fdfbf7;
  font-size: 14px;
  line-height: 1.5;
  transition: all 0.16s ease;
}
.opt .k {
  flex: 0 0 22px;
  height: 22px;
  line-height: 22px;
  text-align: center;
  border-radius: 50%;
  background: #f0e9dd;
  color: #8a7a63;
  font-size: 12px;
  font-weight: 700;
  transition: all 0.16s;
}
.opt.sel {
  border-color: var(--red);
  background: var(--red-soft);
}
.opt.sel .k { background: var(--red); color: #fff; }
.opt.right { border-color: #2f9e6a; background: #eef9f3; }
.opt.right .k { background: #2f9e6a; color: #fff; }
.opt.wrong { border-color: #d94a4a; background: #fdeeee; }
.opt.wrong .k { background: #d94a4a; color: #fff; }
.multi-tip {
  background: #fff8ea;
  border: 1px solid #f2e2c2;
  color: #8a6220;
  font-size: 12px;
  line-height: 1.6;
  border-radius: 10px;
  padding: 9px 11px;
  margin-bottom: 12px;
}
.multi-tip b { color: var(--red); }

.quiz-actions { display: flex; gap: 10px; margin-top: 14px; }
.quiz-actions .btn { flex: 1; }

/* 结果 */
.score-wrap {
  text-align: center;
  padding: 22px 0 6px;
}
.score-ring {
  position: relative;
  width: 132px; height: 132px;
  margin: 0 auto 12px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: conic-gradient(var(--red) 0deg, #eee6d9 0deg);
  transition: background 0.6s ease;
}
.score-ring::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: #fff;
}
.score-ring span {
  position: relative;
  z-index: 2;
  font-size: 34px;
  font-weight: 800;
  color: var(--red);
  letter-spacing: -1px;
}
.score-ring span small { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 2px; }
.score-title { font-size: 17px; font-weight: 700; }
.score-sub { font-size: 13px; color: var(--muted); margin-top: 4px; }
.auto-note {
  margin-top: 9px;
  padding: 7px 12px;
  border-radius: 8px;
  background: #fdf3e6;
  border: 1px solid #f0dcb8;
  color: #946a24;
  font-size: 12px;
  line-height: 1.5;
}
/* 成绩页：本次是否攒到抽奖次数 */
.credit-note {
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #fdf1f0;
  border: 1px solid #f3d4cf;
  color: #b23a2c;
  font-size: 12.5px;
  line-height: 1.55;
  text-align: center;
}
.credit-note b { font-size: 14px; margin: 0 2px; }
.credit-note-warn {
  background: #fdf3e6;
  border-color: #f0dcb8;
  color: #946a24;
}
.score-actions { display: flex; gap: 10px; margin-top: 16px; }
.score-actions .btn { flex: 1; }

.analysis { margin-top: 16px; }
.analysis-tip {
  font-size: 12.5px;
  color: var(--muted);
  margin: 0 0 4px;
}
.analysis-empty {
  font-size: 14px;
  font-weight: 600;
  color: #2f9e6a;
  background: #eef8f2;
  border-radius: 8px;
  padding: 14px 12px;
  margin-top: 6px;
  text-align: center;
}
.analysis-item {
  border-top: 1px dashed var(--line);
  padding: 13px 0 3px;
  font-size: 13.5px;
}
.analysis-item .ok { color: #2f9e6a; font-weight: 700; }
.analysis-item .no { color: #d94a4a; font-weight: 700; }
.analysis-item .ans { color: var(--ink-2); margin-top: 6px; font-size: 12.5px; }
.analysis-item .ans em { font-style: normal; color: var(--red); font-weight: 600; }
/* 正确答案：完整展示每个选项内容，便于订正。
   类名用 right-opt 而不是 opt —— 后者是答题页的选项卡片样式，会带入边框和底色 */
.analysis-item .ans.right { color: var(--ink); }
.analysis-item .ans.right .right-opt {
  margin-top: 5px;
  line-height: 1.55;
  padding-left: 1.5em;
  text-indent: -1.5em;
  word-break: break-word;
}
.analysis-item .ans.right .right-opt b {
  color: var(--red);
  font-weight: 700;
  margin-right: 2px;
}
.analysis-item .ana {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--muted);
  background: #faf7f1;
  border-radius: 8px;
  padding: 8px 10px;
}

/* ---------------- 抽奖 ---------------- */
.wheel-wrap {
  position: relative;
  width: 268px;
  height: 268px;
  margin: 6px auto 14px;
}
#wheel {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: 0 10px 26px rgba(160, 110, 30, 0.22), inset 0 0 0 8px #fff;
  transition: transform 4.2s cubic-bezier(0.16, 0.84, 0.16, 1);
  transform: rotate(0deg);
}
.wheel-btn {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 78px; height: 78px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #fff6e2, #f3cd7d 70%, #e0ad4c);
  color: #8a5a08;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 1px;
  box-shadow: 0 4px 14px rgba(170, 120, 30, 0.35), inset 0 -3px 8px rgba(160, 110, 20, 0.18);
  z-index: 3;
}
.wheel-btn span { display: block; font-size: 11px; letter-spacing: 2px; font-weight: 600; }
.wheel-btn:disabled { opacity: 0.72; }
.pointer {
  position: absolute;
  left: 50%;
  top: -6px;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 11px solid transparent;
  border-right: 11px solid transparent;
  border-top: 20px solid var(--red);
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.18));
  z-index: 4;
}
.prize-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}
.prize-strip span {
  font-size: 11.5px;
  color: #8a6a24;
  background: #fdf4e3;
  border: 1px solid #f2e2c4;
  border-radius: 8px;
  padding: 3px 9px;
}

.prize-card {
  background: var(--card);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 14px;
  border-left: 4px solid var(--gold);
}
.prize-card h4 { margin: 0 0 4px; font-size: 15px; }
.prize-card .st { font-size: 12px; color: var(--muted); }
.prize-card .st ok { color: #2f9e6a; }
.badge-wait { color: #c98a12; }
.badge-done { color: #2f9e6a; }
.badge-ship { color: #3b82c4; }

/* ---------------- 我的 ---------------- */
.me-grid { display: flex; text-align: center; }
.me-grid > div { flex: 1; }
.me-grid b { display: block; font-size: 20px; color: var(--red); }
.me-grid span { font-size: 11.5px; color: var(--muted); }
.hist-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--card);
  border-radius: 13px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
  font-size: 13px;
}
.hist-item .s-good { color: #2f9e6a; font-weight: 700; }
.hist-item .s-bad { color: #d94a4a; font-weight: 700; }
.hist-item .d { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.foot-note {
  text-align: center;
  font-size: 11.5px;
  color: #a9adba;
  margin: 22px 0 6px;
  line-height: 1.7;
}

/* ---------------- 底栏 ---------------- */
.tabbar {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  display: flex;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
  border-top: 1px solid #f0ebe0;
  padding-bottom: var(--safe-b);
  z-index: 40;
}
.tab {
  flex: 1;
  padding: 7px 0 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  font-size: 11px;
  color: #9a9eaa;
  transition: color 0.18s;
}
.tab i { font-size: 19px; font-style: normal; filter: grayscale(0.55); transition: filter 0.18s; }
.tab i.ico { filter: none; display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; }
.tab i.ico svg { width: 24px; height: 24px; display: block; }
.tab i.ico svg circle, .tab i.ico svg path { fill: #d99a35; transition: fill 0.18s; }
.tab.active i.ico svg circle, .tab.active i.ico svg path { fill: var(--red); }
.tab.active { color: var(--red); font-weight: 600; }
.tab.active i { filter: none; }

/* ---------------- 阅读层 ---------------- */
.reader {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  max-width: 480px;
  margin: 0 auto;
  background: #fbf9f5;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.3, 1);
  visibility: hidden;
}
.reader.open { transform: none; visibility: visible; }
.reader-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #fff;
  border-bottom: 1px solid #f0ebe0;
  position: sticky;
  top: 0;
}
.reader-back {
  font-size: 14px;
  color: var(--red);
  font-weight: 600;
  padding: 4px 6px;
}
.reader-cat {
  margin-left: auto;
  font-size: 11.5px;
  color: var(--red);
  background: var(--red-soft);
  border-radius: 8px;
  padding: 2px 9px;
}
.reader-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 20px calc(30px + var(--safe-b));
  -webkit-overflow-scrolling: touch;
}
.reader-body h1 {
  font-size: 20px;
  line-height: 1.45;
  margin: 0 0 6px;
  letter-spacing: 0.3px;
}
.reader-body .rmeta { font-size: 12px; color: var(--muted); margin-bottom: 16px; }
.reader-body h3 {
  font-size: 15px;
  margin: 22px 0 8px;
  padding-left: 10px;
  border-left: 3px solid var(--red);
  line-height: 1.4;
}
.reader-body p {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.85;
  color: #3a3d45;
  text-align: justify;
}
.reader-body li {
  font-size: 14.5px;
  line-height: 1.8;
  color: #3a3d45;
  margin-bottom: 6px;
}
.reader-body ul, .reader-body ol { padding-left: 20px; margin: 0 0 12px; }

/* ---------------- 弹层 ---------------- */
.modal-root {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(30, 20, 10, 0.5);
  padding: 20px;
  backdrop-filter: blur(2px);
}
.modal-root.open { display: flex; }
.modal {
  width: 100%;
  max-width: 340px;
  background: #fff;
  border-radius: 18px;
  padding: 20px 18px 16px;
  animation: pop 0.26s cubic-bezier(0.2, 0.9, 0.3, 1.2);
  max-height: 86vh;
  overflow-y: auto;
}
@keyframes pop { from { opacity: 0; transform: scale(0.92) translateY(8px); } to { opacity: 1; transform: none; } }
.modal h3 { margin: 0 0 6px; font-size: 17px; text-align: center; }
.modal .m-sub { font-size: 12.5px; color: var(--muted); text-align: center; margin-bottom: 14px; }
.modal .m-prize {
  text-align: center;
  font-size: 20px;
  font-weight: 800;
  color: var(--red);
  margin: 8px 0 4px;
}
.field { margin-bottom: 11px; }
.field label { display: block; font-size: 12.5px; color: var(--ink-2); margin-bottom: 5px; }
.field input, .field textarea, .field select {
  width: 100%;
  border: 1.5px solid #eee7db;
  background: #fdfbf7;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  outline: none;
  transition: border-color 0.18s;
}
.field input:focus, .field textarea:focus { border-color: var(--red); background: #fff; }
.field textarea { resize: vertical; min-height: 62px; }
.modal-actions { display: flex; gap: 9px; margin-top: 14px; }
.modal-actions .btn { flex: 1; height: 42px; font-size: 14px; }
.m-note { font-size: 11.5px; color: var(--muted); margin-top: 8px; line-height: 1.6; }
.confetti {
  text-align: center;
  font-size: 34px;
  margin-bottom: 2px;
  animation: pop 0.4s ease;
}

/* ---------------- Toast ---------------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translate(-50%, 14px);
  background: rgba(35, 30, 25, 0.9);
  color: #fff;
  font-size: 13px;
  padding: 9px 16px;
  border-radius: 20px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 120;
  max-width: 84vw;
  text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 481px) {
  body { padding: 0; }
  .phone { min-height: 100vh; }
}
