/* =========================================================================
   FORWARD CHINESE (馥華華語中心) × SC-TOP TOCFL MOCK EXAM PLATFORM (CBT & CAT)
   Reference UI: Forward Brand Design System (Oceanic Navy, Sky Blue & E-BO)
   ========================================================================= */

:root {
  --forward-navy: #023f6a;
  --forward-navy-dark: #012844;
  --forward-navy-light: #08558d;
  --forward-blue: #1e91d2;
  --forward-blue-soft: #ebf6fd;
  --forward-accent-green: #8bc34a;
  --forward-emerald: #10b981;
  --forward-gold: #f59e0b;
  --forward-bg: #f4f8fb;
  --forward-card-bg: #ffffff;
  --forward-text-dark: #0f172a;
  --forward-text-muted: #475569;
  --forward-border: #dbe7f3;
}

* {
  box-sizing: border-box;
}

html {
  max-width: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  padding: 0;
  padding-top: 44px;
  max-width: 100%;
  overflow-x: clip;
  font-size: 14pt;
  font-family: "Plus Jakarta Sans", "Noto Sans TC", "Microsoft JhengHei", "DFKai-SB", serif;
  color: var(--forward-text-dark);
  background-color: var(--forward-bg);
  -webkit-font-smoothing: antialiased;
}

body.script-simplified {
  font-family: "Plus Jakarta Sans", "SimSun", "宋体", "Microsoft YaHei", sans-serif;
}

body.screen-portal,
body.screen-sets,
body.screen-changeorder {
  background-color: var(--forward-bg);
  background-image:
    radial-gradient(at 0% 0%, rgba(30, 145, 210, 0.10) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(2, 63, 106, 0.08) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(139, 195, 74, 0.08) 0px, transparent 50%);
  background-attachment: fixed;
}

body.screen-loginchk {
  background: linear-gradient(135deg, #012844 0%, #023f6a 50%, #08558d 100%);
  overflow-x: hidden;
}

body.screen-exam,
body.screen-score,
body.screen-finish {
  background-color: #eef4fa;
  background-image:
    radial-gradient(at 10% 10%, rgba(30, 145, 210, 0.09) 0px, transparent 50%),
    radial-gradient(at 90% 90%, rgba(2, 63, 106, 0.08) 0px, transparent 50%);
  min-height: 100vh;
}

.view-screen {
  display: none;
}

.view-screen.active {
  display: block;
}

/* =========================================================================
   TOP FORWARD CANDIDATE TOOLBAR (#simToolbar — No Admin Link)
   ========================================================================= */
.sim-toolbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 44px;
  background: linear-gradient(90deg, #012844 0%, #023f6a 55%, #08558d 100%);
  color: #f8fafc;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 4px 14px rgba(1, 40, 68, 0.25);
  z-index: 9999;
  font-family: "Plus Jakarta Sans", "Noto Sans TC", sans-serif;
  font-size: 12.5px;
  user-select: none;
}

.sim-toolbar-inner {
  max-width: 1340px;
  height: 100%;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

.sim-toolbar-inner::-webkit-scrollbar {
  display: none;
}

.sim-toolbar-left,
.sim-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.fwd-tb-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-right: 10px;
  margin-right: 4px;
  border-right: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
}

.fwd-tb-logo-pill {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

.fwd-tb-logo-pill img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.fwd-tb-brand-name {
  font-weight: 800;
  font-size: 12.5px;
  letter-spacing: 0.4px;
  color: #ffffff;
  display: flex;
  align-items: baseline;
  gap: 5px;
  white-space: nowrap;
}

.fwd-tb-brand-name small {
  font-size: 11px;
  font-weight: 600;
  color: #7dd3fc;
}

.sim-tb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 700;
  font-family: "Plus Jakarta Sans", "Noto Sans TC", sans-serif;
  cursor: pointer;
  transition: all 0.18s ease;
}

.sim-tb-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

.sim-tb-btn.active {
  background: #1e91d2;
  border-color: #7dd3fc;
  color: #fff;
  box-shadow: 0 0 0 2px rgba(125, 211, 252, 0.35);
}

.sim-tb-btn-accent {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-color: #34d399;
  color: #fff;
  font-weight: 700;
}

.sim-tb-btn-accent:hover {
  filter: brightness(1.06);
}

.sim-tb-status {
  color: #e0f2fe;
  margin-left: 6px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 420px;
}

/* =========================================================================
   SCREEN 1: FORWARD CHINESE TOCFL PORTAL (#screenPortal)
   ========================================================================= */
.sctopj-portal-wrap {
  min-height: calc(100vh - 44px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  font-family: "Plus Jakarta Sans", "Noto Sans TC", sans-serif;
  padding: 22px 20px 26px 20px;
  max-width: 1340px;
  margin: 0 auto;
}

.fwd-portal-hero {
  position: relative;
  width: 100%;
  background: linear-gradient(125deg, #023f6a 0%, #08558d 65%, #1e91d2 100%);
  border-radius: 18px;
  padding: 22px 28px;
  margin-bottom: 22px;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  overflow: hidden;
  box-shadow: 0 10px 28px -8px rgba(2, 63, 106, 0.24);
}

.fwd-portal-hero-left {
  flex: 1;
  z-index: 1;
}

.fwd-portal-brand-row {
  display: flex;
  align-items: center;
  gap: 18px;
}

.fwd-portal-logo-box {
  background: #ffffff;
  padding: 10px 16px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.14);
}

.fwd-portal-logo-box img {
  height: 46px;
  width: auto;
  display: block;
}

.fwd-portal-brand-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.fwd-portal-eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #fde68a;
  text-transform: uppercase;
}

.sctopj-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  letter-spacing: 0.4px;
}

.sctopj-subtitle {
  margin: 2px 0 0 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: #e0f2fe;
  max-width: 760px;
}

.fwd-portal-hero-right {
  flex-shrink: 0;
  z-index: 1;
}

.fwd-mascot-img {
  height: 104px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.25));
}

