:root {
  --red: #E8472A;
  --red2: #FF6B4A;
  --red-light: #FF9B85;
  --red-dark: #B83420;
  --ink: #0D0A1A;
  --ink2: #1A1530;
  --ink3: #252040;
  --parchment: #12102A;
  --parchment2: #1E1B3A;
  --parchment3: #2D2850;
  --gold: #F0B429;
  --gold-light: #FFD666;
  --text-dark: #F0E6FF;
  --text-mid: #C4B8E0;
  --text-muted: #8A7FAA;
  --purple: #6C3DC8;
  --purple2: #8B5CF6;
  --card-bg: rgba(255,255,255,0.06);
  --card-border: rgba(255,255,255,0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Noto Sans TC', sans-serif;
  background: #0D0A1A;
  color: var(--text-dark);
  min-height: 100vh;
  overflow-x: hidden;
}

/* 深色神秘背景 */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(ellipse at 20% 20%, rgba(108,61,200,0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(232,71,42,0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 10%, rgba(240,180,41,0.08) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
}

.page { position: relative; z-index: 1; }

/* ─── HERO IMAGE(新主圖:已含完整文案,佔滿寬度) ─── */
.hero-img-wrap {
  width: 100%;
  max-width: 640px;
  margin: 0 auto 8px;
  position: relative;
  line-height: 0;
  border-radius: 0 0 24px 24px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
}
.hero-img-wrap img {
  width: 100%;
  height: auto;
  display: block;
}
.hero-img-cover {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 30px;
  background: linear-gradient(to bottom, transparent, rgba(30,27,58,0.6));
  pointer-events: none;
}
.hero-img-cover-top { display: none; }
.hero-img-cover-left { display: none; }
.hero-img-cover-right { display: none; }

/* ─── CONTAINER ─── */
.container {
  max-width: 572px;
  margin: 0 auto;
  padding: 0 18px 60px;
}

/* ─── 頂部標題區 ─── */
.top-section {
  text-align: center;
  padding: 10px 0 24px;
  position: relative;
}

.dynasty-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.dynasty-badge span {
  font-size: 11px;
  letter-spacing: 4px;
  color: var(--text-muted);
  font-family: 'Noto Serif TC', serif;
}
.dynasty-badge::before,
.dynasty-badge::after {
  content: '';
  display: inline-block;
  width: 30px;
  height: 1px;
  background: var(--parchment3);
}

.main-title {
  font-family: 'Noto Serif TC', serif;
  font-size: 42px;
  font-weight: 900;
  color: var(--red);
  line-height: 1.15;
  letter-spacing: 2px;
  margin-bottom: 6px;
  text-shadow: 2px 2px 0 rgba(123,36,28,0.15);
}

.sub-title {
  font-family: 'Noto Serif TC', serif;
  font-size: 17px;
  color: var(--text-mid);
  margin-bottom: 16px;
  letter-spacing: 1px;
}

.hook-text {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.9;
  max-width: 340px;
  margin: 0 auto;
}

/* 朱砂分隔線 */
.vermilion-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0;
}
.vermilion-divider::before,
.vermilion-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--red-light));
}
.vermilion-divider::after {
  background: linear-gradient(to left, transparent, var(--red-light));
}
.vermilion-divider .dot {
  width: 6px; height: 6px;
  background: var(--red);
  border-radius: 50%;
  flex-shrink: 0;
}

/* ─── 數據欄 ─── */
.stats-row {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-bottom: 28px;
  border: 1px solid var(--parchment3);
  border-radius: 12px;
  overflow: hidden;
  background: white;
}
.stat-item {
  flex: 1;
  text-align: center;
  padding: 14px 8px;
  border-right: 1px solid var(--parchment3);
}
.stat-item:last-child { border-right: none; }
.stat-num {
  font-family: 'Noto Serif TC', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--red);
  display: block;
}
.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
  display: block;
}

/* ─── 問卷卡片 ─── */
.form-card {
  background: #201b29;
  border: 1px solid var(--parchment3);
  border-radius: 16px;
  padding: 28px 22px;
  box-shadow: 0 2px 20px rgba(44,26,14,0.07);
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
}
.form-card::before {
  content: '緣';
  position: absolute;
  right: -10px; top: -20px;
  font-family: 'Noto Serif TC', serif;
  font-size: 120px;
  font-weight: 900;
  color: rgba(192,57,43,0.04);
  pointer-events: none;
  line-height: 1;
}

