
/* ==============================
   1. FONTS
============================== */


@font-face {
  font-family: "Comic Relief";
  src: url("../assets/fonts/ComicRelief-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Comic Relief";
  src: url("../assets/fonts/ComicRelief-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}


@font-face {
  font-family: "Shantell Sans";
  src: url("assets/fonts/ShantellSans-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: block;
}

@font-face {
  font-family: "Shantell Sans";
  src: url("assets/fonts/ShantellSans-Medium.ttf")
       format("truetype");
  font-weight: 500;
  font-style: normal;
   font-display: block;
}

/* ==============================
   2. GENERAL
============================== */

:root {
  --text: #342b43;
  --muted: #746b80;
  --purple: #7754b5;
  --purple-dark: #604092;
  --purple-light: #f4edff;
  --border: #e6d9f4;
  --panel: #fffdfd;

  
font-family: "Comic Relief", Arial, sans-serif;

  color: var(--text);
  background: #eee5ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);

  background:
    radial-gradient(
      circle at 10% 5%,
      #ffffff,
      transparent 35%
    ),
    radial-gradient(
      circle at 90% 80%,
      #cdb8f5,
      transparent 40%
    ),
    linear-gradient(
      135deg,
      #faf6ff 0%,
      #eee5ff 55%,
      #dfd0fa 100%
    );

  background-attachment: fixed;
}

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 22px 16px 60px;
}

button {
  
font-family: "Comic Relief", Arial, sans-serif;

  font-weight: 500;
}

#share {
  background: #604092;
  color: #ffffff;
  border: 1px solid #604092;
}

#share:hover {
  background: #4d3278;
  border-color: #4d3278;
}

/* ==============================
   3. HEADER
============================== */

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.brand {
  font-size: 13px;
  letter-spacing: .08em;
  font-weight: 800;
  color: #584177;
}

.brand-link {
  font-family: "Shantell Sans", sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0;
  color: #604092;
  text-decoration: none;
}

.brand-link:hover {
  color: #7754b5;
}

.pill {
  background: #ffffffaa;
  border: 1px solid #d8c6ee;
  border-radius: 99px;
  padding: 7px 12px;
  font-size: 12px;
  color: #674b91;
  text-align: center;
}

/* ==============================
   4. MAIN PANEL
============================== */

.panel {
  background: var(--panel);
  border: 1px solid #e8ddf5;
  border-radius: 25px;
  padding: clamp(22px, 5vw, 38px);
  box-shadow: 0 12px 40px #67469b16;
}

.story-image,
.cover-image {
  display: block;
  width: 100%;
  height: 350px;
  object-fit: contain;
  border-radius: 18px;
  margin: 18px 0;
}

/* ==============================
   5. DIALOGUE CHARACTER PLACEHOLDERS
============================== */

.dialogue-avatar-placeholder {
  position: relative;
  width: 55px;
  height: 55px;
  flex-shrink: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  background: #eee3fc;
  border: 1.5px dashed #cbb6e9;
  border-radius: 50%;

  overflow: hidden;
}

.avatar-initial {
  
font-family: "Comic Relief", Arial, sans-serif;

  font-size: 23px;
  font-weight: 500;
  color: #7754a6;
}

.dialogue-avatar-placeholder img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.dialogue-avatar-placeholder.has-avatar {
  background: transparent;
  border: none;
}

.dialogue-avatar-placeholder.has-avatar .avatar-initial {
  display: none;
}

/* ==============================
   6. ILLUSTRATION PLACEHOLDERS
============================== */

.illustration-placeholder {
  position: relative;
  width: 100%;
  height: 350px;
  margin: 18px 0;
  border: 2px dashed #cbb6e9;
  border-radius: 18px;
  background: #f5efff;
  overflow: hidden;
}

.illustration-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  text-align: center;
}

.placeholder-icon {
  font-size: 38px;
  color: #b79bdc;
  line-height: 1;
}

.placeholder-label {
  font-size: 16px;
  font-weight: 500;
  color: #7754a6;
}

.placeholder-note {
  font-size: 12px;
  color: #a18cb9;
}

.illustration-placeholder > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Hide placeholder when image loads */

.has-image {
  border: none;
  background: transparent;
}

.has-image .illustration-fallback {
  display: none;
}

/* ==============================
   7. REMOVE MASCOT BOXES AND BORDERS
============================== */

/* Main result mascot */