.sctopj-page-content {
  display: grid;
  grid-gap: 20px;
  width: 100%;
  margin: 0 auto;
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1100px) {
  .sctopj-page-content {
    grid-template-columns: repeat(2, 1fr);
  }
  .fwd-portal-hero {
    flex-direction: column;
    text-align: center;
    padding: 20px 22px;
    gap: 16px;
  }
  .fwd-portal-brand-row {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
  }
  .fwd-portal-highlights {
    justify-content: center;
  }
  .sctopj-subtitle {
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 640px) {
  .sctopj-portal-wrap {
    padding: 14px 12px 22px 12px;
  }
  .sctopj-page-content {
    grid-template-columns: 1fr;
    grid-gap: 14px;
  }
  .fwd-portal-hero {
    padding: 18px 16px;
    border-radius: 16px;
    margin-bottom: 16px;
    gap: 12px;
  }
  .fwd-portal-logo-box {
    padding: 8px 14px;
  }
  .fwd-portal-logo-box img {
    height: 38px;
  }
  .sctopj-title {
    font-size: 1.32rem;
    line-height: 1.3;
  }
  .sctopj-subtitle {
    font-size: 0.86rem;
  }
  .fwd-mascot-img {
    height: 76px;
  }
}

.sctopj-card.fwd-band-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 0;
  width: 100%;
  min-height: 350px;
  height: auto;
  text-align: left;
  color: #0f172a;
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 16px -4px rgba(2, 63, 106, 0.06);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.sctopj-card.fwd-band-card::after {
  display: none;
}

.sctopj-card.fwd-band-card:hover {
  transform: translateY(-4px);
  border-color: #cbd5e1;
  box-shadow: 0 14px 28px -8px rgba(2, 63, 106, 0.14);
}

.band-card-a { border-top: 4px solid #10b981 !important; }
.band-card-b { border-top: 4px solid #0284c7 !important; }
.band-card-c { border-top: 4px solid #023f6a !important; }
.band-card-cat { border-top: 4px solid #f59e0b !important; }

.fwd-band-card-head {
  width: 100%;
  padding: 14px 20px 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid #f1f5f9;
}

.fwd-card-level-tag {
  position: static;
  display: inline-block;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.band-card-a .fwd-card-level-tag { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.band-card-b .fwd-card-level-tag { background: #f0f9ff; color: #0369a1; border: 1px solid #bae6fd; }
.band-card-c .fwd-card-level-tag { background: #eff6ff; color: #1e3a8a; border: 1px solid #bfdbfe; }
.band-card-cat .fwd-card-level-tag { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }

.fwd-card-cn-pill {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
}

.sctopj-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  flex: 1;
  width: 100%;
  padding: 14px 20px 20px 20px;
  z-index: 1;
}

.fwd-card-sub {
  font-size: 11.5px;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 2px;
}

.sctopj-card-title {
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.25;
  margin: 0 0 12px 0;
  color: #023f6a;
  text-shadow: none;
}

.fwd-card-features {
  list-style: none;
  padding: 0;
  margin: 0 0 16px 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  border-top: 1px solid #f1f5f9;
}

.fwd-card-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  line-height: 1.4;
  color: #475569;
  padding: 9px 0;
  border-bottom: 1px solid #f1f5f9;
}

.fwd-card-features li i {
  width: 16px;
  text-align: center;
  color: #1e91d2;
  font-size: 13px;
  flex-shrink: 0;
}

.band-card-a .fwd-card-features li i { color: #10b981; }
.band-card-cat .fwd-card-features li i { color: #f59e0b; }

.fwd-card-features li strong {
  color: #0f172a;
  font-weight: 700;
}

.sctopj-btn {
  width: 100%;
  cursor: pointer;
  padding: 11px 16px;
  font-size: 0.88rem;
  font-weight: 800;
  font-family: "Plus Jakarta Sans", "Noto Sans TC", sans-serif;
  color: #ffffff;
  background: #023f6a;
  border: none;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.18s ease;
  margin-top: auto;
}

.band-card-a .sctopj-btn {
  background: #059669;
}

.band-card-b .sctopj-btn {
  background: #0284c7;
}

.sctopj-btn-cat {
  background: #d97706;
}

.sctopj-card:hover .sctopj-btn {
  filter: brightness(1.08);
}

/* =========================================================================
   SEO, AEO & GEO INFORMATION HUB STYLES (Information Matrix & FAQ)
   ========================================================================= */
.fwd-seo-hub {
  width: 100%;
  margin-top: 40px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.fwd-seo-hub-header {
  text-align: center;
  max-width: 880px;
  margin: 0 auto;
  padding: 0 12px;
}

.fwd-seo-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(2, 63, 106, 0.08);
  color: var(--forward-navy);
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 4px 14px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.fwd-seo-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--forward-navy-dark);
  margin: 0 0 10px 0;
  line-height: 1.35;
}

.fwd-seo-desc {
  font-size: 14.5px;
  line-height: 1.65;
  color: #475569;
  margin: 0;
}

.fwd-seo-desc strong {
  color: var(--forward-navy);
}

.fwd-seo-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 4px 20px -4px rgba(2, 63, 106, 0.06);
}

.fwd-seo-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f1f5f9;
}

.fwd-seo-subtitle {
  font-size: 17px;
  font-weight: 800;
  color: var(--forward-navy-dark);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.fwd-seo-subtitle i {
  color: var(--forward-blue);
}

.fwd-seo-tag {
  font-size: 11.5px;
  font-weight: 700;
  color: #0369a1;
  background: #e0f2fe;
  padding: 3px 10px;
  border-radius: 6px;
}

.fwd-seo-table-responsive {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}

.fwd-seo-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  text-align: left;
}

.fwd-seo-table th {
  background: #f8fafc;
  color: var(--forward-navy-dark);
  font-weight: 800;
  padding: 12px 14px;
  border-bottom: 2px solid #e2e8f0;
  white-space: nowrap;
}

.fwd-seo-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  vertical-align: middle;
}

.fwd-seo-table tr:last-child td {
  border-bottom: none;
}

.fwd-seo-td-highlight {
  background: #f8fafc;
  font-weight: 700;
  color: var(--forward-navy);
}

.fwd-seo-cat-row {
  background: #fffbeb;
}

.fwd-seo-cat-row td {
  border-top: 1.5px solid #fde68a;
}

/* 4 Key Advantages Grid */
.fwd-seo-features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.fwd-seo-feature-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  box-shadow: 0 4px 14px -4px rgba(2, 63, 106, 0.05);
}

.fwd-seo-feature-card:hover {
  transform: translateY(-2px);
  border-color: #93c5fd;
  box-shadow: 0 8px 24px -6px rgba(2, 63, 106, 0.12);
}

.fwd-seo-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #e0f2fe 0%, #ebf6fd 100%);
  color: var(--forward-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.fwd-seo-feature-card h4 {
  font-size: 15px;
  font-weight: 800;
  color: var(--forward-navy-dark);
  margin: 0;
}

.fwd-seo-feature-card p {
  font-size: 13px;
  line-height: 1.55;
  color: #64748b;
  margin: 0;
}

/* FAQ Accordion */
.fwd-faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fwd-faq-item {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  overflow: hidden;
  transition: all 0.2s ease;
}

.fwd-faq-item[open] {
  background: #ffffff;
  border-color: #93c5fd;
  box-shadow: 0 4px 16px -4px rgba(30, 145, 210, 0.12);
}

.fwd-faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--forward-navy-dark);
  cursor: pointer;
  user-select: none;
  list-style: none;
}

.fwd-faq-question::-webkit-details-marker {
  display: none;
}

.fwd-faq-chevron {
  color: #94a3b8;
  font-size: 12px;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.fwd-faq-item[open] .fwd-faq-chevron {
  transform: rotate(180deg);
  color: var(--forward-blue);
}

.fwd-faq-answer {
  padding: 0 18px 16px 18px;
  font-size: 13.5px;
  line-height: 1.65;
  color: #475569;
}

.fwd-faq-answer p {
  margin: 0;
}

.fwd-faq-answer strong {
  color: var(--forward-navy);
}

@media (max-width: 1024px) {
  .fwd-seo-features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .fwd-seo-hub {
    margin-top: 28px;
    gap: 18px;
  }
  .fwd-seo-title {
    font-size: 19px;
  }
  .fwd-seo-card {
    padding: 16px;
    border-radius: 14px;
  }
  .fwd-seo-features-grid {
    grid-template-columns: 1fr;
  }
  .fwd-seo-table th,
  .fwd-seo-table td {
    padding: 9px 10px;
    font-size: 12px;
  }
  .fwd-faq-question {
    padding: 12px 14px;
    font-size: 13.5px;
  }
  .fwd-faq-answer {
    padding: 0 14px 14px 14px;
    font-size: 12.5px;
  }
}

.fwd-portal-footer {
  width: 100%;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid #e2e8f0;
  text-align: center;
  color: #64748b;
  font-size: 12.5px;
}

.fwd-portal-footer-inner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.fwd-footer-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.fwd-portal-footer-ref {
  margin-top: 6px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.5;
  word-break: break-word;
}

.fwd-footer-ref-link {
  color: #0284c7;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px dashed rgba(2, 132, 199, 0.45);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.fwd-footer-ref-link:hover {
  color: #023f6a;
  border-bottom-color: #023f6a;
  border-bottom-style: solid;
}

/* =========================================================================
   SCREEN 2: OFFICIAL SET SELECTION (#screenSets)
   ========================================================================= */
.sctopj-sets-body {
  font-family: "Plus Jakarta Sans", "Noto Sans TC", sans-serif;
  max-width: 1160px;
  margin: 0 auto;
  padding: 24px 20px 44px 20px;
}

.sctopj-sets-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  background: #ffffff;
  padding: 16px 22px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 14px -4px rgba(2, 63, 106, 0.06);
}

.fwd-sets-title-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.fwd-sets-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.fwd-sets-eyebrow {
  font-size: 11px;
  font-weight: 800;
  color: #64748b;
  letter-spacing: 0.6px;
}

.sctopj-sets-header h1 {
  margin: 2px 0 0 0;
  font-size: 21px;
  font-weight: 800;
  color: var(--forward-navy);
}

.sctopj-back-link {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  color: #334155;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
}

.sctopj-back-link:hover {
  background: #f1f5f9;
  color: var(--forward-navy);
}

.sctopj-sets-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 900px) {
  .sctopj-sets-container {
    grid-template-columns: 1fr;
  }
}

.sctopj-product.fwd-set-card {
  background-color: #ffffff;
  padding: 22px 22px;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  border-top: 4px solid #023f6a;
  box-shadow: 0 4px 16px -4px rgba(2, 63, 106, 0.06);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.sctopj-product.fwd-set-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px -8px rgba(2, 63, 106, 0.14);
}

.fwd-set-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.fwd-set-num-badge {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #f1f5f9;
  color: #023f6a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
}

.fwd-set-badge {
  position: static;
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}

.sctopj-product h2 {
  font-size: 19px;
  font-weight: 800;
  margin: 0 0 3px 0;
  color: var(--forward-navy);
}

.fwd-set-vn-title {
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 14px;
}

.fwd-set-meta-list {
  list-style: none;
  padding: 0;
  margin: 0 0 18px 0;
  display: flex;
  flex-direction: column;
  border-top: 1px solid #f1f5f9;
}

.fwd-set-meta-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #475569;
  padding: 9px 0;
  border-bottom: 1px solid #f1f5f9;
}

.fwd-set-meta-list li i {
  width: 16px;
  text-align: center;
  color: #1e91d2;
  font-size: 13px;
}

.fwd-set-meta-list li strong {
  color: #0f172a;
}

.sctopj-set-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #023f6a;
  color: #fff;
  padding: 11px 18px;
  border-radius: 10px;
  border: none;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.18s;
  margin-top: auto;
}