.card-heading {
  font-family: 'Noto Serif TC', serif;
  font-size: 16px;
  color: var(--red);
  text-align: center;
  margin-bottom: 22px;
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.card-heading::before,
.card-heading::after {
  content: '';
  display: inline-block;
  width: 20px;
  height: 1px;
  background: var(--red-light);
}

.section-tag {
  font-size: 12px;
  color: white;
  background: var(--red);
  padding: 3px 12px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 14px;
  letter-spacing: 1px;
  font-family: 'Noto Serif TC', serif;
}

.form-group { margin-bottom: 16px; }

label {
  display: block;
  font-size: 13px;
  color: var(--text-mid);
  margin-bottom: 7px;
  font-weight: 500;
}

input[type="text"], select {
  width: 100%;
  background: var(--parchment);
  border: 1px solid var(--parchment3);
  border-radius: 8px;
  padding: 11px 14px;
  color: var(--text-dark);
  font-size: 15px;
  font-family: 'Noto Sans TC', sans-serif;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
  -webkit-appearance: none;
}

input[type="text"]:focus, select:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(192,57,43,0.08);
  background: white;
}

input::placeholder { color: var(--parchment3); }

select option { background: white; }

.date-row {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1.5fr;
  gap: 8px;
}

.gender-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.gender-btn {
  padding: 11px;
  border: 1.5px solid var(--parchment3);
  border-radius: 8px;
  background: var(--parchment);
  color: var(--text-mid);
  font-size: 15px;
  font-family: 'Noto Sans TC', sans-serif;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}
.gender-btn.active {
  border-color: var(--red);
  background: rgba(192,57,43,0.06);
  color: var(--red);
  font-weight: 500;
}

/* 中間分隔 */
.partner-sep {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
}
.partner-sep::before, .partner-sep::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--parchment3);
}
.partner-sep-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  font-family: 'Noto Serif TC', serif;
}

