@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
  font-family: 'Poppins', sans-serif;
  color: #242329;
  background: #f2f2f2;
  font-synthesis: none;
  --purple: #7251d5;
  --paper: #ffffff;
  --line: #dedbd4;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  isolation: isolate;
  background: #081123;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(rgb(8 17 35 / 65%), rgb(8 17 35 / 65%)),
    url('https://asset.kompas.com/data/2026/jagatliterasi/quiz/img/bg-body.jpg?v=202609181419') center / cover no-repeat;
  filter: blur(24px);
  clip-path: inset(0);
}
button {
  font: inherit;
  cursor: pointer;
}
button:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #a68be9;
  outline-offset: 4px;
}
html[data-input-method="pointer"] button:focus,
html[data-input-method="pointer"] [tabindex]:focus {
  outline: none;
}
button:disabled {
  cursor: default;
}
button,
[tabindex] {
  -webkit-tap-highlight-color: transparent;
}
button:hover {
  filter: brightness(0.96);
}
[hidden] {
  display: none !important;
}
.game {
  width: 360px;
  height: auto;
  min-height: 0;
  aspect-ratio: 9 / 16;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  /* background: rgb(255 255 255 / 65%); */
  /* -webkit-backdrop-filter: blur(24px) saturate(140%); */
  /* backdrop-filter: blur(24px) saturate(140%); */
  /* padding: 24px; */
  display: flex;
  flex-direction: column;
  /* border: 1px solid #ffffff80; */
  border-radius: 24px;
  /* box-shadow: 0 12px 40px rgb(36 35 41 / 8%),
    0 2px 8px rgb(36 35 41 / 4%),
    inset 0 1px 0 rgb(255 255 255 / 80%); */
}
.jagat-logo {
  position: absolute;
  top: 10px;
  left: 0;
  right: 0;
  margin: 0 auto;
  width: 80px;
  height: auto;
  z-index: 4;
  pointer-events: none;
}
.game:has(.play:not([hidden])) .jagat-logo {
  top: 35px;
}
.game:has(.instruction:not([hidden])) .jagat-logo {
  display: none;
}
.game-toolbar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  padding: max(8px, env(safe-area-inset-top))
    max(8px, env(safe-area-inset-right)) 0
    max(8px, env(safe-area-inset-left));
  pointer-events: none;
}
.game-toolbar-buttons {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  gap: 4px;
  margin: 0 auto;
}
.game-sound {
  margin-right: auto;
}
.game-share,
.game-sound {
  pointer-events: auto;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 8px;
  border: 0;
  border-radius: 50%;
  background: transparent;
}
.game-share img,
.game-sound img {
  width: 100%;
  height: auto;
}
#game-share-status {
  width: 100%;
  padding: 10px 14px;
  margin: 0;
  border-radius: 8px;
  background: #fff;
  color: #242329;
  font-size: 12px;
  pointer-events: none;
}
#game-share-status:empty {
  display: none;
}
.question-progress {
    width: 100%;
    display: flex;
    gap: 3px;
    padding: 4px 8px 0;

}
.question-progress > span {
  flex: 1;
  min-width: 0;
  height: 4px;
  border-radius: 2px;
  background: #e5e7eb;
}
.question-progress > .is-answered {
  background: #fc7235;
}
.screen {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.eyebrow {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.game:has(.welcome:not([hidden])) {
  padding: 0;
  background: #0866c4 url('https://asset.kompas.com/data/2026/jagatliterasi/quiz/img/bg.jpg?v=202609181419') center bottom / cover no-repeat;
}
.game:has(.instruction:not([hidden])) {
  background: rgb(8 17 35 / 75%);
}
.game:has(.play:not([hidden])) {
  background: url('https://asset.kompas.com/data/2026/jagatliterasi/quiz/img/bg-play.jpg?v=202609181419') center / cover no-repeat;
  overflow: hidden;
  overscroll-behavior: none;
}
html:has(.play:not([hidden])),
body:has(.play:not([hidden])) {
  overflow: hidden;
  overscroll-behavior: none;
}
.play-character {
  position: absolute;
  width: 48%;
  height: auto;
  bottom: 28%;
  z-index: 0;
  pointer-events: none;
}
.play-character-1 {
    right: -78px;
    top: 120px;
    width: 190px;
}
.play-character-2 {
    left: -90px;
    top: 221px;
    width: 190px;
}
.play .card-stage,
.play .answer-buttons {
  z-index: 1;
}
.play-book {
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 200px;
    display: block;
    z-index: 0;
    pointer-events: none;
}

.instruction {
  justify-content: center;
  align-items: center;
  cursor: pointer;
}
.instruction-confirm {
  margin-top: 20px;
  color: #fff;
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.instruction img {
  display: block;
  width: 250px;
}
.welcome {
  display: grid;
  grid-template-rows: minmax(0, 1.2fr) minmax(0, 1fr) auto;
  justify-items: center;
  gap: 8px;
  min-height: 480px;
  padding: max(24px, env(safe-area-inset-top))
    max(20px, env(safe-area-inset-right))
    max(30px, env(safe-area-inset-bottom))
    max(20px, env(safe-area-inset-left));
}
.welcome h1 {
  width: 100%;
  min-height: 0;
  margin: 0;
}

.welcome-logo {
    width: 320px;
    position: absolute;
    top: 60px;
    height: auto;
    left: 0;
    right: 0;
    margin: 0 auto;
    z-index: 5;
}

.welcome-character {
  width: 220px;
    height: auto;
    position: absolute;
    top: 310px;
    left: 0;
    right: 0;
    margin: 0 auto;
    z-index: 4;
}

.welcome-start {
    width: 250px;
    padding: 0;
    border: 0;
    background: transparent;
    position: absolute;
    top: 530px;
    left: 0;
    right: 0;
    margin: 0 auto;
}

.welcome-start img {
  display: block;
  width: 100%;
  height: auto;
}

.purple {
  color: var(--purple);
}
.intro {
  font-size: 12px;
  line-height: 1.65;
  color: #79746f;
  margin: 0;
}
.primary {
  border: 0;
  border-radius: 10px;
  min-height: 47px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 17px;
  background: var(--purple);
  color: white;
  font-size: 13px;
  font-weight: 600;
}
.primary > span {
  font-size: 22px;
  font-weight: 400;
}
.footnote {
  text-align: center;
  font-size: 9px;
  color: #8b857e;
  margin: 10px 0 0;
  line-height: 1.5;
}
.play {
  justify-content: center;
  align-items: center;
  gap: 16px;
  touch-action: none;
  user-select: none;
}
.play > * {
  flex-shrink: 0;
}
.play-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: 100%;
  margin-top: 40px;
}
.play-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.play-top .eyebrow {
  font-size: 8px;
  letter-spacing: 1px;
}
.score-pill {
  border: 1px solid #ddd2ef;
  background: #eee7f9;
  border-radius: 20px;
  padding: 5px 9px;
  font-size: 10px;
  color: var(--purple);
  display: flex;
  gap: 5px;
}
.progress-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0;
}
.progress-label h2 {
  font-size: 19px;
  letter-spacing: -0.5px;
  font-family: inherit;
  margin: 0;
}
.muted {
  color: #a39d96;
  font-size: 13px;
  font-weight: 400;
}
.progress-label > span {
  font-size: 9px;
  color: #8b857e;
}
.progress-track {
  height: 4px;
  background: #e7e1d8;
  border-radius: 4px;
  margin-top: 0;
  overflow: hidden;
}
.progress-track > div {
  height: 100%;
  width: 0;
  background: var(--purple);
  transition: width 0.25s;
}
.question-prompt {
  font-size: 11px;
  color: #79746f;
  margin: 0;
}
.card-stage {
    position: relative;
    display: flex;
    width: min(300px, calc(100% - 40px));
    margin: 0 auto;
    bottom: -15px;
}
.card-answer-labels {
  position: absolute;
  bottom: 44px;
  left: 22px;
  width: calc(100% - 44px);
  max-width: 100%;
  height: auto;
  pointer-events: none;
}
.card-under {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.card-under,
.question-card {
  background: url('https://asset.kompas.com/data/2026/jagatliterasi/quiz/img/paper-card.png?v=202609181419') center / 100% 100% no-repeat;
  border: 0;
  border-radius: 0;
  transform: var(--card-pose, none);
}
.question-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 100%;
  height: 350px;
  padding: 18px 28px 80px;
  display: flex;
  flex-direction: column;
  touch-action: pan-y;
  cursor: grab;
  user-select: none;
  will-change: transform;
}
.question-card.dragging {
  cursor: grabbing;
}
.question-preview {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  cursor: default;
}
.card-top {
  display: flex;
  justify-content: space-between;
  color: #8c857b;
  font-size: 8px;
  letter-spacing: 1.1px;
}
.question-card > p {
  font-family: inherit;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 500;
  letter-spacing: -0.7px;
  margin: auto 0;
  padding: 15px 0;
}
.card-top > span:last-child {
  font-size: 17px;
  line-height: 10px;
}
.card-bottom {
  display: none;
  color: #a29b90;
  font-size: 7px;
  letter-spacing: 1px;
  text-align: right;
}
.swipe-hint {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: #8b857e;
  margin: 0;
}
.swipe-hint > span:nth-child(2) {
  font-size: 8px;
  color: #aaa39b;
}
.answer-book-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 36px;
  bottom: -60px;
}
.answer-buttons {
    position: relative;
    display: flex;
    width: 80%;
    gap: 40px;
    margin: 0 auto;
}
.answer {
  touch-action: pan-y;
  user-select: none;
  width: 100%;
  min-width: 0;
  height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}