.sctopj-set-btn:hover {
  background: #08558d;
}

/* =========================================================================
   SCREEN 3: CANDIDATE LANGUAGE & SCRIPT SELECTION (#screenChangeOrder)
   ========================================================================= */
.co-page-bg {
  padding: 20px 16px 40px 16px;
  font-family: "Plus Jakarta Sans", "Noto Sans TC", sans-serif;
  max-width: 1120px;
  margin: 0 auto;
}

.fwd-co-card {
  background: #ffffff;
  border-radius: 22px;
  border: 1px solid var(--forward-border);
  box-shadow: 0 18px 40px -12px rgba(2, 63, 106, 0.14);
  overflow: hidden;
}

.fwd-co-banner {
  background: linear-gradient(125deg, #023f6a 0%, #08558d 65%, #1e91d2 100%);
  padding: 16px 26px;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.fwd-co-banner-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.fwd-co-logo-pill {
  background: #ffffff;
  padding: 5px 10px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.fwd-co-logo-pill img {
  height: 28px;
  width: auto;
  display: block;
}

.fwd-co-banner-sub {
  font-size: 10.5px;
  font-weight: 800;
  color: #fde68a;
  letter-spacing: 0.7px;
}

.fwd-co-banner-title {
  font-size: 17px;
  font-weight: 800;
  color: #ffffff;
  margin-top: 2px;
}

.fwd-co-mascot {
  height: 52px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.25));
}

.fwd-co-body {
  padding: 20px 24px 26px 24px;
}

.co-message-box {
  margin-bottom: 10px;
}

.co-message-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.co-heading-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--forward-navy);
}

.co-back-btn {
  background: var(--forward-blue-soft);
  color: var(--forward-navy);
  border: 1px solid #bae6fd;
  border-radius: 10px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.co-back-btn:hover {
  background: #e0f2fe;
}

.co-notice-bar {
  text-align: center;
  background: linear-gradient(90deg, #ebf6fd 0%, #f0fdf4 100%);
  border: 1px solid #bae6fd;
  color: var(--forward-navy);
  border-radius: 12px;
  margin-bottom: 16px;
  padding: 8px 16px;
  font-size: 13.5px;
  font-weight: 700;
}

.co-table-wrap {
  border: none;
  border-radius: 0;
  overflow: visible;
}

.table1 {
  width: 100%;
  background-color: transparent;
  border-collapse: collapse;
}

.table1 td {
  border: none;
  padding: 0;
}

.fwd-setup-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  text-align: left;
}

.fwd-setup-step {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px 18px;
}

.fwd-setup-step-label {
  font-size: 13px;
  font-weight: 800;
  color: #023f6a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.fwd-script-toggle-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.fwd-script-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 14px;
  border: 2px solid #cbd5e1;
  background: #ffffff;
  cursor: pointer;
  text-align: left;
  transition: all 0.18s ease;
}

.fwd-script-card:hover {
  border-color: #1e91d2;
  background: #f0f9ff;
}

.fwd-script-card.active {
  border-color: #023f6a;
  background: #ebf6fd;
  box-shadow: 0 4px 14px rgba(2, 63, 106, 0.10);
}

.fwd-script-radio {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #94a3b8;
  background: #ffffff;
  position: relative;
  flex-shrink: 0;
}

.fwd-script-card.active .fwd-script-radio {
  border-color: #023f6a;
  background: #023f6a;
}

.fwd-script-card.active .fwd-script-radio::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffffff;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.fwd-script-main {
  font-size: 17px;
  font-weight: 800;
  color: #023f6a;
}

.fwd-script-sub {
  font-size: 12.5px;
  font-weight: 600;
  color: #475569;
  margin-top: 2px;
}

.fwd-lang-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

@media (max-width: 900px) {
  .fwd-lang-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .fwd-script-toggle-grid,
  .fwd-lang-cards-grid {
    grid-template-columns: 1fr;
  }
}

.fwd-lang-card {
  background: #ffffff;
  border: 1.5px solid #dbe7f3;
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  transition: all 0.18s ease;
}

.fwd-lang-card:hover {
  border-color: #1e91d2;
  box-shadow: 0 8px 20px -6px rgba(2, 63, 106, 0.12);
  transform: translateY(-2px);
}

.fwd-lang-card-featured {
  border: 2px solid #0284c7;
  background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 100%);
}

.fwd-lang-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.fwd-lang-name {
  font-size: 15px;
  font-weight: 800;
  color: #023f6a;
  display: flex;
  align-items: center;
  gap: 7px;
}

.fwd-lang-code-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e2e8f0;
  color: #0f172a;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 5px;
  letter-spacing: 0.4px;
}

.fwd-lang-sub {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  margin-top: 4px;
}

.fwd-lang-rec-badge {
  background: #10b981;
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.fwd-lang-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.co-enter-btn {
  flex: 1;
  min-width: 0;
  height: 36px;
  padding: 0 10px;
  font-size: 12.5px;
  font-weight: 800;
  font-family: "Plus Jakarta Sans", "Noto Sans TC", sans-serif;
  background: #023f6a;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s;
}

.co-enter-btn:hover {
  background: #08558d;
}

.co-enter-btn-read {
  height: 36px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
  font-family: "Plus Jakarta Sans", "Noto Sans TC", sans-serif;
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #86efac;
  border-radius: 8px;
  cursor: pointer;
  margin-left: 0;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all 0.15s;
}

.co-enter-btn-read:hover {
  background: #dcfce7;
}

/* =========================================================================
   SCREEN 4: FORWARD ADMIT CARD & LOGIN CONFIRMATION (#screenLoginChk)
   ========================================================================= */
.login-chk-bg {
  position: relative;
  width: 100%;
  min-height: calc(100vh - 44px);
  padding: 24px 16px;
  background: radial-gradient(circle at 30% 20%, #08558d 0%, #023f6a 55%, #012844 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-chk-overlay {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

.login-chk-dialog.fwd-admit-dialog {
  position: relative;
  z-index: 10;
  width: min(640px, 100%) !important;
  max-width: 100% !important;
  background: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  border-radius: 24px !important;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.48) !important;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 0 !important;
}

.fwd-admit-header {
  background: linear-gradient(135deg, #023f6a 0%, #08558d 65%, #1e91d2 100%);
  padding: 20px 24px 16px 24px;
  text-align: center;
  color: #ffffff;
}

.fwd-admit-logo-capsule {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  padding: 8px 18px;
  border-radius: 14px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  margin-bottom: 10px;
}

.fwd-admit-logo-capsule img {
  height: 36px;
  width: auto;
  display: block;
}

.fwd-admit-badge {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #fde68a;
  margin-bottom: 4px;
}

.fwd-admit-title {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
}

.login-chk-dialog #checkDialog.fwd-admit-body {
  padding: 20px 24px !important;
  flex: 1;
  font-size: 13.5px;
  font-family: "Plus Jakarta Sans", "Noto Sans TC", sans-serif;
  color: #0f172a;
  background: #ffffff;
}

.fwd-admit-info-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 5px solid #023f6a;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 14px;
}

.fwd-admit-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px dashed #e2e8f0;
}

.fwd-admit-row:last-child {
  border-bottom: none;
}

.fwd-admit-lbl {
  font-size: 12.5px;
  font-weight: 700;
  color: #475569;
  white-space: nowrap;
  flex-shrink: 0;
}

.fwd-admit-val {
  font-size: 13.5px;
  font-weight: 600;
  color: #0f172a;
  text-align: right;
  min-width: 0;
  word-break: break-word;
}

.fwd-admit-val strong {
  color: #023f6a;
  font-weight: 800;
}

.fwd-admit-val code {
  background: #ebf6fd;
  color: #023f6a;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 700;
}

.admit-token-code {
  word-break: break-all;
}

.fwd-admit-token-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-admit-copy-24h {
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 700;
  border-radius: 6px;
  border: 1px solid #bae6fd;
  background: #f0f9ff;
  color: #0369a1;
  cursor: pointer;
  white-space: nowrap;
}

.admit-script-pick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.admit-script-pick-btn {
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  font-family: inherit;
  transition: all 0.15s;
}