/* 提交按鈕 */
.btn-submit {
  width: 100%;
  padding: 18px;
  background: var(--red);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 18px;
  font-family: 'Noto Serif TC', serif;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 3px;
  transition: all 0.3s;
  margin-top: 6px;
  position: relative;
  overflow: hidden;
}
.btn-submit::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.15), transparent);
  animation: sweep 2.5s infinite;
}
@keyframes sweep {
  to { left: 150%; }
}
.btn-submit:hover {
  background: var(--red-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(192,57,43,0.3);
}
.btn-submit:active { transform: translateY(0); }

.btn-note {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.btn-note span { display: flex; align-items: center; gap: 4px; }

/* ─── 信任徽章 ─── */
.trust-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.trust-item {
  flex: 1;
  min-width: 80px;
  background: white;
  border: 1px solid var(--parchment3);
  border-radius: 10px;
  padding: 12px 8px;
  text-align: center;
  font-size: 12px;
  color: var(--text-mid);
}
.trust-icon {
  font-size: 20px;
  margin-bottom: 4px;
}

/* ─── 評價 ─── */
.review-card {
  background: white;
  border: 1px solid var(--parchment3);
  border-left: 3px solid var(--red);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
}
.review-stars {
  color: var(--gold);
  font-size: 12px;
  margin-bottom: 6px;
}
.review-text {
  font-size: 13px;
  color: var(--text-mid);
  line-height: 1.8;
  margin-bottom: 8px;
}
.review-author {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ─── LOADING ─── */
#loading {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(28,16,8,0.96);
  z-index: 100;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
}

.loading-symbol {
  width: 90px;
  height: 90px;
  margin: 0 auto 28px;
  position: relative;
}
.loading-ring {
  width: 90px;
  height: 90px;
  border: 2px solid rgba(192,57,43,0.2);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin 1.4s linear infinite;
  position: absolute;
  top: 0; left: 0;
}
.loading-ring2 {
  width: 70px;
  height: 70px;
  border: 1px solid rgba(201,168,76,0.2);
  border-bottom-color: var(--gold);
  border-radius: 50%;
  animation: spin 2s linear infinite reverse;
  position: absolute;
  top: 10px; left: 10px;
}
.loading-char {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Noto Serif TC', serif;
  font-size: 26px;
  font-weight: 900;
  color: var(--red);
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-title {
  font-family: 'Noto Serif TC', serif;
  font-size: 20px;
  color: var(--parchment);
  margin-bottom: 24px;
}

.loading-progress {
  width: 240px;
  height: 3px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  margin: 0 auto 20px;
  overflow: hidden;
}
.loading-bar {
  height: 100%;
  width: 0%;
  background: var(--red);
  border-radius: 2px;
  transition: width 0.4s ease;
}

.loading-steps {
  list-style: none;
  text-align: left;
  display: inline-block;
}
.loading-steps li {
  font-size: 13px;
  color: rgba(245,236,215,0.4);
  padding: 5px 0 5px 22px;
  position: relative;
  transition: color 0.4s;
}
.loading-steps li::before {
  content: '○';
  position: absolute;
  left: 0;
  font-size: 10px;
  top: 6px;
}
.loading-steps li.done { color: var(--parchment); }
.loading-steps li.done::before { content: '●'; color: var(--red); }

/* ─── 結果頁 ─── */
#result { display: none; }

.result-header {
  text-align: center;
  padding: 28px 0 20px;
}
.result-seal {
  display: inline-block;
  width: 64px;
  height: 64px;
  background: var(--red);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  transform: rotate(8deg);
  box-shadow: 3px 3px 0 var(--red-dark);
}
.result-seal span {
  font-family: 'Noto Serif TC', serif;
  font-size: 28px;
  font-weight: 900;
  color: white;
  transform: rotate(-8deg);
  display: block;
}
.result-names-row {
  font-family: 'Noto Serif TC', serif;
  font-size: 22px;
  color: var(--text-dark);
  margin-bottom: 6px;
}
.result-names-row .name {
  color: var(--red);
  font-size: 26px;
  font-weight: 700;
}
.result-subtitle {
  font-size: 13px;
  color: var(--text-muted);
}

/* 緣分指數卡 */
.score-card {
  background: white;
  border: 1px solid var(--parchment3);
  border-radius: 16px;
  padding: 28px 22px;
  text-align: center;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(44,26,14,0.06);
}
.score-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--red);
  border-radius: 16px 16px 0 0;
}
.score-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 10px;
  letter-spacing: 1px;
}
.score-num {
  font-family: 'Noto Serif TC', serif;
  font-size: 72px;
  font-weight: 900;
  color: var(--red);
  line-height: 1;
  margin-bottom: 4px;
}
.score-denom {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 18px;
}
.score-bar {
  height: 8px;
  background: var(--parchment);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 14px;
}
.score-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(to right, var(--red-dark), var(--red), var(--red2));
  width: 0%;
  transition: width 1.6s cubic-bezier(0.25, 1, 0.5, 1);
}
.score-tag {
  display: inline-block;
  border: 1.5px solid var(--red);
  border-radius: 20px;
  padding: 5px 20px;
  font-size: 15px;
  color: var(--red);
  font-family: 'Noto Serif TC', serif;
  letter-spacing: 1px;
}

/* 六道輪迴卡 */
.reincarnation-card {
  background: white;
  border: 1px solid var(--parchment3);
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 14px;
  box-shadow: 0 2px 12px rgba(44,26,14,0.05);
}
.rc-title {
  font-family: 'Noto Serif TC', serif;
  font-size: 15px;
  color: var(--red);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.rc-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--parchment3);
}
.rc-text {
  font-size: 14px;
  color: var(--text-mid);
  line-height: 1.9;
}

/* 六道輪迴視覺 */
.six-realms {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.realm-item {
  background: var(--parchment);
  border: 1px solid var(--parchment3);
  border-radius: 10px;
  padding: 12px 8px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  transition: all 0.3s;
}
.realm-item.active {
  background: rgba(192,57,43,0.08);
  border-color: var(--red);
  color: var(--red);
}
.realm-icon { font-size: 22px; margin-bottom: 4px; }
.realm-name { font-family: 'Noto Serif TC', serif; font-size: 13px; }
.realm-lives {
  font-size: 11px;
  margin-top: 3px;
  opacity: 0.7;
}

/* 鎖定卡 */
.locked-card {
  background: white;
  border: 1px solid var(--parchment3);
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(44,26,14,0.05);
}
.locked-inner {
  filter: blur(4px);
  user-select: none;
  pointer-events: none;
}
.lock-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(2px);
  border-radius: 16px;
  gap: 12px;
  cursor: pointer;
  padding: 20px;
}
.lock-overlay .lock-icon { font-size: 32px; }
.lock-overlay .lock-txt {
  font-size: 14px;
  color: #7A5230;
  font-family: 'Noto Serif TC', serif;
  font-weight: 600;
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}
.lock-overlay .lock-btn {
  display: inline-block;
  padding: 12px 28px;
  background: linear-gradient(135deg, #06C755 0%, #04a844 100%);
  color: white !important;
  font-size: 15px;
  font-weight: 700;
  border-radius: 12px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(6,199,85,0.45);
  letter-spacing: 1px;
  font-family: 'Noto Serif TC', serif;
  animation: lockBtnPulse 2s ease-in-out infinite;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}
.lock-overlay .lock-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(6,199,85,0.6); }
.lock-overlay .lock-btn:active { transform: translateY(0); }
@keyframes lockBtnPulse {
  0%, 100% { box-shadow: 0 4px 14px rgba(6,199,85,0.45); }
  50% { box-shadow: 0 6px 22px rgba(6,199,85,0.7); }
}