.answer img {
  display: block;
  width: 90px;
  height: auto;
  pointer-events: none;
}
.answer:disabled {
  opacity: 0.5;
}
.play .footnote {
  margin: 0;
}
dialog {
  position: absolute;
  inset: 0;
  margin: auto;
  width: calc(100% - 36px);
  max-width: 290px;
  border: 1px solid #e5dfd5;
  border-radius: 18px;
  padding: 25px 21px 21px;
  background: var(--paper);
  color: #242329;
  text-align: center;
}
dialog.feedback-artwork {
  padding: 0;
  border: 0;
  background: transparent;
}
.feedback-visual {
  position: relative;
}
.feedback-fact-top {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  pointer-events: none;
}
dialog #feedback-description {
    position: absolute;
    top: 265px;
    width: 230px;
    max-height: 260px;
    overflow-y: auto;
    color: #242329;
    font-size: 12px;
    line-height: 1.5;
    white-space: pre-line;
    left: 0;
    right: 0;
    margin: 0 auto;
    height: 260px;
}
#feedback-description a {
  color: #0654c5;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.feedback-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100dvh - 130px);
  object-fit: contain;
}
dialog.feedback-incorrect-fact {
  position: fixed;
  width: 100%;
  margin: 0;
  height: 100%;
  max-width: none;
  max-height: none;
  border-radius: 0;
  overflow: hidden;
}
.feedback-incorrect-fact .feedback-visual {
  width: 100%;
  height: 640px;
  top: 50%;
  transform: translateY(-50%);
}
.feedback-incorrect-fact .feedback-fact-top {
  position: absolute;
  top: 10px;
  left: 0;
  width: 200px;
  height: auto;
  pointer-events: none;
  margin: 0 auto;
  right: 0;
}
.feedback-incorrect-fact .feedback-image {
  position: absolute;
  top: -40px;
  bottom: 0;
  left: 0;
  right: 0;
  margin: auto;
  width: 380px;
  height: 500px;
  max-height: none;
  object-fit: fill;
}
dialog.feedback-incorrect-fact #feedback-description {
  max-height: min(260px, calc(100% - 325px));
}
.feedback-incorrect-fact .next-image-button {
  position: absolute;
  top: calc(50% + 235px);
  left: 0;
}
.next-image-button {
display: block;
    width: 100%;
    /* margin: 12px auto 0; */
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: transparent;
}
.next-image-button img {
  display: block;
  width: 120px;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}
