* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'DM Sans', -apple-system, sans-serif; background: #fff; color: #1a1a1a; }

:root {
  --et-red: #A10000;
  --et-red-light: #C41010;
  --et-red-dark: #7A0000;
  --et-red-bg: #FFF5F5;
  --et-red-border: #E8C4C4;
  --color-text-primary: #1a1a1a;
  --color-text-secondary: #6b7280;
  --color-background-primary: #ffffff;
  --color-background-secondary: #f9f9f9;
  --color-border-tertiary: #e5e5e5;
  --color-border-secondary: #d1d1d1;
  --border-radius-lg: 12px;
  --border-radius-md: 8px;
}

.screen { display: none; padding: 1.5rem 1rem; max-width: 480px; margin: 0 auto; }
.screen.active { display: block; }
.result-full-page { max-width: none !important; padding: 0 !important; }
.result-share-page { max-width: 640px; margin: 0 auto; }

/* ── HEADER BAR ── */
.et-header { background: var(--et-red); padding: 14px 16px; text-align: center; position: sticky; top: 0; z-index: 100; }
.et-header img { height: 32px; }
.et-header .header-text { color: #fff; font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }

/* ── WELCOME ── */
.hero { text-align: center; padding: 2rem 1rem 1.5rem; }
.hero-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--et-red-bg); border: 1px solid var(--et-red-border); border-radius: 20px; padding: 4px 14px; font-size: 12px; color: var(--et-red); margin-bottom: 1.25rem; font-weight: 500; }
.hero h1 { font-size: 26px; font-weight: 700; color: var(--et-red-dark); margin-bottom: 8px; }
.hero p { font-size: 15px; color: var(--color-text-secondary); line-height: 1.6; max-width: 400px; margin: 0 auto 1.75rem; }
.section-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 1.75rem; }
.section-card { background: var(--color-background-primary); border: 1px solid var(--color-border-tertiary); border-radius: var(--border-radius-lg); padding: 14px 12px; text-align: center; transition: border-color 0.15s; }
.section-card:hover { border-color: var(--et-red-border); }
.section-card .sc-icon { font-size: 22px; margin-bottom: 6px; color: var(--et-red); }
.section-card .sc-title { font-size: 13px; font-weight: 600; color: var(--color-text-primary); }
.section-card .sc-count { font-size: 12px; color: var(--color-text-secondary); margin-top: 2px; }
.start-disclaimer { display: flex; gap: 10px; align-items: flex-start; max-width: 400px; margin: 0 auto 1.5rem; padding: 12px 14px; background: var(--color-background-secondary); border: 1px solid var(--color-border-tertiary); border-radius: var(--border-radius-md); text-align: left; }
.start-disclaimer i { flex-shrink: 0; color: var(--et-red); font-size: 18px; line-height: 1.45; }
.start-disclaimer p { margin: 0; max-width: none; font-size: 12px; line-height: 1.55; color: var(--color-text-secondary); }
.btn-start { display: block; width: 100%; max-width: 340px; margin: 0 auto; background: var(--et-red); color: #fff; border: none; border-radius: var(--border-radius-lg); padding: 14px; font-size: 16px; font-weight: 600; cursor: pointer; transition: background 0.15s; font-family: inherit; }
.btn-start:hover { background: var(--et-red-dark); }

/* ── QUESTION ── */
.section-header { display: flex; align-items: center; gap: 10px; margin-bottom: 1.25rem; padding-bottom: 1rem; border-bottom: 1px solid var(--color-border-tertiary); }
.section-tag { border-radius: 20px; padding: 4px 12px; font-size: 12px; font-weight: 500; }
.tag-grammar { background: var(--et-red-bg); color: var(--et-red); }
.tag-reading { background: var(--et-red-bg); color: var(--et-red); }
.tag-listening { background: var(--et-red-bg); color: var(--et-red); }
.timeout-form { display: none; }
.test-timer { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--color-background-secondary); border: 1px solid var(--color-border-tertiary); border-radius: var(--border-radius-md); padding: 10px 12px; margin-bottom: 1.25rem; color: var(--color-text-secondary); font-size: 13px; }
.test-timer span { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.test-timer strong { color: var(--et-red-dark); font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.test-timer.is-low { background: var(--et-red-bg); border-color: var(--et-red-border); }
.test-timer-centered { max-width: 280px; margin: 0 auto 1.5rem; }
.q-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.25rem; }
.q-num { font-size: 13px; color: var(--color-text-secondary); }
.q-points { font-size: 12px; background: var(--et-red-bg); border-radius: 12px; padding: 3px 10px; color: var(--et-red); font-weight: 500; }
.progress-bar { height: 4px; background: var(--color-background-secondary); border-radius: 2px; margin-bottom: 1.5rem; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 2px; background: var(--et-red); transition: width 0.4s ease; }
.question-text { font-size: 16px; color: var(--color-text-primary); line-height: 1.65; margin-bottom: 1.5rem; font-weight: 400; }
.options { display: flex; flex-direction: column; gap: 8px; margin-bottom: 1.5rem; }
.option-choice { display: block; }
.option-radio { position: absolute; opacity: 0; pointer-events: none; }
.option-btn { background: var(--color-background-primary); border: 1px solid var(--color-border-tertiary); border-radius: var(--border-radius-lg); padding: 13px 16px; text-align: left; font-size: 15px; color: var(--color-text-primary); cursor: pointer; transition: all 0.15s; display: flex; align-items: center; gap: 10px; font-family: inherit; }
.option-btn:hover:not(:disabled) { background: var(--color-background-secondary); border-color: var(--color-border-secondary); }
.option-btn .opt-letter { width: 24px; height: 24px; border-radius: 50%; background: var(--color-background-secondary); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 500; color: var(--color-text-secondary); flex-shrink: 0; }
.option-radio:focus-visible + .option-btn { outline: 2px solid var(--et-red); outline-offset: 2px; }
.option-radio:checked + .option-btn,
.option-btn.selected { background: var(--et-red-bg); border-color: var(--et-red); color: var(--et-red-dark); box-shadow: inset 0 0 0 1px var(--et-red); }
.option-radio:checked + .option-btn .opt-letter,
.option-btn.selected .opt-letter { background: var(--et-red); color: #fff; }
.option-btn:disabled { cursor: default; }
.feedback-bar { display: none; align-items: center; gap: 8px; padding: 10px 14px; border-radius: var(--border-radius-md); margin-bottom: 1rem; font-size: 14px; }
.feedback-bar.show { display: flex; }
.feedback-bar.ok { background: #EAF3DE; color: #27500A; }
.feedback-bar.nope { background: #FCEBEB; color: var(--et-red-dark); }
.nav-row { display: flex; justify-content: flex-end; }
.btn-next { background: var(--et-red); color: #fff; border: none; border-radius: var(--border-radius-md); padding: 11px 22px; font-size: 14px; font-weight: 500; cursor: pointer; display: flex; align-items: center; gap: 6px; font-family: inherit; transition: background 0.15s; }
.btn-next:hover { background: var(--et-red-dark); }
.btn-next:disabled { opacity: 0.3; cursor: default; }
.listen-card { background: var(--et-red-bg); border: 1px solid var(--et-red-border); border-radius: var(--border-radius-lg); padding: 1rem 1.25rem; margin-bottom: 1.25rem; }
.audio-player { display: block; width: 100%; margin-top: 12px; }
.audio-label { font-size: 13px; color: var(--color-text-secondary); line-height: 1.5; }
.audio-label strong { display: block; color: var(--color-text-primary); font-weight: 500; font-size: 14px; }
.passage-card { background: var(--color-background-secondary); border: 1px solid var(--color-border-tertiary); border-radius: var(--border-radius-lg); padding: 1rem 1.25rem; margin-bottom: 1.25rem; font-size: 14px; color: var(--color-text-primary); line-height: 1.7; white-space: pre-line; }

/* ── SECTION BREAK ── */
.section-break-inner { text-align: center; padding: 2.5rem 1rem; }
.break-icon-wrap { width: 64px; height: 64px; border-radius: 50%; background: var(--et-red-bg); display: flex; align-items: center; justify-content: center; margin: 0 auto 1.25rem; }
.break-icon-wrap i { font-size: 28px; color: var(--et-red); }

/* ── LEAD FORM ── */
#screen-lead { padding-bottom: 2rem; }
.lead-header { text-align: center; padding: 2rem 0 1.5rem; }
.lead-header .lead-icon { font-size: 36px; color: var(--et-red); margin-bottom: 1rem; }
.lead-header h2 { font-size: 22px; font-weight: 700; color: var(--et-red-dark); margin-bottom: 6px; }
.lead-header p { font-size: 14px; color: var(--color-text-secondary); line-height: 1.6; max-width: 360px; margin: 0 auto; }
.lead-form { display: flex; flex-direction: column; gap: 14px; margin-bottom: 1.25rem; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group label { font-size: 13px; font-weight: 500; color: var(--color-text-primary); }
.form-group label span.req { color: var(--et-red); margin-left: 2px; }
.form-input { background: var(--color-background-primary); border: 1px solid var(--color-border-tertiary); border-radius: var(--border-radius-md); padding: 11px 14px; font-size: 15px; color: var(--color-text-primary); font-family: inherit; transition: border-color 0.15s; outline: none; width: 100%; }
.form-input:focus { border-color: var(--et-red); }
.form-input.error { border-color: var(--et-red); }
.form-input::placeholder { color: var(--color-text-secondary); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.checkbox-group { display: flex; flex-direction: column; gap: 10px; }
.checkbox-item { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.checkbox-item input[type="checkbox"] { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; accent-color: var(--et-red); cursor: pointer; }
.checkbox-item .cb-label { font-size: 13px; color: var(--color-text-secondary); line-height: 1.5; }
.checkbox-item .cb-label a { color: var(--et-red); text-decoration: underline; }
.form-error-msg { font-size: 12px; color: var(--et-red); margin-top: 2px; display: none; }
.form-error-msg.show { display: block; }
.btn-lead-submit { display: block; width: 100%; background: var(--et-red); color: #fff; border: none; border-radius: var(--border-radius-lg); padding: 15px; font-size: 16px; font-weight: 600; cursor: pointer; transition: background 0.15s; font-family: inherit; margin-top: 4px; }
.btn-lead-submit:hover { background: var(--et-red-dark); }

/* ── RESULT / CERTIFICATE ── */
#screen-result { padding: 0; max-width: 640px; }
.result-full-page .certif-wrap { padding: 0; }

.result-section { padding: 2.5rem 1.5rem; max-width: 640px; margin: 0 auto; }
.result-section-main { background: #fff; }
/* .result-section-cta { background: var(--color-background-secondary); } */
.result-share-page .certif-wrap { padding: 1.5rem 1rem 2rem; }
.share-cta-btn { text-decoration: none; text-align: center; margin-top: 1.5rem; display: block; }
.certif-wrap { }
.result-share-page .certif-wrap { padding: 1.5rem 1rem 2rem; }

.certif-card {
  background: #fff;
  border: 1px solid var(--color-border-tertiary);
  border-radius: 16px;
  padding: 2rem 1.5rem 1.75rem;
  text-align: center;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}
.certif-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--et-red);
}
.certif-logo { display: block; margin: 0 auto 10px; height: 56px; }
.certif-tagline-badge { display: inline-block; background: var(--et-red-bg); color: var(--et-red); font-size: 11px; font-weight: 500; padding: 3px 12px; border-radius: 20px; margin-bottom: 1.25rem; }
.certif-name-rule { display: flex; align-items: center; gap: 10px; margin-bottom: 1.25rem; }
.certif-name-rule hr { flex: 1; border: none; border-top: 1px solid var(--color-border-tertiary); }
.certif-name { font-family: 'Playfair Display', serif; font-size: 24px; font-weight: 700; color: var(--et-red-dark); white-space: nowrap; }
.certif-subtitle { font-size: 13px; color: var(--color-text-secondary); margin-bottom: 1.5rem; line-height: 1.5; }

.diamond-wrap { position: relative; width: 160px; height: 160px; margin: 0 auto 1.25rem; }
.diamond-bg {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, #A10000 0%, #C41010 40%, #D42020 70%, #A10000 100%);
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  filter: drop-shadow(0 4px 16px rgba(161,0,0,0.35));
}
.diamond-bg-2 {
  position: absolute; inset: 12px;
  background: linear-gradient(135deg, #B20505 0%, #D42020 50%, #E03030 100%);
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  opacity: 0.6;
}
.diamond-inner {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.diamond-brand { font-size: 10px; font-weight: 700; letter-spacing: 0.06em; color: rgba(255,255,255,0.9); margin-bottom: 2px; }
.diamond-score { font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.86); line-height: 1.25; margin-top: 4px; }
.diamond-total { font-size: 13px; color: rgba(255,255,255,0.8); }
.diamond-level { font-size: 40px; font-weight: 700; color: #fff; line-height: 1; letter-spacing: 0.05em; }

.certif-skills { display: flex; justify-content: center; gap: 20px; margin-bottom: 1.5rem; }
.certif-skill-item { display: flex; align-items: center; gap: 5px; font-size: 13px; color: var(--color-text-secondary); }
.certif-skill-item .skill-dot { width: 18px; height: 18px; border-radius: 50%; background: var(--et-red); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.certif-skill-item .skill-dot i { font-size: 10px; color: #fff; }

.certif-date { font-size: 12px; color: var(--color-text-secondary); font-weight: 500; }
.certif-date strong { display: block; font-size: 11px; color: var(--color-text-secondary); font-weight: 400; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 2px; }

.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 1rem; }
.stat-card { background: var(--color-background-secondary); border-radius: var(--border-radius-md); padding: 12px; text-align: center; }
.stat-card .sv { font-size: 20px; font-weight: 600; color: var(--et-red-dark); }
.stat-card .sl { font-size: 12px; color: var(--color-text-secondary); margin-top: 2px; }

.summary-heading { font-size: 16px; font-weight: 600; color: var(--color-text-primary); margin-bottom: 4px; }
.summary-sub { font-size: 13px; color: var(--color-text-secondary); margin-bottom: 1rem; }

.section-breakdown { background: var(--color-background-primary); border: 1px solid var(--color-border-tertiary); border-radius: var(--border-radius-lg); padding: 1rem 1.25rem; margin-bottom: 1rem; }
.sb-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--color-border-tertiary); font-size: 14px; }
.sb-row:last-child { border-bottom: none; }
.sb-row-level { gap: 12px; }
.sb-left { display: flex; align-items: center; gap: 10px; min-width: 150px; }
.sb-icon { width: 32px; height: 32px; border-radius: 8px; background: var(--et-red-bg); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sb-icon i { font-size: 16px; color: var(--et-red); }
.sb-info { display: flex; flex-direction: column; }
.sb-label { font-size: 13px; font-weight: 500; color: var(--color-text-primary); }
.sb-score { font-size: 12px; color: var(--color-text-secondary); }
.sb-bar-wrap { flex: 1; min-width: 80px; margin: 0 12px; height: 6px; background: var(--color-background-secondary); border-radius: 3px; overflow: hidden; }
.sb-bar-fill { height: 100%; border-radius: 3px; background: var(--et-red); }
.sb-level-badge { font-size: 12px; font-weight: 600; color: var(--et-red); background: var(--et-red-bg); padding: 3px 10px; border-radius: 12px; white-space: nowrap; }

.level-scale { margin-bottom: 1.5rem; }
.level-scale-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.level-scale-cell { border: 1px solid var(--color-border-tertiary); border-radius: 10px; padding: 12px 4px; text-align: center; background: var(--color-background-primary); transition: all 0.2s; }
.level-scale-cell .lsc-range { font-size: 11px; color: var(--color-text-secondary); margin-bottom: 4px; }
.level-scale-cell .lsc-code { font-size: 15px; font-weight: 700; color: var(--color-text-secondary); margin-bottom: 2px; }
.level-scale-cell .lsc-name { font-size: 10px; color: var(--color-text-secondary); line-height: 1.3; }
.level-scale-cell.active { background: var(--et-red); border-color: var(--et-red-dark); }
.level-scale-cell.active .lsc-range,
.level-scale-cell.active .lsc-code,
.level-scale-cell.active .lsc-name { color: #fff; }

.share-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; max-width: 340px; margin: 0 auto 1.5rem; background: var(--color-background-secondary); color: var(--color-text-primary); border: 1px solid var(--color-border-tertiary); border-radius: var(--border-radius-lg); padding: 12px; font-size: 14px; font-weight: 500; cursor: pointer; font-family: inherit; transition: background 0.15s; }
.share-btn:hover { background: var(--color-border-tertiary); }

.btn-retry { display: block; width: 100%; max-width: 340px; margin: 0 auto 1.5rem; background: var(--et-red); color: #fff; border: none; border-radius: var(--border-radius-lg); padding: 14px; font-size: 15px; font-weight: 500; cursor: pointer; font-family: inherit; transition: background 0.15s; }
.btn-retry:hover { background: var(--et-red-dark); }

/* ── CTA SECTION ── */
.cta-section {
  margin: 0 0 1.5rem;
  border-radius: 16px;
  overflow: hidden;
}
.cta-section.cta-b2-below {
  background: var(--et-red-bg);
  border: 1px solid var(--et-red-border);
}
.cta-section.cta-above-b2 {
  background: var(--et-red);
  border: 1px solid var(--et-red-dark);
}
.cta-inner { padding: 1.5rem 1.25rem; }
.cta-eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 8px; }
.cta-b2-below .cta-eyebrow { color: var(--et-red); }
.cta-above-b2 .cta-eyebrow { color: rgba(255,255,255,0.8); }
.cta-h2 { font-size: 17px; font-weight: 700; line-height: 1.4; margin-bottom: 10px; }
.cta-b2-below .cta-h2 { color: var(--et-red-dark); }
.cta-above-b2 .cta-h2 { color: #fff; }
.cta-body { font-size: 14px; line-height: 1.65; margin-bottom: 1.25rem; }
.cta-b2-below .cta-body { color: #4b5563; }
.cta-above-b2 .cta-body { color: rgba(255,255,255,0.85); }
.cta-btn { display: inline-flex; align-items: center; gap: 7px; border-radius: 10px; padding: 12px 20px; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; transition: opacity 0.15s; }
.cta-b2-below .cta-btn { background: var(--et-red); color: #fff; }
.cta-above-b2 .cta-btn { background: #fff; color: var(--et-red); }
.cta-btn:hover { opacity: 0.85; }
.official-test-card { display: flex; gap: 14px; align-items: flex-start; background: #fff; border: 1px solid var(--color-border-tertiary); border-radius: var(--border-radius-lg); padding: 1.25rem; margin: 0 0 1.5rem; }
.official-test-icon { width: 42px; height: 42px; border-radius: 50%; background: var(--et-red-bg); color: var(--et-red); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 21px; }
.official-test-copy h3 { font-size: 16px; font-weight: 700; color: var(--et-red-dark); line-height: 1.35; margin-bottom: 8px; }
.official-test-copy p { font-size: 14px; line-height: 1.6; color: var(--color-text-secondary); margin-bottom: 1rem; }
.official-test-btn { display: inline-flex; align-items: center; gap: 7px; background: #25D366; color: #fff; border-radius: 10px; padding: 11px 16px; font-size: 14px; font-weight: 600; text-decoration: none; transition: opacity 0.15s; }
.official-test-btn:hover { opacity: 0.85; }

/* ── PRIVACY POLICY ── */
.privacy-page { max-width: 760px; padding-top: 2rem; }
.privacy-hero { margin-bottom: 2rem; }
.privacy-hero h1 { font-size: 34px; line-height: 1.18; color: var(--color-text-primary); margin: 0 0 1rem; font-weight: 700; }
.privacy-hero p { font-size: 16px; line-height: 1.7; color: var(--color-text-secondary); max-width: 680px; }
.privacy-section { margin-bottom: 2rem; }
.privacy-section h2 { font-size: 24px; line-height: 1.25; color: var(--color-text-primary); margin-bottom: 0.75rem; font-weight: 700; }
.privacy-section p { font-size: 15px; line-height: 1.75; color: var(--color-text-primary); margin-bottom: 1rem; }
.privacy-section ul { margin: 0; padding-left: 1.4rem; color: var(--color-text-primary); }
.privacy-section li { font-size: 15px; line-height: 1.7; margin-bottom: 0.35rem; }
.privacy-back-btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; margin: 0 0 1rem; }

/* ── FOOTER ── */
.et-footer { text-align: center; padding: 1.25rem 1rem; border-top: 1px solid var(--color-border-tertiary); margin-top: 1rem; }
.et-footer p { font-size: 12px; color: var(--color-text-secondary); line-height: 1.5; }
.et-footer a { color: var(--et-red); text-decoration: none; }
.et-footer a:hover { text-decoration: underline; }

@media (max-width: 420px) {
  .sb-row-level { flex-wrap: wrap; }
  .sb-row-level .sb-bar-wrap { order: 3; flex-basis: 100%; margin: 2px 0 0 42px; }
  .sb-level-badge { margin-left: auto; }
}
