@import url('https://fonts.googleapis.com/css2?family=Poltawski+Nowy:wght@400;500;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Qwitcher+Grypen:wght@400;700&display=swap');

:root {
  --bg: #efefef;
  --purple: #9054ef;
  --purple-dark: #9054ef;
  --orange: #f8aa32;
  --text: #2d2d2d;
  --white: #fff;
  --shadow: 0 3px 10px rgba(0, 0, 0, 0.16);
  --radius: 14px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Poltawski Nowy", Georgia, "Times New Roman", serif;
  background: #d9d9d9;
  color: var(--text);
}

.mobile-shell {
  width: 100%;
  min-height: 100dvh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 0;
}

.screen {
  width: 402px;
  min-height: 874px;
  background: #ffff;
  position: relative;
  overflow: hidden;
}

.safe { padding: 22px 20px 28px; }

h1, h2, h3, p { margin: 0; }
.title { font-size: 30px; line-height: 1.1; color: var(--purple); font-weight: 700; }
.subtitle { margin-top: 10px; font-size: 14px; line-height: 1.35; color: #4d4d4d; }
.purple-text { color: var(--purple); }

.gradient-center {
  background: radial-gradient(circle at 50% 35%, #9054ef 0%, #c3b1e0 52%, #f0f0f0 100%);
}


.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.secondary { background: #fff; color: var(--purple);}

.link-arrow {
  font-size: 50px;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}

.hero {
  background-color: var(--purple);
}

body[data-page="home"] .screen {
  background: #efefef url("images/Homescreen.png") center top / cover no-repeat;
}

.hero-wave {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero-wave::after {
  content: "";
  position: absolute;
  left: -6%;
  right: -6%;
  top: 67%;
  height: 228px;
  border-radius: 58% 42% 0 0 / 34% 54% 0 0;
  background: #efefef;
  box-shadow: 0 -4px 10px rgba(0,0,0,.08);
}

.home-logo-img {
  width: 250px;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 250px auto 8px;
}

.brand-name {
  text-align: center;
  color: #fff;
  font-size: 42px;
  text-shadow: 0 4px 4px rgba(0, 0, 0, .25);
  font-weight: 700;
}

.start-row {
  position: absolute;
  right: 20px;
  bottom: 122px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.start-row a {
  color: var(--purple);
  text-decoration: none;
  font-size: 22px;
  font-weight: 700;
}

/* Intro screens */
.intro-screen {
  background: radial-gradient(circle at 50% 36%, #9054ef 0%, #a884df 40%, #c8b8e2 70%, #dddbe3 100%);
}
.intro-copy {
  margin-top: 380px;
  color: #fff;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.2;
  max-width: 360px;
}
.intro-copy--long {
  margin-top: 330px;
  max-width: 330px;
}
.intro-arrow {
  position: absolute;
  right: 18px;
  top: 500px;
  font-size: 44px;
}
.intro-arrow--lower { top: 540px; }

/* Level page */
.level-screen {
  background: #efefef url("images/level.png") center top / cover no-repeat;
}

.level-back-arrow {
  position: absolute;
  top: 16px;
  left: 30px;
  color: #9350EB;
  text-decoration: none;
  font-size: 44px;
  font-weight: 500;
  line-height: 1;
  z-index: 3;
}

.level-title {
  font-size: 32px;
  margin-top: 126px;
  max-width: 362px;
  line-height: 1.18;
}
.level-screen .option-card {
  height: 85px;
  font-size: 28px;
  margin-top: 34px;
  padding: 22px 24px;
  width: 100%;
}
.level-screen .option-card .radio {
  width: 44px;
  height: 44px;
  border-radius: 10px;
}
.level-screen .option-card .radio::before {
  width: 24px;
  height: 24px;
}
.level-screen .bottom-glow {
  left: -76px;
  bottom: -188px;
  width: 470px;
  height: 320px;
  display: none;
}

/* Name page */
.name-screen {
  background: #efefef url("images/level.png") center top / cover no-repeat;
}

.name-back-arrow {
  position: absolute;
  top: 16px;
  left: 30px;
  color: #9350EB;
  text-decoration: none;
  font-size: 44px;
  font-weight: 500;
  line-height: 1;
  z-index: 3;
}

.name-title {
  font-size: 52px;
  margin-top: 118px;
  max-width: 360px;
  line-height: 1.18;
}

.name-card {
  margin-top: 54px;
  padding: 22px 14px 20px;
  border: 1px solid #f8c275;
  background: transparent;
  box-shadow: none;
  border-radius: 10px;
}
.name-label {
  display: none;
}
.name-screen .field {
  border: 1px solid #f8c275;
  background: transparent;
  color: #8f8f8f;
  border-radius: 4px;
  min-height: 56px;
  font-size: 14px;
}
.name-screen .field::placeholder {
  color: #c9c9c9;
  opacity: 1;
}
.name-cta { margin-top: 14px; }
.name-screen #start-journey {
  min-width: 210px;
  border-radius: 10px;
  border: 0;
  min-height: 56px;
  background: #f8aa32;
  height: 35px;
}

#start-journey {
  color: #fff;
  font-weight: 300;
  font-family: Poltawski Nowy;
  font-size: 18px;
}

.name-screen .bottom-glow {
  left: 92px;
  right: -92px;
  bottom: -92px;;
  top: auto;
  width: 360px;
  height: 240px;
  display: none;
}

/* Steps page */
.steps-screen {
  background: linear-gradient(90deg, #efe7d8 0%, #f3b34b 16%, #f6b24b 84%, #efe7d8 100%);
}
.steps-back-arrow {
  position: absolute;
  top: 16px;
  left: 30px;
  color: #fff;
  text-decoration: none;
  font-size: 44px;
  font-weight: 500;
  line-height: 1;
  z-index: 3;
}

.steps-start {
  color: #ffff;
  font-size: 18px;
  font-weight: 700;
  margin-top: 84px;
  margin-left: 30px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
}
.steps-screen .timeline {
  margin-top: 18px;
}
.steps-screen .timeline::before {
  width: 3px;
  border-radius: 2px;
  top: 14px;
  bottom: 14px;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,0.95) 0 15px, transparent 15px 27px);
}
.steps-screen .timeline-row {
  margin-bottom: 46px;
}
.steps-screen .step-btn {
  width: 174px;
  min-height: 74px;
  border-radius: 999px;
  padding: 8px 18px 8px 56px;
  background: #f3f3f3;
  color: #9054ef;
  font-size: 20px;
  font-weight: 700;
  font-family: Poltawski Nowy;
  text-align: left;
  border: 3px solid #efd9b8;
  position: relative;
  box-shadow: 3px 3px 0 #db8e27, 0 4px 10px rgba(0, 0, 0, 0.08);
}
.steps-screen .step-btn::before {
  content: "★";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #f5c700;
  font-size: 30px;
}

/* Tutorial 1 */
.t1-screen {
  background: #efefef;
  padding: 14px 14px 24px;
}
.t1-screen .dot-progress {
  gap: 24px;
  margin: 0 0 8px;
}
.t1-screen .dot-progress span {
  width: 12px;
  height: 12px;
  background: #d7d7d7;
}
.t1-screen .dot-progress span.active { background: #9054ef; }
.t1-screen .pill {
  padding: 2px 10px;
  font-size: 14px;
  border-radius: 999px;
}
.t1-title {
  margin-top: 8px;
  font-size: 44px;
  color: #171717;
}
.t1-subtitle {
  color: #171717;
  font-size: 16px;
  line-height: 1.45;
  margin-top: 6px;
}
.t1-screen .video-wrap {
  margin-top: 12px;
  border: 2px solid #d9d9d9;
  background: #fff;
}
.t1-screen .video-wrap iframe {
  height: 170px;
}
.t1-section-title {
  font-size: 23px;
  margin-top: 14px;
  color: #8b50e8;
}
.t1-screen .sign-list { gap: 18px; }
.t1-screen .et-card {
  --et-scale: 0.8;
  width: 85%;
  height: 200px;
  margin-inline: auto;
  border-radius: calc(24px * var(--et-scale));
  min-height: calc(128px * var(--et-scale));
  justify-content: center;
  text-align: center;
  flex-direction: column;
  box-shadow: 0 5px 10px rgba(255, 170, 50, 100);
  padding: calc(12px * var(--et-scale)) calc(14px * var(--et-scale));
}
.t1-screen .et-card img {
  padding-top: 0;
  padding-bottom: 0;
  width: 118px;
  height: 118px;
  object-fit: contain;
  display: block;
  margin: 0 auto -14px;
  background: transparent;
}
.t1-screen .et-card h4 {
  margin: 0;
  font-size: 16px;
  color: #f8aa32;
  line-height: 1.2;
  text-shadow: 0 3px 4px rgba(186, 186, 186, 0.2);
}
.t1-screen .et-card p {
  margin-top: 0;
  font-size: 12px;
  line-height: 1.35;
  color: #f8aa32;
  text-shadow: 0 3px 4px rgba(186, 186, 186, 0.2);
}
.t1-screen .home-nav {
  padding-top: 30px;
  gap: 8px;
}
.t1-screen .home-nav a {
  flex: 1;
  text-align: center;
  min-height: 42px;
  display: grid;
  align-items: center;
  border-radius: 10px;
  font-size: 14px;
  border: 1px solid #d2d2d2;
}
.t1-screen .home-nav a:first-child {
  color: #9d9d9d;
  background: #ffff;
}
.t1-screen .home-nav a:last-child {
  color: #fff;
  background: #9054ef;
  border: 0;
}


/* Tutorial 2 */
.t2-screen {
  background: #fff;
  padding: 20px 18px 24px;
}
.t2-screen,
.t2-screen * {
  font-family: "Poltawski Nowy", Georgia, "Times New Roman", serif;
}
.t2-screen .dot-progress {
  width: 100%;
  justify-content: space-between;
  gap: 0;
  margin: 0 0 18px;
}
.t2-screen .dot-progress span {
  width: 18px;
  height: 18px;
  background: #e0e0e0;
  box-shadow: 0 4px 8px rgba(0,0,0,0.12);
}
.t2-screen .dot-progress span.active { background: #9054ef; }
.t2-screen .pill {
  padding: 4px 12px;
  font-size: 12px;
  border-radius: 999px;
  margin-top: 12px;
}
body[data-page="tutorial1"] .dot-progress,
body[data-page="tutorial2"] .dot-progress,
body[data-page="tutorial3"] .dot-progress,
body[data-page="tutorial4"] .dot-progress,
body[data-page="final-test"] .dot-progress {
  width: 100%;
  justify-content: space-between;
  gap: 0;
  margin: 0 0 18px;
}
body[data-page="tutorial1"] .dot-progress span,
body[data-page="tutorial2"] .dot-progress span,
body[data-page="tutorial3"] .dot-progress span,
body[data-page="tutorial4"] .dot-progress span,
body[data-page="final-test"] .dot-progress span {
  width: 18px;
  height: 18px;
  background: #e0e0e0;
  box-shadow: 0 4px 8px rgba(0,0,0,0.12);
}
body[data-page="tutorial1"] .dot-progress span.active,
body[data-page="tutorial2"] .dot-progress span.active,
body[data-page="tutorial3"] .dot-progress span.active,
body[data-page="tutorial4"] .dot-progress span.active,
body[data-page="final-test"] .dot-progress span.active {
  background: #9054ef;
}
body[data-page="tutorial1"] .pill,
body[data-page="tutorial2"] .pill,
body[data-page="tutorial3"] .pill,
body[data-page="tutorial4"] .pill,
body[data-page="final-test"] .pill {
  padding: 4px 12px;
  font-size: 12px;
  border-radius: 999px;
  margin-top: 12px;
}
.lesson-title {
  margin-top: 14px;
  font-size: 30px;
  color: #171717;
}
.lesson-subtitle {
  color: #171717;
  font-size: 14px;
  line-height: 1.45;
  margin-top: 8px;
}
.t2-title {
  margin-top: 14px;
  font-size: 30px;
  color: #171717;
}
.t2-subtitle {
  color: #171717;
  font-size: 14px;
  line-height: 1.45;
  margin-top: 8px;
}
.t2-screen .lesson-grid {
  margin-top: 44px;
  gap: 12px;
}
.t2-screen .alpha {
  height: 116.67px;
  border-radius: 14px;
  padding: 0;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #f8aa32;
  color: #fff;
  font-size: 62px;
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 3px 2px rgba(0,0,0,0.2);
  border: 0;
  transition: transform 0.14s ease, box-shadow 0.18s ease;
  box-shadow: 0 6px 10px rgba(0,0,0,0.12);
}
.t2-screen .alpha.active {
  background: #fff;
  color: #171717;
  text-shadow: none;
  outline: none;
  box-shadow: 0 6px 10px rgba(0,0,0,0.12);
}
.t2-screen .alpha:focus,
.t2-screen .alpha:focus-visible {
  outline: none;
}
.alpha-img {
  width: 82px;
  height: 82px;
  object-fit: contain;
  display: block;
}
.t2-chevrons {
  display: flex;
  justify-content: center;
  gap: 12px;
  color: #9f9f9f;
  margin: 24px 0 34px;
}
.t2-chevrons span {
  width: 14px;
  height: 14px;
  border-top: 4px solid #9f9f9f;
  border-right: 4px solid #9f9f9f;
  display: inline-block;
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.t2-chevrons span:first-child {
  transform: rotate(-135deg);
}
.t2-chevrons span:last-child {
  transform: rotate(45deg);
}
.t2-bottom {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}
.prev-pill {
  flex: 1;
  border-radius: 12px;
  border: 1px solid #e5e5e5;
  background: #fff;
  color: #9d9d9d;
  height: 40px;
  font-size: 12px;
  font-family: inherit;
  display: inline-grid;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 0 30px;
  position: relative;
}
.next-pill {
  flex: 1.2;
  border-radius: 12px;
  background: #9054ef;
  color: #fff;
  height: 40px;
  font-size: 12px;
  border: 0;
  font-family: inherit;
  display: inline-grid;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 0 30px;
  position: relative;
}
.prev-pill::before,
.next-pill::after {
  content: "";
  width: 7px;
  height: 7px;
  position: absolute;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}
.prev-pill::before {
  left: 14px;
  border-left: 2px solid #b5b5b5;
  border-bottom: 2px solid #b5b5b5;
}
.next-pill::after {
  right: 14px;
  border-right: 2px solid #fff;
  border-top: 2px solid #fff;
}
.t2-footer {
  margin-top: 32px;
  padding-bottom: 28px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.t2-footer img { width: 120px; height: auto; opacity: 0.32; }

.option-card {
  font-family: Poltawski Nowy;
  background: var(--orange);
  border-radius: 12px;
  border: 0;
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 50px;
  padding: 18px 22px;
  margin-top: 22px;
  box-shadow: 0 2px 2px #bababa;
}

.radio {
  width: 34px;
  height: 34px;
  border: 2px solid #fff;
  border-radius: 7px;
  display: inline-grid;
  place-content: center;
}
.radio::before {
  content: "";
  width: 18px;
  height: 18px;
  border-radius: 4px;
  transform: scale(0);
  transition: .15s;
  background: #fff;
}
.option-card.selected .radio::before { transform: scale(1); }

.bottom-glow {
  position: absolute;
  left: -120px;
  bottom: -120px;
  width: 420px;
  height: 260px;
  background: radial-gradient(circle at 65% 45%, rgba(144,84,239,.95), rgba(144,84,239,.1) 70%, transparent 100%);
}

.field {
  width: 100%;
  border-radius: 10px;
  border: 0;
  padding: 14px 16px;
  font-size: 26px;
  font-family: inherit;
}

.timeline {
  margin-top: 30px;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: rgba(255,255,255,.8);
  transform: translateX(-50%);
}
.timeline-row {
  display: flex;
  margin-bottom: 16px;
  align-items: center;
}
.timeline-row.right { justify-content: flex-end; }
.step-btn {
  width: 174px;
  border: 0;
  border-radius: 12px;
  padding: 16px 14px;
  background: #f8aa32;
  color: #fff;
  font-size: 34px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.step-btn.locked { background: #c9a87a; opacity: .65; cursor: not-allowed; }

.dot-progress { display: flex; gap: 18px; margin-bottom: 18px; }
.dot-progress span {
  width: 18px; height: 18px; border-radius: 999px; background: #d1c6e8;
}
.dot-progress span.active { background: var(--purple); }

.pill {
  display: inline-flex;
  padding: 7px 13px;
  background: #8f55ec;
  color: #fff;
  border-radius: 8px;
  font-size: 23px;
  font-weight: 700;
}

.card {
  background: #fff;
  border-radius: 12px;
  box-shadow: #f8aa32 0px 2px 3px;
}

.video-wrap { margin-top: 18px; overflow: hidden; border-radius: 12px; }
.video-wrap iframe { width: 100%; height: 258px; border: 0; }

.lesson-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.alpha {
  border: 0;
  border-radius: 12px;
  background: #f8aa32;
  color: #fff;
  height: 111px;
  font-size: 70px;
  font-weight: 700;
  cursor: pointer;
}
.alpha.active { outline: 4px solid #9054ef; }

.status-box {
  margin-top: 14px;
  border-radius: 12px;
  background: #fff;
  padding: 14px;
  text-align: center;
  font-size: 24px;
  color: #9054ef;
  box-shadow: var(--shadow);
}

.sign-list {
  margin-top: 10px;
  display: grid;
  gap: 10px;
}
.sign-item {
  background: #fff;
  border-radius: 12px;
  padding: 10px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 12px;
}
.sign-item img { 
  width: 130px; 
  height: 94px; 
  object-fit: cover; 
  border-radius: 8px; 
}

.sign-item h4 { 
  font-size: 25px; 
  margin-left: 18px;
  color: #FFAA32; 
}

.et-card { 
  cursor: pointer; 
}

.et-card.active { 
  background: #efe4ff; 
}

.et-card img {
  width: 90px;
  height: 90px;
  object-fit: contain;
  border-radius: 8px;
  background: #f6f0ff;
}
.et-card .et-copy {
  display: grid;
  gap: 0;
}
.et-card .et-copy p {
  font-size: 14px;
  width: 80%;
  margin-left: 32px;
  color: #FFAA32;
}

.match-area {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
body[data-page="final-test"] #final-drop-slots .drop:last-child {
  grid-column: 1 / -1;
  justify-self: center;
  width: calc(50% - 5px);
}
.drop {
  min-height: 96px;
  border: 3px dashed #c2a0f8;
  border-radius: 12px;
  background: #fff;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 6px;
  font-size: 26px;
  color: #c2a0f8;
}

.drag-pool {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.t4-feedback {
  margin: 10px 0 0;
  font-size: 14px;
  text-align: center;
  color: #FFAA32;
  font-weight: 700;
}
.final-feedback {
  margin: 10px 0 0;
  font-size: 14px;
  text-align: center;
  color: #FFAA32;
  font-weight: 700;
}
.draggable {
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 4px;
  cursor: grab;
}
.draggable img { width: 100%; height: 82px; object-fit: cover; border-radius: 6px; }

.word-pool { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.word {
  border: 2px solid #9054ef;
  background: #fff;
  color: #9054ef;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 21px;
  cursor: pointer;
}
.word.used { opacity: .4; pointer-events: none; }

.sentence-box {
  margin-top: 12px;
  min-height: 82px;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: flex-start;
}

.cert-wrap {
  margin-top: 20px;
  border-radius: 0;
  border: 0;
  padding: 0;
  background: transparent;
  display: none;
}
.cert-wrap.show { display: block; }
.cert-title { text-align: center; font-size: 34px; color: #6b4a18; }
.cert-name { text-align: center; font-size: 44px; color: #5b35a8; margin: 10px 0; }
.cert-frame {
  position: relative;
}
.cert-img {
  width: 100%;
  border-radius: 10px;
  border: 0;
  display: block;
}
.cert-name-overlay {
  position: absolute;
  left: 50%;
  top: 45%;
  transform: translateX(-50%);
  margin: 0;
  font-family: "Qwitcher Grypen", cursive;
  font-weight: 700;
  font-size: 35px;
  color: #1d1d1d;
  line-height: 1;
  white-space: nowrap;
}
.center-row { display: flex; justify-content: center; gap: 10px; margin-top: 16px; }

.home-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}
.home-nav a {
  text-decoration: none;
  color: #fff;
  background: #9054ef;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 23px;
}
.home-nav a.prev-pill,
.t2-bottom .prev-pill {
  background: #fff;
  color: #9d9d9d;
  border: 1px solid #e5e5e5;
}
.home-nav a.next-pill,
.t2-bottom .next-pill {
  background: #9054ef;
  color: #fff;
}
.home-nav .prev-pill,
.home-nav .next-pill,
.t2-bottom .prev-pill,
.t2-bottom .next-pill {
  min-height: 40px;
  font-size: 12px;
}
.t1-screen .home-nav a.next-pill {
  border-radius: 12px;
  min-height: 40px;
  font-size: 12px;
}
.prev-pill,
.next-pill {
  cursor: pointer;
}
.next-pill:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#to-final,
#to-certificate {
  background: #f8aa32;
}

body[data-page="final-test"] .lesson-title {
  color: #f8aa32;
}

body[data-page="final-test"] .pill {
  background: #f8aa32;
}

.footer-brand {
  margin-top: 32px;
  padding-bottom: 28px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.footer-brand img {
  width: 120px;
  height: auto;
  opacity: 0.32;
  object-fit: contain;
}
.footer-logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

body[data-page="tutorial1"] .screen,
body[data-page="tutorial2"] .screen,
body[data-page="tutorial3"] .screen,
body[data-page="tutorial4"] .screen {
  background: #fff;
}

body[data-page="certificate"] .screen {
  background: radial-gradient(circle at 50% 45%, #b693ef 0%, #d7c9ea 34%, #efefef 72%);
  display: flex;
  flex-direction: column;
  position: relative;
}

body[data-page="certificate"] #certificate-card {
  position: relative;
  z-index: 7;
}

body[data-page="certificate"] .cert-frame {
  transform: scale(1);
  transform-origin: center;
  transition: transform 0.22s ease;
}

body[data-page="certificate"].cert-focus .screen::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.58);
  z-index: 6;
  pointer-events: none;
}

body[data-page="certificate"].cert-focus #certificate-card {
  z-index: 8;
}

body[data-page="certificate"].cert-focus .cert-frame {
  transform: scale(1.06);
}

body[data-page="certificate"] .title {
  margin-top: 48px !important;
  width: 100%;
  padding-right: 20px;
  text-align: center;
  color: #7d49de;
  font-size: 46px;
  line-height: 1.1;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

body[data-page="certificate"] .subtitle {
  margin: 10px auto 0;
  max-width: 320px;
  text-align: center;
  color: #7d49de;
  font-size: 16px;
  line-height: 1.35;
}

body[data-page="certificate"] #download-pdf {
  min-width: 240px;
  min-height: 62px;
  font-size: 18px;
  border-radius: 16px;
  border: 0;
  background: #f8aa32;
  color: #fff;
  position: relative;
  padding-right: 40px;
  box-shadow: var(--shadow);
}

body[data-page="certificate"] #download-pdf::before {
  content: "";
  position: absolute;
  right: 34px;
  top: 50%;
  width: 2px;
  height: 6px;
  border: 2px solid #fff;
  border-top: 0;
  border-radius: 0 0 8px 8px;
  transform: translateY(6px);
  padding-right: 20px;
}

body[data-page="certificate"] #download-pdf::after {
  content: "↓";
  position: absolute;
  right: 12px;
  top: 50%;
  font-size: 20px;
  line-height: 0.5;
  font-weight: 700;
  transform: translateY(-56%);
  padding-right: 30px;
  padding-bottom: 5px;
}

body[data-page="certificate"] #toggle-cert {
  min-width: 126px;
  min-height: 36px;
  font-size: 12px;
  border-radius: 10px;
  border: 0;
  box-shadow: var(--shadow);
}

body[data-page="certificate"] .footer-brand {
  margin-top: auto;
  padding-bottom: 30px;
}

@media print {
  body { background: #fff; }
  .mobile-shell { display: block; }
  .screen { width: 100%; min-height: auto; }
  .no-print { display: none !important; }
}
