.library-banner {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 24px;
  background: #16483f url(../assets/sambutan.webp) center 43% / cover;
  color: white;
  min-height: 210px;
  display: grid;
  align-items: center;
  padding: 30px clamp(20px, 5vw, 66px);
}
.library-banner:before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(17, 49, 38, 0.94), rgba(17, 49, 38, 0.7) 44%, transparent 78%);
}
.library-banner h1,
.activity-card h1,
.activity-result h1 {
  margin: 8px 0;
  font-size: clamp(27px, 4vw, 49px);
  line-height: 1.1;
  letter-spacing: -0.048em;
}
.library-banner .eyebrow {
  color: #efcf89;
}
.library-banner p {
  max-width: 33ch;
  margin: 10px 0 16px;
  font-size: 17px;
}
.library-count,
.trail-place,
.stage-label,
.stage-footer span,
.trail-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.filter-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.more-filters summary {
  cursor: pointer;
  font-weight: 800;
}
.resume-trail {
  margin-top: 10px;
}
@media (min-width: 651px) {
  .more-filters[open] > summary {
    display: none;
  }
}
@media (max-width: 650px) {
  .more-filters {
    flex-basis: 100%;
  }
  .filter-fields {
    margin-top: 8px;
  }
  .library-banner {
    padding-block: 18px;
    min-height: 155px;
  }
}
.library-count {
  color: #fff4d1;
  font-weight: 800;
}
.library-filters,
.band-picks,
.ink-palette,
.activity-result .actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.zone-map {
  margin-top: 18px;
}
.zone-map summary {
  cursor: pointer;
  font-weight: 800;
}
.library-filters {
  justify-content: flex-start;
  margin: 23px 0;
}
.library-filters label {
  display: flex;
  gap: 8px;
  align-items: center;
  font-weight: 800;
}
.library-filters select {
  width: auto;
  max-width: 100%;
  margin: 0;
}
.trail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(205px, 100%), 1fr));
  gap: 16px;
  margin-bottom: 30px;
}
.tone-0 {
  --wash: #f6e3e4;
  --bright: #88445d;
  --shade: #ebbdca;
}
.tone-1 {
  --wash: #e0ebf3;
  --bright: #355c7b;
  --shade: #b4cfdf;
}
.tone-2 {
  --wash: #f9e7c7;
  --bright: #805123;
  --shade: #eac68d;
}
.tone-3 {
  --wash: #eee6f4;
  --bright: #70527e;
  --shade: #cab8dc;
}
.trail-card {
  display: flex;
  flex-direction: column;
  text-align: left;
  background: #fffef9;
  border: 1px solid #d8ddcd;
  border-radius: 18px;
  overflow: hidden;
  padding: 0;
  color: inherit;
  box-shadow: 0 3px 0 #dce1d233;
  transition:
    transform 0.18s,
    box-shadow 0.18s;
}
.trail-card:hover,
.trail-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 7px 16px #203c2220;
}
.trail-art {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 137px;
  background: radial-gradient(ellipse at 65% 95%, var(--shade), transparent 55%), var(--wash);
  overflow: hidden;
}
.trail-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 55%;
}
.trail-place {
  position: absolute;
  left: 9px;
  top: 9px;
  font-size: 11px;
  font-weight: 900;
  color: var(--bright);
  background: #fffaf0e8;
  border-radius: 15px;
  padding: 3px 7px;
}
.trail-info {
  padding: 15px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  flex: 1;
}
.trail-info strong {
  font-size: 19px;
  line-height: 1.2;
}
.trail-info small {
  color: #536451;
  line-height: 1.45;
  font-size: 14px;
}
.trail-state {
  font-size: 13px;
  font-weight: 850;
  color: var(--bright);
  padding-top: 8px;
  margin-top: auto;
}
.activity-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
  gap: 22px;
  align-items: start;
  margin-bottom: 36px;
}
.activity-card {
  min-width: 0;
}
.activity-card h1 {
  font-size: clamp(25px, 3vw, 37px);
}
.activity-card .eyebrow {
  color: var(--bright);
}
.activity-card .game-action {
  margin: 18px 0 12px;
}
.stage-card {
  position: sticky;
  top: 18px;
  min-width: 0;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid #d2ddbf;
  background: linear-gradient(#c5e4eb, #e7f0d5 62%, #d7e6bf);
}
.theme-hutan {
  background: linear-gradient(#b6d8d3, #eff1cd 63%, #c6d9a9);
}
.theme-buku {
  background: linear-gradient(#d7e2f1, #f5ecdc 67%, #dedfca);
}
.theme-pasar {
  background: linear-gradient(#c3e4e3, #ffebbd 64%, #dfd6b1);
}
.theme-makmal {
  background: linear-gradient(#d4dced, #e9e7ef 65%, #cbdac6);
}
.stage-label {
  position: absolute;
  left: 16px;
  top: 15px;
  z-index: 1;
  background: #fffff1e6;
  color: #35523b;
  border-radius: 20px;
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 850;
}
.mini-stage {
  height: clamp(275px, 31vw, 440px);
}
.mini-stage canvas,
.mini-stage img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.stage-card canvas {
  background: linear-gradient(180deg, #fff6db08, #eef3cf30), url(../assets/lembah-kiki.webp) center / cover;
}
.mini-stage [hidden] {
  display: none;
}
.stage-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #fffbedc9;
  font-size: 13px;
  color: #405943;
  gap: 8px;
}
.coplay-note {
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: 13px;
  color: #516856;
}
.coplay-note svg {
  flex: none;
}
.demo-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 10px 0;
}
.demo-steps li {
  background: #fffdf1;
  border: 1px solid #c2ceaf;
  border-radius: 10px;
  padding: 7px 9px;
  animation: example-step 2.8s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.42s);
}
@keyframes example-step {
  20% {
    background: #ffdf93;
    transform: translateY(-2px);
  }
  50% {
    transform: none;
  }
}
.postcard-sent > img {
  animation: letter-delivery 0.75s ease-out;
}
@keyframes letter-delivery {
  from {
    transform: translateX(-35px) rotate(-10deg);
    opacity: 0.1;
  }
  to {
    transform: none;
    opacity: 1;
  }
}
.activity-tiles,
.experiments,
.pieces,
.ink-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
.activity-tile {
  flex: 1 1 75px;
  min-width: 0;
  min-height: 53px;
  max-width: 100%;
  overflow-wrap: anywhere;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 3px;
  background: #fffef8;
  color: #253b31;
  border: 2px solid #d2d8c8;
  border-radius: 13px;
  padding: 9px 12px;
  font: inherit;
  font-weight: 800;
  line-height: 1.3;
}
.activity-tile.chosen,
.activity-tile:focus-visible {
  background: var(--wash);
  border-color: var(--bright);
}
.activity-tile:disabled {
  opacity: 0.48;
}
.tile-picture,
.word-picture {
  font-size: 33px;
  line-height: 1.25;
}
.word-picture {
  text-align: center;
  font-size: 60px;
}
.arc-target,
.receipt,
.word-example,
.reveal-cover,
.lamp-train,
.experiments > div {
  background: #f4f4e9;
  border-radius: 12px;
  padding: 12px;
  color: #364b3c;
}
.arc-target {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  min-height: 55px;
  border: 2px dashed #a2b49d;
}
.receipt {
  margin: 10px 0;
  font-weight: 800;
}
.receipt output {
  display: inline-block;
  margin-left: 8px;
  font-size: 25px;
}
.word-example {
  font-weight: 900;
  font-size: 30px;
  letter-spacing: 5px;
  text-align: center;
  margin: 12px 0;
}
.reveal-cover {
  padding: 22px;
  background: var(--wash);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}
.reveal-cover strong {
  font-size: 38px;
  color: var(--bright);
}
.lamp-train {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 23px;
  flex-wrap: wrap;
}
.activity-card details summary {
  cursor: pointer;
  padding: 8px 0;
}
.voice-caption {
  display: block;
  margin-top: 9px;
  color: #4c5e50;
}
.voice-caption:empty {
  display: none;
}
.trail-trace {
  position: relative;
  height: 190px;
  border-radius: 16px;
  background: linear-gradient(135deg, #f9e9c8, #e9d4aa);
  margin: 14px 0;
  touch-action: none;
}
.trail-trace svg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.trail-trace svg,
.trail-trace svg polyline {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: #a18a64;
  stroke-width: 1;
  stroke-dasharray: 3 2;
}
.trail-dot {
  z-index: 1;
  position: absolute;
  transform: translate(-50%, -50%);
  width: 38px;
  height: 38px;
  border: 2px solid #a08a65;
  border-radius: 50%;
  background: #fff7db;
  color: #564b32;
  font: inherit;
  font-weight: 900;
}
.trail-dot:active {
  transform: translate(-50%, -50%);
}
.trail-dot.next {
  outline: 4px solid #f7c864;
  background: #fff9e4;
}
.trail-dot.done {
  background: #3e7154;
  color: white;
}
.ink-palette i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 5px;
}
#sketch {
  touch-action: none;
  background: #fffdf3;
  border: 2px solid #d5d8c3;
  width: 100%;
  height: 175px;
  border-radius: 15px;
  cursor: crosshair;
  display: block;
}
.route-map {
  margin: 12px auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  max-width: 200px;
  border-radius: 16px;
  background: #bfcead;
  padding: 7px;
}
.route-map span {
  display: grid;
  place-items: center;
  border-radius: 8px;
  aspect-ratio: 1.4;
  font-size: 24px;
}
.route-map .open {
  background: #fbefc5;
}
.route-map .visited {
  background: #edce88;
}
.route-map .wall {
  background: #98b48c;
}
.data-table {
  border-collapse: collapse;
  width: 100%;
  margin: 14px 0;
}
.data-table caption {
  text-align: left;
  font-weight: 800;
}
.data-table th,
.data-table td {
  border-bottom: 1px solid #d9ddcf;
  padding: 7px;
  text-align: left;
}
.news-sheet,
.postcard-face {
  background: #fffae8;
  border: 1px solid #d9ccac;
  border-radius: 10px;
  padding: 16px 20px;
  margin: 12px 0;
}
.news-sheet > b {
  letter-spacing: 0.03em;
  border-bottom: 2px solid #9da88b;
  display: block;
  padding-bottom: 8px;
  color: #36513f;
}
.news-phrase {
  display: inline;
  text-align: left;
  padding: 4px;
  background: transparent;
  border: 0;
  color: #314434;
  font: inherit;
  line-height: 1.5;
}
.news-phrase.marked {
  background: #f7dc84;
  border-radius: 4px;
}
.postcard-face {
  position: relative;
  box-shadow: 0 4px 10px #4b4a3820;
  animation: letter-delivery 0.7s ease-out;
}
.postcard-face > span {
  float: right;
  background: #bedbcd;
  border: 3px dotted #fff8df;
  padding: 4px 8px;
  color: #43654e;
}
.postcard-face > strong {
  display: block;
}
.clock-face {
  position: relative;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 4px solid #56816d;
  margin: 12px auto;
  background: repeating-conic-gradient(from -1deg, #c1cbbb 0deg 2deg, transparent 2deg 30deg), #fffcf0;
}
.clock-face:before {
  content: '';
  position: absolute;
  inset: 8%;
  background: #fffcf0;
  border-radius: 50%;
}
.clock-face b {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
}
.clock-face i {
  position: absolute;
  width: 5px;
  height: 26%;
  background: #a75b62;
  bottom: 50%;
  left: calc(50% - 2.5px);
  transform-origin: bottom;
  border-radius: 6px;
}
.clock-face i.minute-hand {
  height: 35%;
  background: #315c65;
  width: 3px;
}
.clock-face em {
  position: absolute;
  top: 46%;
  left: 46%;
  background: #334f47;
  border-radius: 50%;
  width: 8%;
  height: 8%;
}
.measuring-jug {
  margin: 12px auto;
  width: 84px;
  height: 95px;
  border: 3px solid #689dae;
  border-top: 0;
  position: relative;
  border-radius: 0 0 12px 12px;
  background: repeating-linear-gradient(to top, transparent 0 9%, #a0bec140 9% 10%);
  overflow: hidden;
}
.measuring-jug i {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: #80c9da99;
  transition: height 0.25s;
}
.outline-shape {
  font-size: 26px;
  color: var(--wash);
  -webkit-text-stroke: 1px var(--bright);
}
.activity-result {
  padding: 26px clamp(20px, 5vw, 58px);
  max-width: 750px;
  margin: 10px auto 40px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--wash), #fffdf5);
  border: 1px solid var(--shade);
}
.activity-result > img {
  width: 90px;
  height: 90px;
  object-fit: contain;
}
.activity-result .notice {
  margin: 18px 0;
  background: #fffbed;
}
.result-answer {
  font-weight: 800;
}
.activity-result p {
  overflow-wrap: anywhere;
}
.activity-result .notice p {
  margin: 6px 0;
}
@media (max-width: 840px) {
  .activity-layout {
    grid-template-columns: 1fr;
  }
  .stage-card {
    position: relative;
    top: auto;
  }
  .mini-stage {
    height: 240px;
  }
  .trail-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(165px, 100%), 1fr));
  }
  .library-banner {
    min-height: 180px;
  }
}
@media (max-width: 550px) {
  .stage-footer {
    padding: 7px 12px;
  }
  .mini-stage {
    height: 200px;
  }
  .library-filters label {
    font-size: 13px;
  }
  .library-filters {
    gap: 12px;
  }
  .trail-grid {
    gap: 9px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .trail-info {
    padding: 10px;
  }
  .trail-info strong {
    font-size: 16px;
  }
  .trail-info small {
    font-size: 12px;
  }
  .trail-art {
    height: 112px;
  }
  .activity-layout {
    gap: 10px;
  }
  .activity-card {
    padding: 16px;
  }
  .library-banner:before {
    background: linear-gradient(90deg, #18382cea, #18382ca6 65%, #18382c40);
  }
  .stage-label {
    font-size: 11px;
    top: 8px;
    left: 10px;
  }
  .hero-text .actions {
    flex-wrap: wrap;
  }
}
@media (prefers-reduced-motion: reduce) {
  .trail-card,
  .measuring-jug i {
    transition: none;
  }
}
.no-motion .trail-card,
.no-motion .measuring-jug i {
  transition: none;
}
.contrast .activity-tile {
  border-color: #202c20;
}
.large .activity-tile {
  font-size: 1.16rem;
}

/* Skrin hasil akhir cabaran 3 pusingan */
.final-result .hasil-hero { display: flex; align-items: center; gap: 18px; }
.final-result .hasil-hero h1 { margin: 4px 0 2px; }
.hasil-title { margin: 0; font-weight: 700; color: var(--bright); }
.hasil-kiki { width: 112px; height: 112px; object-fit: contain; flex: none; transform-origin: 50% 90%; animation: hasil-lompat 1.1s cubic-bezier(.3,1.6,.5,1) both, hasil-goyang 2.6s ease-in-out 1.1s infinite; }
@keyframes hasil-lompat { from { transform: translateY(40px) scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes hasil-goyang { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg) translateY(-4px); } }
.hasil-card { margin: 18px 0 8px; padding: 18px 18px 14px; border-radius: 18px; background: #fff; border: 1px solid var(--shade); box-shadow: 0 10px 26px rgba(40, 60, 30, .08); }
.hasil-card h2 { margin: 0 0 6px; font-size: 1.05rem; letter-spacing: .06em; text-transform: uppercase; color: var(--bright); }
.hasil-rounds { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 8px; }
.hasil-rounds li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 14px; border-radius: 12px; background: var(--wash); opacity: 0; animation: hasil-masuk .45s ease-out forwards; }
.hasil-rounds li:nth-child(1) { animation-delay: .5s; }
.hasil-rounds li:nth-child(2) { animation-delay: .8s; }
.hasil-rounds li:nth-child(3) { animation-delay: 1.1s; }
.hasil-rounds li.gold { background: #fff4cf; box-shadow: none; color: inherit; }
@keyframes hasil-masuk { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }
.hasil-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.hasil-stats span { padding: 10px 6px; border-radius: 12px; background: #f6f8f1; font-size: .82rem; color: #5b6656; }
.hasil-stats b { display: block; font-size: 1.35rem; color: #26331f; }
.hasil-learn { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: #eef6ff; }
.hasil-learn small { display: block; margin-top: 4px; color: #50627a; }
@media (max-width: 520px) { .final-result .hasil-hero { flex-direction: column; text-align: center; } }
@media (prefers-reduced-motion: reduce) { .hasil-kiki, .hasil-rounds li { animation: none; opacity: 1; } }
.sketch-wrap{position:relative;border-radius:15px;background:#eaf4ff;overflow:hidden;border:2px solid #d5d8c3}
.sketch-wrap .awan-garis{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.sketch-wrap #sketch{position:relative;background:transparent;border:0;height:auto;aspect-ratio:6/5;width:100%;min-height:260px}
.paint .ink-palette .chip{min-height:48px;min-width:48px;font-size:15px}
.paint .ink-palette i{width:22px;height:22px;vertical-align:middle}
.paint .pieces .chip{min-height:48px}
@media (max-width:840px){
  .activity-layout.paint .activity-card{order:-1;display:flex;flex-direction:column}
  .activity-layout.paint .stage-card{order:2}
  .activity-layout.paint .activity-card .coplay-note{order:20;margin-top:10px}
  .activity-layout.paint .activity-card h1{font-size:22px;margin:2px 0}
  .activity-layout.paint .activity-card .prompt{margin:2px 0 8px}
  .activity-layout.paint .mini-stage{max-height:160px}
}