/* CTA卡 */
.cta-card {
  background: var(--red);
  border-radius: 20px;
  padding: 30px 24px;
  text-align: center;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}
.cta-card::before {
  content: '緣';
  position: absolute;
  right: -20px; bottom: -30px;
  font-family: 'Noto Serif TC', serif;
  font-size: 160px;
  font-weight: 900;
  color: rgba(255,255,255,0.06);
  line-height: 1;
  pointer-events: none;
}
.cta-title {
  font-family: 'Noto Serif TC', serif;
  font-size: 22px;
  font-weight: 700;
  color: white;
  margin-bottom: 8px;
  letter-spacing: 1px;
}
.cta-desc {
  font-size: 14px;
  color: rgba(255,255,255,0.8);
  line-height: 1.8;
  margin-bottom: 22px;
}
.cta-list {
  list-style: none;
  text-align: left;
  margin-bottom: 22px;
  display: inline-block;
}
.cta-list li {
  font-size: 13px;
  color: rgba(255,255,255,0.9);
  padding: 5px 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.cta-list li::before {
  content: '◆';
  font-size: 9px;
  color: var(--gold-light);
  margin-top: 3px;
  flex-shrink: 0;
}

.btn-line {
  display: block;
  width: 100%;
  padding: 20px;
  background: linear-gradient(135deg, #06C755 0%, #04a844 100%);
  border: none;
  border-radius: 16px;
  color: white;
  font-size: 18px;
  font-family: 'Noto Serif TC', serif;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 2px;
  transition: all 0.3s;
  margin-bottom: 10px;
  box-shadow: 0 6px 20px rgba(6,199,85,0.45);
  animation: btnPulse 2s ease-in-out infinite;
  position: relative;
  overflow: hidden;
}
.btn-line::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 40%;
  height: 200%;
  background: rgba(255,255,255,0.25);
  transform: skewX(-20deg);
  animation: btnShine 3s ease-in-out infinite;
}
@keyframes btnPulse {
  0%, 100% { box-shadow: 0 6px 20px rgba(6,199,85,0.45); }
  50% { box-shadow: 0 8px 28px rgba(6,199,85,0.7); }
}
@keyframes btnShine {
  0% { left: -60%; }
  50%, 100% { left: 120%; }
}
.btn-line:active { transform: translateY(1px); box-shadow: 0 3px 10px rgba(6,199,85,0.3); }

.cta-urgency {
  font-size: 12px;
  color: rgba(255,255,255,0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.urgency-dot {
  width: 6px; height: 6px;
  background: #7DCEA0;
  border-radius: 50%;
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* LINE Modal */
#line-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(28,16,8,0.88);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-inner {
  background: white;
  border-radius: 20px;
  padding: 36px 28px;
  max-width: 340px;
  width: 100%;
  text-align: center;
  position: relative;
}
.modal-close {
  position: absolute;
  top: 14px; right: 18px;
  background: none;
  border: none;
  font-size: 22px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}
.modal-line-icon {
  width: 64px;
  height: 64px;
  background: #06C755;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
}
.modal-line-icon svg { width: 40px; height: 40px; }
.modal-title {
  font-family: 'Noto Serif TC', serif;
  font-size: 20px;
  color: var(--red);
  margin-bottom: 8px;
}
.modal-qr {
  width: 200px;
  height: 240px;
  background: white;
  border: none;
  border-radius: 12px;
  margin: 16px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
/* 換成你的QR Code: <img src="static/picture/your-line-qr.jpg" style="width:156px;height:156px;border-radius:10px"> */
.modal-desc {
  font-size: 14px;
  color: var(--text-mid);
  line-height: 1.9;
}
.modal-keyword {
  display: inline-block;
  background: rgba(192,57,43,0.08);
  border: 1px solid var(--red-light);
  border-radius: 6px;
  padding: 2px 12px;
  color: var(--red);
  font-weight: 700;
  font-family: 'Noto Serif TC', serif;
  margin: 4px 0;
}

/* Footer(古典版權聲明,字色加亮提升可讀性) */
.footer {
  text-align: center;
  padding: 30px 16px 24px;
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  line-height: 1.95;
  letter-spacing: 0.5px;
}
.footer .footer-copyright {
  color: rgba(255,255,255,0.7);
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 10px;
  letter-spacing: 1.5px;
  display: block;
}
.footer .footer-line {
  display: inline-block;
  width: 24px;
  height: 1px;
  background: rgba(240,180,41,0.4);
  vertical-align: middle;
  margin: 0 8px;
}
.footer .footer-disclaimer {
  font-size: 11.5px;
  color: rgba(255,255,255,0.5);
  line-height: 2;
  max-width: 360px;
  margin: 0 auto;
}
.footer .footer-warn {
  color: #FFB59D;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* Animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.55s ease forwards; }
.delay-1 { animation-delay: 0.1s; opacity: 0; }
.delay-2 { animation-delay: 0.2s; opacity: 0; }
.delay-3 { animation-delay: 0.3s; opacity: 0; }
.delay-4 { animation-delay: 0.45s; opacity: 0; }

@media (max-width: 400px) {
  .main-title { font-size: 34px; }
  .score-num { font-size: 58px; }
  .date-row { grid-template-columns: 1fr 1fr 1fr; }
}






@keyframes toastSlideIn {
  from { transform: translateX(-115%) scale(0.96); opacity: 0; }
  to   { transform: translateX(0) scale(1);        opacity: 1; }
}
@keyframes toastSlideOut {
  from { transform: translateX(0) scale(1);        opacity: 1; }
  to   { transform: translateX(-115%) scale(0.96); opacity: 0; }
}
.toast-card {
  background: white;
  border-radius: 14px;
  padding: 10px 14px 10px 12px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.22);
  border-left: 3px solid #06C755;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 230px;
  max-width: 290px;
  font-family: 'Noto Sans TC', sans-serif;
  pointer-events: auto;
  cursor: pointer;
  animation: toastSlideIn 0.45s cubic-bezier(0.34,1.56,0.64,1);
  margin-bottom: 8px;
  transition: transform 0.2s;
}
.toast-card:active { transform: scale(0.97); }
.toast-card.out { animation: toastSlideOut 0.4s ease-in forwards; }
.toast-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6C3DC8, #E8472A);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: white;
  position: relative;
}
.toast-avatar::after {
  content: '';
  position: absolute;
  bottom: -1px; right: -1px;
  width: 11px; height: 11px;
  background: #06C755;
  border-radius: 50%;
  border: 2px solid white;
  animation: toastDot 1.8s ease-in-out infinite;
}
@keyframes toastDot {
  0%,100% { box-shadow: 0 0 0 0 rgba(6,199,85,0.6); }
  50%     { box-shadow: 0 0 0 4px rgba(6,199,85,0); }
}

/* Transition Screen */
.transition-screen {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #F5ECD7;
  z-index: 9999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
}
.transition-screen.show {
  display: flex;
}
.transition-icon {
  font-size: 70px;
  margin-bottom: 24px;
}
.transition-title {
  font-family: 'Noto Serif TC', serif;
  font-size: 26px;
  color: #C0392B;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: 2px;
}
.transition-desc {
  font-size: 15px;
  color: #6B4226;
  line-height: 2.2;
  margin-bottom: 20px;
}
.transition-progress {
  font-size: 15px;
  color: #C0392B;
  font-weight: 600;
  margin-bottom: 20px;
  min-height: 24px;
}
.transition-spinner {
  width: 36px;
  height: 36px;
  border: 4px solid rgba(192, 57, 43, 0.2);
  border-top-color: #C0392B;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.toast-content { flex: 1; min-width: 0; line-height: 1.35; }
.toast-name {
  font-size: 13px;
  font-weight: 600;
  color: #2C1810;
  display: block;
}
.toast-action {
  font-size: 11.5px;
  color: #7A6248;
  display: block;
  margin-top: 1px;
}
.toast-time {
  font-size: 10px;
  color: #B5A089;
  margin-top: 2px;
  display: block;
}