.fwd-admit-custom-name {
  background: #ebf6fd;
  border: 1px solid #bae6fd;
  border-radius: 12px;
  padding: 12px 16px;
}

.fwd-admit-custom-name label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: #023f6a;
  margin-bottom: 6px;
  font-family: "Plus Jakarta Sans", sans-serif;
}

.fwd-admit-custom-name input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #7dd3fc;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  background: #ffffff;
  outline: none;
}

.fwd-admit-custom-name input:focus {
  border-color: #023f6a;
  box-shadow: 0 0 0 3px rgba(30, 145, 210, 0.2);
}

.cfont2 {
  font-size: 14pt;
  font-family: "DFKai-SB", "標楷體", "KaiTi", "Noto Sans TC", serif;
}

body.script-simplified .cfont2 {
  font-family: "SimSun", "宋体", serif;
}

.login-chk-dialog .ui-dialog-buttonpane.fwd-admit-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 24px !important;
  background: #f8fafc !important;
  border-top: 1px solid #e2e8f0 !important;
  flex-wrap: wrap;
}

.fwd-btn-admit-no {
  min-height: 44px;
  padding: 8px 18px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  border-radius: 12px !important;
  border: 1px solid #cbd5e1 !important;
  background: #ffffff !important;
  color: #475569 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
}

.fwd-btn-admit-yes {
  flex: 1;
  min-width: 220px;
  min-height: 44px;
  padding: 8px 20px !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  border-radius: 12px !important;
  border: none !important;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.32) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
}

/* =========================================================================
   SCREEN 5, 6, 7: FORWARD × SC-TOP EXAM WORKSTATION & SCORE REPORT
   ========================================================================= */
.official-exam-container {
  width: min(994px, calc(100% - 24px));
  min-height: min(710px, calc(100vh - 64px));
  border: 1px solid #cbd5e1;
  border-radius: 20px;
  background-color: #FFFFFF;
  background-image: none;
  margin: 10px auto 20px auto;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-bottom: 0;
  box-shadow: 0 18px 42px -10px rgba(2, 63, 106, 0.16);
}

/* Forward Oceanic Workstation Top Banner (#header, #scoreHeader, #finishHeader) */
.fwd-exam-top-banner {
  width: 100%;
  min-height: 62px;
  background: linear-gradient(90deg, #023f6a 0%, #08558d 60%, #1e91d2 100%);
  padding: 10px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: #ffffff;
  border-bottom: 2px solid #0284c7;
  border-radius: 19px 19px 0 0;
}

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

.fwd-exam-logo-capsule {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #ffffff;
  padding: 6px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  flex-shrink: 0;
}

.fwd-exam-logo-capsule img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.fwd-exam-brand-txt {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.15;
}

.fwd-exam-brand-main {
  font-size: 12px;
  font-weight: 800;
  color: #023f6a;
  letter-spacing: 0.4px;
}

.fwd-exam-brand-sub {
  font-size: 10px;
  font-weight: 700;
  color: #1e91d2;
}

.fwd-exam-title-group {
  text-align: left;
  min-width: 0;
}

.fwd-exam-title-zh {
  font-size: 16.5px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.3px;
  line-height: 1.25;
}

.fwd-exam-title-zh small {
  font-size: 11px;
  font-weight: 700;
  color: #bae6fd;
  margin-left: 6px;
}

.fwd-exam-subtitle-pill {
  display: inline-block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 700;
  color: #fde68a;
  background: rgba(255, 255, 255, 0.14);
  padding: 2px 10px;
  border-radius: 999px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fwd-exam-banner-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.fwd-exam-candidate-pill {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.30);
  color: #ffffff;
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

/* Top-Right Deliberate Submit / End Section Button (#tdFinish) */
.hdr-exam-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 5px 14px;
  border-radius: 999px;
  background: #fff1f2;
  border: 1.5px solid #fda4af;
  color: #be123c;
  font-family: "Plus Jakarta Sans", "Noto Sans TC", sans-serif;
  font-size: 12.5px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
  transition: all 0.16s ease;
  flex-shrink: 0;
}

.hdr-exam-submit-btn:hover {
  background: #ffe4e6;
  border-color: #fb7185;
  color: #9f1239;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(190, 18, 60, 0.25);
}

.hdr-exam-submit-btn i {
  font-size: 12px;
}

.hdr-submit-txt {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}

.hdr-submit-txt small {
  font-size: 10.5px;
  font-weight: 700;
  opacity: 0.85;
}

.hdr-exam-submit-btn.review-mode-btn {
  background: #f0f9ff;
  border-color: #7dd3fc;
  color: #0369a1;
}

.hdr-exam-submit-btn.review-mode-btn:hover {
  background: #e0f2fe;
  border-color: #38bdf8;
  color: #023f6a;
}

#AllObjectContainer,
#scoreObjectContainer {
  flex: 1;
  width: 100%;
  padding: 8px 0 12px 0;
}

.exam-stage-inner {
  width: 100%;
  max-width: 928px;
  margin: 0 auto;
  padding: 0 14px;
}

.exam-center-table {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  table-layout: fixed;
}

.efont {
  font-size: 13.5pt;
  font-family: "Plus Jakarta Sans", "Times New Roman", sans-serif;
}

.cfont {
  font-size: 14.5pt;
  font-family: "DFKai-SB", "標楷體", "KaiTi", "Noto Serif TC", serif;
}

body.script-simplified .cfont {
  font-family: "SimSun", "宋体", "Noto Serif SC", serif;
}

.Efont {
  font-size: 12pt;
  font-family: "Plus Jakarta Sans", sans-serif;
}

.Cfont {
  font-size: 12pt;
  font-family: "DFKai-SB", "標楷體", "KaiTi", serif;
}

body.script-simplified .Cfont {
  font-family: "SimSun", "宋体", serif;
}

.style1 {
  color: #334155;
  font-weight: 700;
  font-size: 10.5pt;
  font-family: "Plus Jakarta Sans", "Noto Sans TC", sans-serif;
}

/* Media Header & Volume Slider */
.exam-media-head {
  width: 100%;
  max-width: 900px;
  margin: 2px auto 4px auto;
}

.td-audio-status {
  padding-left: 10px;
}

.fwd-vol-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  font-size: 13.5px;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s;
}

.fwd-vol-btn:hover {
  background: #ebf6fd;
  border-color: #1e91d2;
}

.audio-stage-pill {
  display: inline-block;
  font-size: 10pt;
  font-weight: 700;
  font-family: "Plus Jakarta Sans", "Noto Sans TC", sans-serif;
  color: #023f6a;
  background: #ebf6fd;
  border: 1px solid #bae6fd;
  border-radius: 999px;
  padding: 3px 12px;
}

.audio-stage-pill:empty {
  display: none;
}

.test-count-badge {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 11.5pt;
  font-weight: 800;
  color: #023f6a;
  background: #ebf6fd;
  border: 1px solid #bae6fd;
  border-radius: 999px;
  padding: 3px 13px;
  display: inline-block;
  white-space: nowrap;
}

.test-count-badge:empty {
  display: none;
}

#MediaVolumeBar {
  float: left;
  clear: left;
  width: 108px;
  height: 8px;
  margin: 8px 6px;
  position: relative;
  cursor: pointer;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #e2e8f0;
}

#MediaVolumeBar .ui-slider-range {
  background: linear-gradient(90deg, #1e91d2 0%, #023f6a 100%);
  height: 100%;
  border-radius: 999px;
  position: absolute;
  top: 0;
  left: 0;
}

#MediaVolumeBar .ui-slider-handle {
  border: 2px solid #023f6a;
  background: #ffffff;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  position: absolute;
  top: -4px;
  margin-left: -7px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

/* Duration Progress Bar (#MediaDurationBar — strictly read-only, non-seekable) */
#MediaDurationBar,
.exam-duration-bar {
  width: 100%;
  max-width: 900px;
  height: 8px;
  border: none;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
  margin: 2px auto 6px auto;
  pointer-events: none;
  user-select: none;
}

#MediaDurationFill {
  background: linear-gradient(90deg, #023f6a 0%, #1e91d2 100%);
  transition: width 0.12s linear;
}