.feedback-correct .next-image-button img {
  width: 200px;
}
dialog::backdrop {
  background: #27213266;
  backdrop-filter: blur(3px);
}
dialog .eyebrow {
  justify-content: center;
  color: #8b857e;
  margin: 17px 0 8px;
  font-size: 8px;
}
dialog h2 {
  font-family: inherit;
  font-size: 34px;
  letter-spacing: -1px;
  margin: 0 0 22px;
}
dialog p:not(.eyebrow) {
  font-size: 12px;
  line-height: 1.7;
  color: #79746f;
  margin: -6px 0 22px;
}
.feedback-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin: auto;
  border-radius: 50%;
  background: #e1edb8;
  color: #53682b;
  font-size: 31px;
}
.feedback-icon.incorrect {
  background: #f3dfd8;
  color: #b46349;
}
.game:has(.result:not([hidden])) {
  padding: 0;
  background: #0654c5 url('https://asset.kompas.com/data/2026/jagatliterasi/quiz/img/bg-skor.jpg?v=202609181419') center / cover no-repeat;
}
.result {
  display: flex;
  align-items: center;
  min-height: 560px;
  /* padding: max(20px, env(safe-area-inset-top)) 20px
    max(16px, env(safe-area-inset-bottom)); */
  text-align: center;
}