.mascot-placeholder {
  width: 220px;
  height: 220px;
  border: none;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

/* Best Match and Chaotic Match mascots */

.small-placeholder {
  width: 75px;
  height: 75px;
  border: none;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

/* Mascot images */

.mascot-placeholder img,
.small-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
}

/* Remove placeholder styling once image loads */

.mascot-placeholder.has-image,
.small-placeholder.has-image {
  border: none;
  background: transparent;
}

/* ==============================
   8. TYPOGRAPHY
============================== */

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .13em;
  font-size: 11px;
  font-weight: 800;
  color: #8566aa;
}

.chapter-info {
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 18px;
  font-weight: 800;
  color: #8566aa;
}

h1 {
  font-size: clamp(30px, 6vw, 48px);
  line-height: 1.12;
  margin: 12px 0;
}

h2 {
  font-size: clamp(24px, 5vw, 32px);
  margin: 10px 0 16px;
}

h3 {
  font-size: 18px;
  margin: 0 0 10px;
}

p {
  line-height: 1.75;
  white-space: normal;
}

.intro-text {
  white-space: pre-line;
  font-size: 17px;
}

.intro-story {
  font-family: "Shantell Sans", sans-serif;
  font-weight: 500;
  font-size: 17px;
  line-height: 1.6;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 13px;
}

.question-heading {
  margin-top: 35px;
  margin-bottom: 18px;
}

/* ==============================
   9. STORY AND DIALOGUE
============================== */

.story {
  font-family: "Shantell Sans", sans-serif;
  font-weight: 500;
  font-size: 17px;
  line-height: 1.6;
  margin-bottom: 30px;
}