/* Reading 50-question Navigation Grid (table.item) */
.read-item-scroll {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

table.item {
  width: 100%;
  table-layout: fixed;
  border: 1px solid #cbd5e1;
  border-collapse: collapse;
  font-size: 9.5pt;
  font-weight: 700;
  font-family: "Plus Jakarta Sans", sans-serif;
  margin-top: 2px;
  margin-bottom: 6px;
  border-radius: 8px;
  overflow: hidden;
}

table.item td {
  border: 1px solid #cbd5e1;
  text-align: center;
  height: 25px;
  line-height: 25px;
  cursor: pointer;
  user-select: none;
  padding: 0 1px;
  color: #1e293b;
  transition: all 0.1s;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

table.item td.read-empty-slot {
  background: #f8fafc !important;
  cursor: default !important;
  pointer-events: none;
}

table.item td:hover {
  outline: 2px solid #1e91d2;
  z-index: 2;
}

table.item td.current-cell {
  font-weight: 800;
  box-shadow: inset 0 0 0 2.5px #023f6a;
}

.read-legend-bar {
  width: 100%;
  max-width: 900px;
  margin: 0 auto 6px auto;
  padding: 4px 2px 6px 2px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.read-legend-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.read-legend-right {
  display: flex;
  align-items: center;
  margin-left: auto;
}

.legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-sq {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 1px solid #94a3b8;
  border-radius: 3px;
}

.exam-meta-subtitle {
  font-size: 10.5pt;
  color: #023f6a;
  font-weight: 700;
}

.timer-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
  border-radius: 999px;
  padding: 4px 14px;
  font-weight: 800;
  font-size: 13.5px;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.timer-pill #TimeCountDown {
  color: #ffffff !important;
  font-weight: 800;
}

.timer-pill.timer-urgent {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 2px 10px rgba(220, 38, 38, 0.38);
}

.fwd-timer-icon {
  font-size: 13px;
}

/* Question Number Header (#TestNumber) */
.test-number-bar {
  width: 100%;
  max-width: 900px;
  margin: 4px auto 6px auto;
  padding: 6px 14px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-left: 5px solid #023f6a;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}

/* Stem Iframe & Expand/Collapse Pull Bar */
.stem-frame-wrapper {
  width: 100%;
  max-width: 900px;
  margin: 2px auto 8px auto;
  border: 1.5px solid #dbe7f3;
  border-radius: 14px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(2, 63, 106, 0.04);
}

.stem-iframe-el {
  display: block;
  width: 100%;
  background: #ffffff;
  border: none;
}

.pull-toggle-bar {
  position: relative;
  width: 100%;
  min-height: 28px;
  padding: 3px 10px;
  cursor: pointer;
  border-top: 1px solid #dbe7f3;
  background: #f0f9ff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.pull-toggle-bar:hover {
  background: #e0f2fe;
}

.pull-hint-overlay {
  position: static;
  font-size: 9.5pt;
  font-family: "Plus Jakarta Sans", "Noto Sans TC", sans-serif;
  color: #023f6a;
  font-weight: 700;
  pointer-events: none;
  text-align: center;
}

/* Question Prompt Box (#questionIframe2) */
.question-prompt-card {
  width: 100%;
  max-width: 900px;
  margin: 4px auto 10px auto;
  padding: 11px 16px;
  background: #f8fafc;
  border: 1.5px solid #dbe7f3;
  border-left: 5px solid #023f6a;
  border-radius: 12px;
  font-size: 15pt;
  line-height: 1.45;
  color: #0f172a;
  word-wrap: break-word;
}

/* Answer Options Area (#Answer) */
#Answer {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.ans-single-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.ans-option-row {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  border: 1.5px solid #dbe7f3;
  border-radius: 12px;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 14.5pt;
  line-height: 1.42;
}

.ans-option-row:hover {
  background: #f0f9ff;
  border-color: #1e91d2;
}

.ans-option-row.selected {
  background: #ebf6fd;
  border-color: #023f6a;
  box-shadow: 0 0 0 1px #023f6a;
}

.ans-option-row.opt-row-correct {
  background: #dcfce7 !important;
  border-color: #16a34a !important;
}

.ans-option-row.opt-row-wrong {
  background: #fee2e2 !important;
  border-color: #dc2626 !important;
}

.ans-option-row input[type="radio"] {
  width: 18px;
  height: 18px;
  margin-right: 12px;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: #023f6a;
}

.ans-opt-key {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 13pt;
  font-weight: 800;
  margin-right: 10px;
  color: #023f6a;
  flex-shrink: 0;
}

/* Image Options Grid (option_type == "2") */
.ans-image-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 4px;
}

@media (max-width: 860px) {
  .ans-image-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.ans-image-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 10px;
  border: 2px solid #dbe7f3;
  border-radius: 14px;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.15s ease;
  min-width: 0;
}

.ans-image-card:hover {
  border-color: #1e91d2;
  background: #f8fafc;
}

.ans-image-card.selected {
  border-color: #023f6a;
  background: #ebf6fd;
  box-shadow: 0 4px 12px rgba(2, 63, 106, 0.14);
}

.ans-image-card.opt-row-correct {
  border-color: #16a34a !important;
  background: #dcfce7 !important;
}

.ans-image-card.opt-row-wrong {
  border-color: #dc2626 !important;
  background: #fee2e2 !important;
}

.ans-image-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font-weight: 800;
  color: #023f6a;
}

.ans-image-card img {
  max-width: 100%;
  max-height: 160px;
  object-fit: contain;
  border-radius: 6px;
}

/* Grouped Cloze Tables (選詞填空(一) & 選詞填空(二) / 完成段落) */
.cloze-matrix-scroll {
  width: 100%;
  max-width: 900px;
  margin: 4px auto 0 auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 12px;
}

.cloze-matrix-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
}

.cloze-matrix-table th {
  background: #ebf6fd;
  border: 1px solid #cbd5e1;
  padding: 8px 10px;
  font-size: 12.5pt;
  color: #023f6a;
}

.cloze-matrix-table td {
  border: 1px solid #cbd5e1;
  padding: 8px 10px;
  font-size: 13.5pt;
}

.cloze-blank-col,
.cloze-radio-cell {
  width: 78px;
  text-align: center;
}

.cloze-row-head {
  width: 92px;
  white-space: nowrap;
}

.cloze-subq-lbl {
  font-size: 9.5pt;
  color: #475569;
  font-weight: 600;
}

.cloze-cell-label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 32px;
  cursor: pointer;
}

.opt-click-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  width: 100%;
}

.cloze-matrix-table tr:nth-child(even) {
  background: #f8fafc;
}

.cloze-matrix-table input[type="radio"] {
  transform: scale(1.2);
  cursor: pointer;
  accent-color: #023f6a;
}

/* Practice / Review Feedback Strip */
.practice-feedback-bar {
  width: 100%;
  max-width: 900px;
  margin: 8px auto 0 auto;
  padding: 10px 16px;
  border: 1px solid #7dd3fc;
  border-left: 5px solid #023f6a;
  border-radius: 10px;
  background-color: #ebf6fd;
  font-size: 12pt;
  text-align: left;
  color: #0f172a;
}

/* Video Player Frame — Strictly 100% Pure White Background, No Black Borders, Non-Seekable */
.video-player-frame {
  position: relative;
  width: 100%;
  max-width: 900px;
  min-height: 440px;
  background: #ffffff !important;
  border: none !important;
  border-radius: 0 !important;
  overflow: hidden;
  margin: 2px auto;
  box-shadow: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

.exam-video-el {
  width: min(672px, 100%);
  aspect-ratio: 4 / 3;
  height: auto;
  max-height: min(504px, calc(100vh - 235px));
  display: block;
  margin: 0 auto;
  background: #ffffff !important;
  border: none !important;
  outline: none !important;
  pointer-events: none !important;
  object-fit: cover;
  clip-path: inset(6px 10px 10px 10px);
}

.video-play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  cursor: pointer;
  z-index: 10;
}