.result-book {
    position: absolute;
    top: 345px;
    left: 0;
    width: 250px;
    height: auto;
    z-index: 0;
    pointer-events: none;
    right: 0;
    margin: 0 auto;
}
.result > :not(.result-book) {
  z-index: 1;
}
.result-logo {
  width: 100%;
  margin: 0;
  line-height: 0;
}
.result-logo img {
    display: block;
    width: 320px;
    height: auto;
    margin: 0 auto;
    margin-top: 65px;
}
.result-restart img {
  display: block;
  width: 100%;
  height: auto;
}
.result-character-wrapper {
    width: 100%;
    height: 130px;
    position: relative;
    top: 90px;
    left: 0;
    right: 0;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}
.result-character {
  display: block;
  flex-shrink: 0;
  object-fit: contain;
}
/* Customize width and height independently for each character. */
.result-character[data-character="terkecoh"] {
    width: 220px;
    height: auto;
    position: absolute;
    left: 0;
    right: 0;
    margin: 0 auto;
    top: 10px;
}
.result-character[data-character="jeli"] {
    width: 186px;
    height: auto;
    position: absolute;
    top: 25px;
    left: 0;
    right: 0;
    margin: 0 auto;
}
.result-character[data-character="paling-jeli"] {
    width: 180px;
    height: auto;
    position: absolute;
    left: 0;
    right: 0;
    top: -5px;
    margin: 0 auto;
}
.result-character[data-character="jenius"] {
  width: 290px;
    height: auto;
    position: absolute;
    left: 0;
    right: 0;
    top: 10px;
    margin: 0 auto;
}
#result-message {
    color: white;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
    text-shadow: 0 2px 3px rgb(0 0 0 / 65%);
    padding: 0 35px;
    position: absolute;
    top: 260px;
    left: 0;
    right: 0;
    margin: 0 auto;
}
.result-score {
    width: 110px;
    height: auto;
    aspect-ratio: 812 / 749;
    background: url(https://asset.kompas.com/data/2026/jagatliterasi/quiz/img/wrapper-skor-user.png?v=202609181419) center / contain no-repeat;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 295px;
}
.result-score-label {
  color: #764fb9;
  font-size: 12px;
  font-weight: 600;
}
.result-score strong {
  display: block;
  color: #0654c5;
  font-size: 32px;
  line-height: 1.2;
}
.result-breakdown {
  position: absolute;
  top: 385px;
  left: 0;
  right: 0;
  width: 200px;
  max-width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin: 0 auto;
  color: #242329;
  font-size: 12px;
}
.result-breakdown dt {
  color: #000;
}
.result-breakdown dd {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
}
.result-breakdown > div:first-child {
  color: #15803d;
}
.result-breakdown > div:last-child {
  color: #dc2626;
}
.result-actions {
    width: 100%;
    padding: 0;
    position: absolute;
    top: 470px;
}
.result-logo {
  position: absolute;
  top: 0;
}
.result-share > p {
    margin: 10px auto 0;
    max-width: 240px;
    color: white;
    font-size: 11px;
    line-height: 1.5;
}
.share-icons {
  display: flex;
  justify-content: center;
  gap: 8px;
}
.share-icons button,
.share-icons a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 5px;
  border: 0;
  border-radius: 50%;
  background: transparent;
}
.share-icons img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}
#share-status:empty {
  display: none;
}
.result-restart {
    display: block;
    margin: 8px auto 0;
    width: 200px;
    max-width: 100%;
    border: 0;
    border-radius: 12px;
    padding: 0;
    background: transparent;
}
@media (max-width: 640px) {
  .game {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    aspect-ratio: auto;
    border: 0;
    border-radius: 0;
    /* padding-top: max(24px, env(safe-area-inset-top));
    padding-right: max(24px, env(safe-area-inset-right));
    padding-bottom: max(24px, env(safe-area-inset-bottom));
    padding-left: max(24px, env(safe-area-inset-left)); */
  }

  dialog {
    position: fixed;
    width: calc(100% - 48px);
    max-width: 340px;
  }
}

@media (max-width: 375px) {
  .feedback-incorrect-fact .feedback-image {
    width: 100%;
  }
  dialog #feedback-description {
    width: 100%;
    padding: 0 70px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