.narration {
  margin: 10px 0;
  font-family: "Shantell Sans", sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

.dialogue {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 30px 0;
}

.dialogue-avatar {
  width: 55px;
  height: 55px;
  object-fit: contain;
  flex-shrink: 0;
}

.dialogue-text {
  flex: 1;
  min-width: 0;
  font-family: "Shantell Sans", sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

/* ==============================
   10. CHOICE BUTTONS
============================== */


.choices {
  display: grid;
  gap: 11px;
  margin-top: 35px;
  margin-bottom: 45px;
}


.choice {
  display: block;
  width: 100%;
  text-align: left;
  background: #ffffff;
  border: 1.5px solid #e3d7f2;
  border-radius: 15px;
  padding: 17px;
  cursor: pointer;
  color: var(--text);
  line-height: 1.6;
  transition:
    background .15s,
    border-color .15s,
    transform .15s;
}

.choice strong {
  margin-right: 6px;
  color: var(--purple);
}

.choice:hover,
.choice:focus-visible {
  border-color: #9872d2;
  background: #f6f0ff;
  transform: translateY(-1px);
}

/* ==============================
   11. ACTION BUTTONS
============================== */

.primary,
.secondary {
  border: 0;
  border-radius: 13px;
  padding: 14px 18px;
  font-weight: 750;
  cursor: pointer;
  transition: background .15s;
}

.primary {
  background: var(--purple);
  color: #ffffff;
}

.primary:hover {
  background: var(--purple-dark);
}

.secondary {
  background: #eee5fa;
  color: #493463;
}

.secondary:hover {
  background: #e2d3f6;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

button:focus-visible {
  outline: 3px solid #9b7acf;
  outline-offset: 3px;
}

/* ==============================
   12. PROGRESS
============================== */

.progress {
  height: 8px;
  background: #eee6f7;
  border-radius: 50px;
  overflow: hidden;
  margin: 16px 0 8px;
}

.progress > div {
  height: 100%;
  background: #9a78d0;
  border-radius: 50px;
  transition: width .2s;
}

/* ==============================
   13. RESULT PAGE
============================== */

.result-eyebrow {
  text-align: center;
}

.mascot-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px 0;
}

.mascot-image {
  display: block;
  width: 220px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.result-title {
  text-align: center;
}

.animal-name {
  font-size: 22px;
  font-weight: 500;
  color: #8566aa;
  margin: -8px 0 8px;
  text-align: center;
}

.result-quote {
  text-align: center;
  color: #756683;
}

.result-summary {
  text-align: center;
}

.profile-list {
  margin: 14px 0 0;
  padding-left: 20px;
}

.profile-list li {
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 8px;
}

.profile-list li:last-child {
  margin-bottom: 0;
}

.match-label,
.profile-label {
  display: inline-block;
  background: #f2eafd;
  border: 1px solid #e3d5f5;
  border-radius: 20px;
  padding: 7px 12px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #7856a5;
  margin-bottom: 12px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.mini {
  border: 1px solid #e8ddf4;
  background: #ffffff;
  border-radius: 16px;
  padding: 16px;
}

.mini p {
  font-size: 14px;
  line-height: 1.7;
}

.match-character {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.match-character h3 {
  margin: 0;
  flex: 1;
  font-size: 17px;
}

.match-mascot {
  width: 75px;
  height: 75px;
  object-fit: contain;
  flex-shrink: 0;
}

.ending-card {
  background: linear-gradient(
    135deg,
    #f8f3ff 0%,
    #eee4ff 100%
  );
  border: 1px solid #e0cff4;
  border-radius: 18px;
  padding: 20px;
}

.ending-card h3 {
  margin-top: 10px;
  color: #62428f;
}

.ending-card p {
  margin-bottom: 0;
}

.kit {
  margin: 12px 0;
}

.tag {
  display: inline-block;
  background: #f1e9fc;
  border-radius: 50px;
  padding: 7px 12px;
  font-size: 12px;
  margin: 3px;
}

.result-description {
  
font-family: "Comic Relief", Arial, sans-serif;

  font-size: 14px;
  font-weight: 500;
  line-height: 1.7;
}

/* ==============================
   14. OTHER
============================== */

.divider {
  border: 0;
  border-top: 1px solid #ebe1f5;
  margin: 25px 0;
}

footer {
  text-align: center;
  font-size: 12px;
  color: #76678a;
  margin-top: 25px;
}

/* ======================================
   15. MOBILE RESPONSIVE LAYOUT
   Only affects screens 520px or smaller
   Original desktop design unchanged
====================================== */

@media (max-width: 520px) {

  html,
  body {
    width: 100%;
    min-width: 0;
  }

  body {
    min-height: 100dvh;
    overflow-x: hidden;
  }

  main {
    width: 100%;
    max-width: 100%;
    padding: 5px 8px 10px;
  }

  /* Header */

  .top {
    align-items: center;
    gap: 5px;
    margin-bottom: 5px;
  }

  .brand {
    font-size: 11px;
  }

   .brand-link {
  font-size: 18px;
}

  .pill {
    font-size: 10px;
    padding: 4px 8px;
  }

  /* Main panel */

  .panel {
    width: 100%;
    min-width: 0;
    padding: 10px 12px;
    border-radius: 14px;
  }

  /* Chapter headings */

  .chapter-info {
    font-size: 12px;
    letter-spacing: .04em;
  }

  .eyebrow {
    font-size: 10px;
  }

  h1 {
    font-size: 23px;
    margin: 6px 0;
  }

  h2 {
    font-size: 18px;
    margin: 5px 0 8px;
  }

  h3 {
    font-size: 15px;
  }

  /* Chapter illustrations */

  .story-image,
  .cover-image,
  .illustration-placeholder {
    width: 100%;
    max-width: 100%;
    height: clamp(80px, 17dvh, 140px);
    margin: 4px 0;
  }

  .story-image,
  .cover-image {
    object-fit: contain;
  }

  .illustration-placeholder > img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  /* Story text */

  .story,
  .narration,
  .dialogue-text {
    font-size: 12px;
    line-height: 1.3;
  }

  .story {
    margin-bottom: 6px;
  }

  .narration {
    margin: 5px 0;
  }

  p {
    line-height: 1.35;
  }

  .intro-text {
    font-size: 12px;
    line-height: 1.4;
  }

   .intro-story {
  font-size: 12px;
  line-height: 1.3;
}

  /* Dialogue */

  .dialogue {
    gap: 6px;
    margin: 6px 0;
  }

  .dialogue-avatar,
  .dialogue-avatar-placeholder {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
  }

  .dialogue-avatar-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .avatar-initial {
    font-size: 12px;
  }

  /* Answer choices */


.choices {
  gap: 5px;
  margin-top: 15px;
  margin-bottom: 25px;
}


  .choice {
    width: 100%;
    padding: 8px 10px;
    font-size: 12px;
    line-height: 1.3;
    border-radius: 9px;
  }

   
.question-heading {
  margin-top: 22px;
  margin-bottom: 12px;
}


  /* Navigation buttons */

.primary,
.secondary {
  padding: 7px 9px;
  font-size: 10px;
}

  .actions {
    gap: 6px;
    margin-top: 8px;
  }


  /* Progress */

  .progress {
    height: 5px;
    margin: 6px 0 4px;
  }

  /* ==================================
     RESULT PAGE — COMPACT MOBILE
  ================================== */

  .result-eyebrow {
    font-size: 10px;
  }

  .mascot-container {
    margin: 2px 0;
  }

  .mascot-placeholder,
  .mascot-image {
    width: 75px;
    height: 75px;
    max-width: 100%;
  }

  .mascot-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .result-title {
    font-size: 17px;
    line-height: 1.1;
    margin: 3px 0;
  }

  .animal-name {
    font-size: 12px;
    margin: 0 0 3px;
  }

  .result-quote {
    font-size: 10px;
    line-height: 1.2;
    margin: 3px 0;
  }

  .result-summary {
    font-size: 10px;
    line-height: 1.25;
    margin: 4px 0;
  }

  /* Two-column result cards */

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }

  .mini {
    min-width: 0;
    padding: 6px;
    border-radius: 8px;
  }

  .mini h3 {
    font-size: 10px;
    line-height: 1.2;
    margin-bottom: 3px;
  }

  .mini p,
  .mini li {
    font-size: 10px;
    line-height: 1.35;
    margin: 2px 0;
    overflow-wrap: anywhere;
  }

  /* Personality lists */

  .profile-list {
    margin: 3px 0 0;
    padding-left: 12px;
  }

  .profile-list li {
    margin-bottom: 2px;
  }

  /* Compatibility cards */

  .match-character {
    flex-direction: column-reverse;
    align-items: center;
    gap: 2px;
    margin-bottom: 3px;
    text-align: center;
  }

  .match-character h3 {
    font-size: 10px;
  }

  .match-mascot,
  .small-placeholder {
    width: 32px;
    height: 32px;
  }

  .small-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .match-label,
  .profile-label {
    font-size: 8px;
    padding: 3px 5px;
    margin-bottom: 3px;
    letter-spacing: 0;
  }

  /* Ending card */

  .ending-card {
    padding: 8px;
    border-radius: 10px;
  }

  .ending-card h3 {
    font-size: 11px;
    margin: 4px 0;
  }

  .ending-card p {
    font-size: 10px;
    line-height: 1.35;
    margin: 4px 0;
  }

  .kit {
    margin: 5px 0;
  }

  /* Tags */

  .tag {
    font-size: 9px;
    padding: 3px 5px;
    margin: 2px;
  }

  /* Other text */

  .small {
    font-size: 10px;
    line-height: 1.25;
  }

  /* Spacing */

  .divider {
    margin: 6px 0;
  }

  .grid + .divider {
    margin-top: 14px;
  }

  .actions {
    gap: 5px;
    margin-top: 6px;
  }

  footer {
    font-size: 9px;
    margin-top: 6px;
  }

   .result-description {
  font-size: 10px;
  line-height: 1.35;
}
}
/* =====================================================
   SATURDAY TYPOGRAPHY STANDARDISATION
   Original selectors, layout, colours and artwork retained.
   Reference: Saturday quiz final responsive typography.
===================================================== */
@media (max-width: 520px) {
  .brand { font-size: 14px; }
  .brand-link { font-size: 18px; }
  .pill { font-size: 10px; }
  .chapter-info { font-size: 12px; }
  .eyebrow { font-size: 10px; }
  h1 { font-size: 23px; }
  h2 { font-size: 14px; }
  h3 { font-size: 11px; }
  .story, .narration, .dialogue-text { font-size: 12px; line-height: 1.3; }
  .intro-text, .intro-story { font-size: 12px; line-height: 1.3; }
  .choice { font-size: 12px; line-height: 1.3; }
  .primary, .secondary { font-size: 10px; }
  .mascot-container + h1, .result-title { font-size: 17px; }
  .animal-name { font-size: 12px; }
  .animal-name + .muted, .result-quote { font-size: 10px; }
  .animal-name + .muted + p, .result-summary { font-size: 10px; }
  .mini h3, .match-character h3 { font-size: 10px; }
  .mini p, .mini li { font-size: 10px; line-height: 1.35; }
  .match-label, .profile-label { font-size: 8px; }
  .barrow { font-size: 9px; }
  .tag { font-size: 9px; }
  .small, .notice { font-size: 10px; }
  .footer-copyright { font-size: 9px; }
}

/* Extra Friend-specific result text, using Saturday sizing. */
@media (max-width: 520px) {
  .ending-card h3 { font-size: 11px; }
  .ending-card p { font-size: 10px; }
  .result-description { font-size: 10px; line-height: 1.35; }
  .result-description:has(> strong) { font-size: 12px; }
  footer { font-size: 9px; }
}



/* Desktop */
.logo img {
  display: block;
  height: 60px;
  width: auto;
  object-fit: contain;
}

/* Mobile */
@media (max-width: 768px) {
  .logo img {
    height: 35px;
  }
}