.video-play-overlay-btn {
  max-width: 100%;
  background: linear-gradient(135deg, #023f6a 0%, #1e91d2 100%);
  color: #ffffff;
  border: 2px solid #38bdf8;
  border-radius: 12px;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 700;
  font-family: "Plus Jakarta Sans", "Noto Sans TC", sans-serif;
  line-height: 1.45;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(2, 63, 106, 0.22);
}

/* Transition Card */
.transition-card {
  width: 100%;
  max-width: 580px;
  margin: 14px auto;
  border: 1px solid #bae6fd;
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(2, 63, 106, 0.12);
  overflow: hidden;
  background: #ffffff;
}

.transition-card-td {
  min-height: 360px;
  font-size: 22pt;
  text-align: left;
  vertical-align: middle;
  padding: 28px 32px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.transition-header-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.transition-mascot {
  height: 60px;
  width: auto;
}

.transition-pill {
  font-size: 11pt;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 800;
  color: #023f6a;
  background: #ebf6fd;
  padding: 4px 12px;
  border-radius: 8px;
  border: 1px solid #bae6fd;
}

.transition-zh-text {
  display: block;
  margin-bottom: 14px;
  line-height: 1.4;
}

.transition-en-text {
  font-size: 15pt;
  display: block;
  line-height: 1.45;
  color: #334155;
}

.official-Transition-btn {
  background: linear-gradient(135deg, #023f6a 0%, #1e91d2 100%);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 12px 26px;
  font-size: 14pt;
  font-weight: 700;
  font-family: "Plus Jakarta Sans", "DFKai-SB", "標楷體", serif;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(2, 63, 106, 0.3);
  transition: all 0.2s;
}

.official-Transition-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

/* Official Footer Controls (#Foot — Dedicated Question Navigation Bar) */
.official-exam-footer {
  position: sticky;
  bottom: 0;
  z-index: 35;
  width: 100%;
  padding: 10px 24px;
  border-top: 1px solid #dbe7f3;
  background: rgba(248, 250, 252, 0.97);
  backdrop-filter: blur(8px);
  border-radius: 0 0 19px 19px;
}

.fwd-exam-foot-bar {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.foot-btn-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
  flex: 1 1 auto;
}

.foot-btn-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

.foot-context-hint {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: "Plus Jakarta Sans", "Noto Sans TC", sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 6px 13px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.foot-context-hint i {
  color: #0284c7;
  font-size: 12.5px;
  flex-shrink: 0;
}

.foot-context-hint b {
  color: #023f6a;
  font-weight: 800;
}

.foot-context-hint .hint-mob {
  display: none;
}

.foot-vi-main .vi-mob {
  display: none;
}

.foot-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 11px;
  padding: 7px 15px;
  cursor: pointer;
  font-family: "Plus Jakarta Sans", "Noto Sans TC", sans-serif;
  font-size: 13.5px;
  font-weight: 800;
  color: #023f6a;
  white-space: nowrap;
  box-shadow: 0 2px 5px rgba(2, 63, 106, 0.05);
  transition: all 0.15s ease;
}

.foot-icon-btn:hover {
  background: #f0f9ff;
  border-color: #1e91d2;
  transform: translateY(-1px);
}

.fwd-foot-ico {
  font-size: 13px;
  line-height: 1;
}

.fwd-foot-txt {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
}

.fwd-foot-txt small {
  font-size: 11.5px;
  font-weight: 700;
  opacity: 0.85;
}

.foot-icon-btn.marked-active {
  background: #fef2f2;
  border-color: #ef4444;
  color: #b91c1c;
}

.foot-icon-btn-next {
  min-height: 44px;
  padding: 8px 22px;
  font-size: 14px;
  background: linear-gradient(135deg, #023f6a 0%, #0284c7 100%);
  border-color: #023f6a;
  color: #ffffff;
  box-shadow: 0 5px 14px rgba(2, 63, 106, 0.26);
}

.foot-icon-btn-next:hover {
  background: linear-gradient(135deg, #012844 0%, #023f6a 100%);
  border-color: #012844;
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(2, 63, 106, 0.34);
}

.foot-icon-btn-last-submit {
  min-height: 44px;
  padding: 8px 20px;
  font-size: 14px;
  background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
  border-color: #c2410c;
  color: #ffffff;
  box-shadow: 0 5px 14px rgba(234, 88, 12, 0.28);
}

.foot-icon-btn-last-submit:hover {
  background: linear-gradient(135deg, #c2410c 0%, #9a3412 100%);
  border-color: #9a3412;
  color: #ffffff;
}

.foot-icon-btn-last-submit.review-mode-btn {
  background: linear-gradient(135deg, #023f6a 0%, #0284c7 100%);
  border-color: #023f6a;
  box-shadow: 0 5px 14px rgba(2, 63, 106, 0.26);
}

.foot-icon-btn-shared-replay {
  background: #f0f9ff;
  border-color: #7dd3fc;
  color: #0369a1;
}

.foot-icon-btn-shared-replay:hover {
  background: #e0f2fe;
  border-color: #0284c7;
  color: #023f6a;
}

/* Shared Cluster Audio Lock Pill in #Foot (prevents accidentally skipping cluster dialogues) */
@keyframes pulseAudioWave {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.65;
    transform: scale(1.1);
  }
}

.foot-passage-lock-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 7px 16px;
  border-radius: 11px;
  background: #eff6ff;
  border: 1.5px solid #93c5fd;
  color: #1e40af;
  font-family: "Plus Jakarta Sans", "Noto Sans TC", sans-serif;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  user-select: none;
}

.foot-passage-lock-pill i {
  color: #0284c7;
  font-size: 14px;
  animation: pulseAudioWave 1.4s ease-in-out infinite;
}

/* Dedicated Shared Cluster Audio Stage Card (shown inside #Answer on non-question cluster intro steps) */
.cluster-listening-stage-card {
  width: 100%;
  max-width: 900px;
  margin: 10px auto 6px auto;
  padding: 20px 22px;
  border-radius: 16px;
  background: linear-gradient(135deg, #f0f9ff 0%, #f8fafc 100%);
  border: 1.5px solid #bae6fd;
  box-shadow: 0 6px 18px rgba(2, 63, 106, 0.06);
  display: flex;
  align-items: flex-start;
  gap: 16px;
  font-family: "Plus Jakarta Sans", "Noto Sans TC", sans-serif;
  text-align: left;
}

.cluster-stage-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #023f6a 0%, #0284c7 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.28);
}

.cluster-stage-icon-box i {
  animation: pulseAudioWave 1.5s ease-in-out infinite;
}

.cluster-stage-content {
  flex: 1;
  min-width: 0;
}

.cluster-stage-title {
  font-size: 15.5px;
  font-weight: 800;
  color: #023f6a;
  line-height: 1.38;
  margin-bottom: 5px;
}

.cluster-stage-desc-vi {
  font-size: 13.5px;
  font-weight: 600;
  color: #334155;
  line-height: 1.55;
  margin-bottom: 6px;
}

.cluster-stage-desc-zh {
  font-size: 13px;
  font-weight: 700;
  color: #0369a1;
  line-height: 1.45;
}

.cluster-autoplay-tap-btn {
  margin-top: 12px;
  padding: 9px 18px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: 100%;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(2, 132, 199, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.cluster-autoplay-tap-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow: 0 5px 14px rgba(2, 132, 199, 0.36);
}

/* Anti-Misclick Submit Confirmation Modal (#examSubmitConfirmModal) */
@keyframes examModalFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.exam-submit-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.exam-submit-modal-card {
  width: 100%;
  max-width: 560px;
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 24px 54px rgba(15, 23, 42, 0.32);
  overflow: hidden;
  animation: examModalFadeIn 0.18s ease-out;
  font-family: "Plus Jakarta Sans", "Noto Sans TC", sans-serif;
}

.exam-submit-modal-hdr {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  background: #fff7ed;
  border-bottom: 1px solid #fed7aa;
  text-align: left;
}

.exam-submit-modal-hdr.hdr-ready {
  background: #f0fdf4;
  border-bottom-color: #bbf7d0;
}

.exam-submit-modal-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #ffedd5;
  color: #ea580c;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.exam-submit-modal-hdr.hdr-ready .exam-submit-modal-icon {
  background: #dcfce7;
  color: #16a34a;
}

.exam-submit-modal-titles {
  min-width: 0;
}

.exam-submit-modal-title {
  margin: 0;
  font-size: 16.5px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.35;
}

.exam-submit-modal-subzh {
  margin: 3px 0 0 0;
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
}

.exam-submit-modal-body {
  padding: 18px 22px;
  text-align: left;
}

.exam-submit-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.submit-stat-tile {
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.submit-stat-tile.stat-answered {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.submit-stat-tile.stat-unanswered-warn {
  background: #fef2f2;
  border-color: #fecaca;
}

.submit-stat-tile.stat-marked {
  background: #fffbeb;
  border-color: #fde68a;
}

.submit-stat-lbl {
  font-size: 11.5px;
  font-weight: 700;
  color: #64748b;
}

.submit-stat-val {
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
}

.submit-stat-tile.stat-answered .submit-stat-val {
  color: #15803d;
}

.submit-stat-tile.stat-unanswered-warn .submit-stat-val {
  color: #dc2626;
}

.submit-stat-tile.stat-marked .submit-stat-val {
  color: #b45309;
}

.exam-submit-warning-box {
  padding: 12px 14px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-left: 4px solid #0284c7;
  font-size: 13px;
  line-height: 1.55;
  color: #334155;
}

.exam-submit-warning-box.warn-amber {
  background: #fffbeb;
  border-color: #fde68a;
  border-left-color: #f59e0b;
  color: #78350f;
}

.exam-submit-modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 22px 18px 22px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

.exam-modal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 12px;
  font-family: "Plus Jakarta Sans", "Noto Sans TC", sans-serif;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
  flex: 1 1 0;
}

.exam-modal-btn small {
  font-size: 11px;
  font-weight: 600;
  opacity: 0.88;
  white-space: nowrap;
}

.exam-modal-btn-safe {
  background: linear-gradient(135deg, #023f6a 0%, #0284c7 100%);
  border: 1.5px solid #023f6a;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(2, 63, 106, 0.24);
}

.exam-modal-btn-safe:hover,
.exam-modal-btn-safe:focus-visible {
  background: linear-gradient(135deg, #012844 0%, #023f6a 100%);
  outline: 3px solid #7dd3fc;
  outline-offset: 1px;
}

.exam-modal-btn-danger {
  background: #fff1f2;
  border: 1.5px solid #fb7185;
  color: #be123c;
}

.exam-modal-btn-danger:hover {
  background: #e11d48;
  border-color: #be123c;
  color: #ffffff;
}

.exam-modal-btn-danger.btn-ready-complete {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  border-color: #047857;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.24);
}

.exam-modal-btn-danger.btn-ready-complete:hover {
  filter: brightness(1.06);
}

/* Score Report & Finish Stage (.score) */
.score-stage-wrap {
  width: 100%;
  max-width: 888px;
  margin: 0 auto;
  padding: 18px 14px 26px 14px;
}

.score-24h-banner {
  width: 100%;
  max-width: 860px;
  margin: 0 auto 14px auto;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  text-align: left;
  line-height: 1.5;
  word-break: break-word;
}

.score-table-scroll {
  width: 100%;
  max-width: 860px;
  margin: 12px auto 0 auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.score {
  border: 1px solid #dbe7f3;
  background: #f8fafc;
  width: 100%;
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
  border-collapse: collapse;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(2, 63, 106, 0.06);
}

.score th,
.score td {
  border: 1px solid #e2e8f0;
  padding: 13px 16px;
}

.score-head-row {
  font-size: 115%;
  background: #f1f5f9;
}

.score-skill-row {
  font-size: 138%;
  background: #ffffff;
}

.score-overall-table {
  margin-top: 12px;
  background: #ffffff;
}

.score-overall-td {
  padding: 16px 20px !important;
}

.score-overall-font {
  font-size: 20pt;
  line-height: 1.4;
}

.score-actions-bar {
  margin-top: 22px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.score-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  font-size: 13.5px;
  font-weight: 800;
  font-family: "Plus Jakarta Sans", "Noto Sans TC", sans-serif;
  padding: 10px 20px;
  border-radius: 12px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: #023f6a;
  cursor: pointer;
  transition: all 0.15s;
}

.score-action-btn:hover {
  background: #ebf6fd;
  border-color: #1e91d2;
}

.score-action-primary {
  background: linear-gradient(135deg, #023f6a 0%, #1e91d2 100%);
  border-color: #023f6a;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(2, 63, 106, 0.25);
}

.score-action-primary:hover {
  filter: brightness(1.08);
}

.finish-card-table {
  max-width: 640px;
  margin-top: 8px;
}

.finish-text-td {
  text-align: left;
  padding: 18px 24px !important;
}

.finish-guide-img {
  max-width: 100%;
  height: auto;
  max-height: 190px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* =========================================================================
   RESPONSIVE MULTI-DEVICE BREAKPOINTS (LAPTOP, TABLET, MOBILE, SMALL PHONES)
   ========================================================================= */

/* 1. Laptop / Short-Height Viewports (e.g. 1366×768, 1280×720) */
@media (max-height: 820px) and (min-width: 769px) {
  .official-exam-container {
    min-height: calc(100vh - 58px);
    margin: 6px auto 12px auto;
  }
  .fwd-exam-top-banner {
    min-height: 52px;
    padding: 6px 20px;
  }
  .fwd-exam-logo-capsule {
    padding: 4px;
  }
  .fwd-exam-logo-capsule img {
    width: 26px;
    height: 26px;
  }
  .fwd-exam-title-zh {
    font-size: 15px;
  }
  #AllObjectContainer {
    padding: 4px 0 8px 0;
  }
  table.item td {
    height: 22px;
    line-height: 22px;
    font-size: 9pt;
  }
  .read-legend-bar {
    margin-bottom: 4px;
    padding: 2px 2px 4px 2px;
  }
  .test-number-bar {
    margin: 2px auto 5px auto;
    padding: 4px 12px;
  }
  .stem-frame-wrapper {
    margin: 2px auto 6px auto;
  }
  .pull-toggle-bar {
    min-height: 24px;
  }
  .question-prompt-card {
    margin: 3px auto 7px auto;
    padding: 8px 14px;
    font-size: 14pt;
  }
  .ans-single-list {
    gap: 6px;
  }
  .ans-option-row {
    padding: 7px 14px;
    font-size: 13.5pt;
  }
  .video-player-frame {
    min-height: 360px;
  }
  .exam-video-el {
    max-height: min(440px, calc(100vh - 210px));
  }
  .official-exam-footer {
    padding: 7px 20px;
  }
  .foot-icon-btn {
    min-height: 36px;
    padding: 5px 14px;
  }
  .foot-icon-btn-next,
  .foot-icon-btn-last-submit {
    min-height: 38px;
    padding: 6px 18px;
  }
  .hdr-exam-submit-btn {
    min-height: 32px;
    padding: 4px 12px;
    font-size: 12px;
  }
  .login-chk-bg {
    padding: 12px 16px;
  }
  .fwd-admit-header {
    padding: 14px 22px 12px 22px;
  }
  .fwd-admit-logo-capsule {
    margin-bottom: 6px;
    padding: 6px 14px;
  }
  .fwd-admit-logo-capsule img {
    height: 28px;
  }
  .login-chk-dialog #checkDialog.fwd-admit-body {
    padding: 14px 22px !important;
  }
  .fwd-admit-info-grid {
    padding: 10px 14px;
    gap: 4px;
    margin-bottom: 10px;
  }
  .fwd-admit-row {
    padding: 4px 0;
  }
}

/* 2. Tablet & Narrow Laptops (<= 1024px) */
@media (max-width: 1024px) {
  .sim-tb-status#tbStatusText {
    display: none !important;
  }
  .fwd-tb-brand-name small {
    display: none;
  }
  .official-exam-container {
    width: calc(100% - 20px);
  }
}

/* 3. Tablet Portrait & Large Phones (<= 768px) */
@media (max-width: 768px) {
  .sim-toolbar-inner {
    padding: 0 10px;
    gap: 6px;
  }
  .sim-toolbar-left,
  .sim-toolbar-right {
    gap: 5px;
  }
  .sim-tb-btn {
    padding: 5px 9px;
    font-size: 11.5px;
  }
  #tbBtnSets,
  #tbBtnAccounts {
    display: none !important;
  }
  .sctopj-sets-body {
    padding: 16px 12px 32px 12px;
  }
  .sctopj-sets-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
  }
  .sctopj-back-link {
    width: 100%;
    justify-content: center;
  }
  .co-page-bg {
    padding: 14px 10px 28px 10px;
  }
  .fwd-co-banner {
    padding: 14px 18px;
  }
  .fwd-co-body {
    padding: 16px 16px 22px 16px;
  }
  .fwd-exam-top-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 16px;
    gap: 8px;
  }
  .fwd-exam-banner-right {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }
  .foot-context-hint .hint-desk {
    display: none;
  }
  .foot-context-hint .hint-mob {
    display: inline;
  }
  .fwd-exam-title-zh small {
    display: none;
  }
  .fwd-exam-subtitle-pill {
    white-space: normal;
    line-height: 1.35;
    border-radius: 8px;
  }
  .video-player-frame {
    min-height: 260px;
  }
}

/* 4. Mobile Smartphones (<= 640px) */
@media (max-width: 640px) {
  body {
    font-size: 12.5pt;
  }
  .fwd-tb-brand {
    padding-right: 6px;
    margin-right: 0;
  }
  .fwd-tb-brand-name {
    display: none;
  }
  .sim-tb-btn {
    padding: 5px 8px;
    font-size: 11px;
    border-radius: 7px;
  }
  #tbScriptLockedBadge {
    padding: 4px 7px !important;
    font-size: 11px !important;
    white-space: nowrap;
  }

  /* Setup Screen (#screenChangeOrder) */
  .fwd-co-card {
    border-radius: 16px;
  }
  .fwd-co-mascot {
    display: none;
  }
  .fwd-co-banner-title {
    font-size: 15px;
    line-height: 1.35;
  }
  .co-heading-title {
    font-size: 15px;
    line-height: 1.4;
  }
  .co-back-btn {
    width: 100%;
    text-align: center;
  }
  .fwd-setup-step {
    padding: 14px;
  }
  .fwd-lang-actions {
    flex-wrap: wrap;
  }
  .co-enter-btn,
  .co-enter-btn-read {
    min-height: 40px;
  }

  /* Admit Card (#screenLoginChk) */
  .login-chk-bg {
    padding: 12px 10px 20px 10px;
    align-items: flex-start;
  }
  .login-chk-dialog.fwd-admit-dialog {
    border-radius: 18px !important;
  }
  .fwd-admit-header {
    padding: 16px 16px 14px 16px;
  }
  .fwd-admit-title {
    font-size: 16px;
  }
  .login-chk-dialog #checkDialog.fwd-admit-body {
    padding: 14px 14px !important;
  }
  .fwd-admit-info-grid {
    padding: 12px 14px;
  }
  .fwd-admit-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    padding: 7px 0;
  }
  .fwd-admit-val {
    text-align: left;
    width: 100%;
    font-size: 13px;
  }
  .fwd-admit-token-wrap {
    justify-content: space-between;
    width: 100%;
  }
  .admit-script-pick-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .login-chk-dialog .ui-dialog-buttonpane.fwd-admit-footer {
    flex-direction: column-reverse;
    align-items: stretch;
    padding: 14px 14px !important;
    gap: 8px;
  }
  .fwd-btn-admit-yes,
  .fwd-btn-admit-no {
    width: 100%;
    min-width: 0;
    white-space: normal;
    text-align: center;
    line-height: 1.3;
  }

  /* Exam Workstation (#screenExam) */
  .official-exam-container {
    width: calc(100% - 10px);
    margin: 5px auto 12px auto;
    border-radius: 14px;
    min-height: calc(100vh - 56px);
  }
  .fwd-exam-top-banner {
    border-radius: 13px 13px 0 0;
    padding: 10px 12px;
  }
  .fwd-exam-title-zh {
    font-size: 15px;
  }
  .fwd-exam-candidate-pill {
    font-size: 11.5px;
    padding: 4px 10px;
    flex: 0 1 auto;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .hdr-exam-submit-btn {
    min-height: 32px;
    padding: 4px 11px;
    font-size: 11.5px;
    gap: 5px;
  }
  .hdr-submit-txt small {
    font-size: 9.5px;
  }
  .exam-stage-inner {
    padding: 0 10px;
  }
  /* Media Head responsive wrap on mobile */
  .exam-media-head,
  .exam-media-head tbody,
  .exam-media-head tr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    width: 100%;
  }
  .exam-media-head td {
    display: inline-flex;
    align-items: center;
  }
  #MediaVolumeBar {
    width: 84px;
    margin: 6px 4px;
  }
  .td-audio-status {
    padding-left: 6px;
    flex: 1 1 160px;
    margin-top: 2px;
  }
  .audio-stage-pill {
    font-size: 9pt;
    padding: 3px 9px;
    line-height: 1.35;
  }
  .td-test-count {
    margin-left: auto;
  }
  .test-count-badge {
    font-size: 10pt;
    padding: 2px 10px;
  }

  /* 10-column Mobile Question Navigator */
  table.item {
    font-size: 9pt;
  }
  table.item td {
    height: 30px;
    line-height: 30px;
  }
  .read-legend-left {
    gap: 10px;
  }
  .style1 {
    font-size: 9.5pt;
  }
  .timer-pill {
    padding: 3px 11px;
    font-size: 12.5px;
  }

  /* Question & Answer Options on Mobile */
  .test-number-bar {
    padding: 6px 10px;
  }
  .question-prompt-card {
    padding: 10px 12px;
    font-size: 13pt;
  }
  .cfont {
    font-size: 13pt;
  }
  .efont {
    font-size: 12pt;
  }
  .ans-option-row {
    padding: 10px 12px;
    font-size: 13pt;
    align-items: flex-start;
  }
  .ans-option-row input[type="radio"] {
    margin-top: 3px;
    margin-right: 10px;
  }
  .ans-opt-key {
    font-size: 12pt;
    margin-right: 8px;
  }
  .ans-image-grid {
    gap: 8px;
  }
  .ans-image-card {
    padding: 8px;
  }
  .ans-image-card img {
    max-height: 125px;
  }

  /* Cloze Matrix Compact Mobile Layout */
  .cloze-matrix-table th,
  .cloze-matrix-table td {
    padding: 7px 5px;
    font-size: 11.5pt;
  }
  .cloze-blank-col,
  .cloze-radio-cell {
    width: 38px;
    padding: 6px 2px !important;
  }
  .cloze-subq-lbl {
    display: none;
  }
  .cloze-row-head {
    width: 58px;
  }

  /* Video & Transition on Mobile */
  .video-player-frame {
    min-height: 220px;
  }
  .video-play-overlay-btn {
    padding: 12px 16px;
    font-size: 13.5px;
  }
  .transition-card-td {
    min-height: 280px;
    padding: 20px 18px;
    font-size: 16pt;
  }
  .transition-en-text {
    font-size: 12pt;
  }
  .official-Transition-btn {
    width: 100%;
    padding: 12px 16px;
    font-size: 12.5pt;
  }

  /* Sticky Exam Footer on Mobile — Bilingual Vietnamese + Chinese Clarity */
  .official-exam-footer {
    padding: 8px 10px;
    border-radius: 0 0 13px 13px;
  }
  .fwd-exam-foot-bar {
    gap: 6px;
  }
  .foot-btn-group {
    gap: 5px;
    flex-wrap: nowrap;
  }
  .foot-vi-main .vi-desk {
    display: none;
  }
  .foot-vi-main .vi-mob {
    display: inline;
  }
  .fwd-foot-txt {
    flex-direction: column;
    align-items: center;
    gap: 1px;
    line-height: 1.12;
  }
  .fwd-foot-txt small {
    display: block;
    font-size: 9.5px;
    font-weight: 600;
    opacity: 0.85;
  }
  .foot-icon-btn {
    padding: 5px 8px;
    font-size: 11px;
    min-height: 40px;
    border-radius: 10px;
    gap: 4px;
  }
  .foot-icon-btn-next,
  .foot-icon-btn-last-submit {
    padding: 6px 12px;
    font-size: 12px;
    min-height: 42px;
  }
  .foot-passage-lock-pill {
    padding: 5px 11px;
    font-size: 11.5px;
    min-height: 40px;
    gap: 6px;
  }
  .cluster-listening-stage-card {
    padding: 14px 14px;
    gap: 12px;
    border-radius: 13px;
  }
  .cluster-stage-icon-box {
    width: 40px;
    height: 40px;
    font-size: 17px;
    border-radius: 11px;
  }
  .cluster-stage-title {
    font-size: 14px;
  }
  .cluster-stage-desc-vi {
    font-size: 12.5px;
  }
  .cluster-stage-desc-zh {
    font-size: 12px;
  }
  .foot-context-hint {
    font-size: 11px;
    padding: 5px 9px;
    gap: 5px;
  }
  .exam-submit-modal-hdr {
    padding: 14px 16px;
    gap: 10px;
  }
  .exam-submit-modal-title {
    font-size: 15px;
  }
  .exam-submit-modal-body {
    padding: 14px 16px;
  }
  .exam-submit-modal-actions {
    flex-direction: column;
    align-items: stretch;
    padding: 12px 16px 16px 16px;
    gap: 8px;
  }
  .exam-modal-btn {
    width: 100%;
    flex: none;
  }

  /* Score Report & Finish Page on Mobile */
  .score-stage-wrap {
    padding: 12px 10px 20px 10px;
  }
  .score-info-table tr {
    display: flex;
    flex-direction: column;
  }
  .score-info-table th {
    width: 100% !important;
  }
  .score th,
  .score td {
    padding: 9px 8px;
  }
  .score-head-row {
    font-size: 92%;
  }
  .score-skill-row {
    font-size: 102%;
  }
  .score-overall-font {
    font-size: 14pt;
  }
  .score-actions-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .score-action-btn {
    width: 100%;
  }
  .finish-text-td {
    padding: 14px 16px !important;
  }
}

/* 5. Extra-Small Phones (<= 375px) */
@media (max-width: 375px) {
  .foot-icon-btn {
    padding: 5px 8px;
    font-size: 11px;
  }
  .foot-icon-btn-next,
  .foot-icon-btn-last-submit {
    padding: 5px 11px;
    font-size: 11.5px;
  }
  .hdr-submit-txt small {
    display: none;
  }
  .cloze-blank-col,
  .cloze-radio-cell {
    width: 33px;
  }
}
