/* ==========================================================================
   UPLINK — THE GREAT EXPEDITION · a playable journey
   UI layer over the canvas world. Palette from asset/logo.png.
   ========================================================================== */
:root {
  --ink: #04100a;
  --pine: #0d2f18;
  --moss: #1b5e20;
  --leaf: #3f8f22;
  --grass: #62b52a;
  --lime: #9be23a;
  --glow: #dcf79b;
  --cloud: #f4faef;
  --mist: #a9c2a3;
  --gold: #e8c876;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Outfit", "Segoe UI", system-ui, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; overflow: hidden; }

body {
  font-family: var(--font-body);
  font-weight: 300;
  background: var(--ink);
  color: var(--cloud);
  line-height: 1.65;
  user-select: none;
}

#world { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }

/* film grain */
.grain {
  position: fixed;
  inset: -100px;
  z-index: 3;
  pointer-events: none;
  opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(4) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 25% { transform: translate(-30px, 22px); }
  50% { transform: translate(16px, -26px); } 75% { transform: translate(-14px, -38px); }
  100% { transform: translate(24px, 12px); }
}

button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--leaf); color: var(--cloud); }

.keycap {
  display: inline-grid;
  place-items: center;
  min-width: 1.7em;
  height: 1.7em;
  padding: 0 .4em;
  border: 1px solid rgba(155, 226, 58, .5);
  border-bottom-width: 3px;
  border-radius: .45em;
  background: rgba(13, 47, 24, .8);
  color: var(--glow);
  font-size: .78em;
  font-weight: 500;
  letter-spacing: .05em;
}

/* ================= START SCREEN ================= */
#start {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  text-align: center;
  background: radial-gradient(90% 80% at 50% 42%, #0a2413, #03100a 85%);
  cursor: pointer;
  transition: opacity 1s ease, visibility 1s;
}
#start.gone { opacity: 0; visibility: hidden; }
#start img {
  width: clamp(110px, 16vw, 170px);
  margin-inline: auto;
  filter: drop-shadow(0 8px 34px rgba(155, 226, 58, .45));
  animation: breathe 3s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-8px) scale(1.04); }
}
#start h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.6rem, 4.5vw, 3rem);
  letter-spacing: .3em;
  margin-top: 1.6rem;
  color: var(--glow);
  text-indent: .3em;
}
#start .studio { font-size: .7rem; letter-spacing: .5em; text-transform: uppercase; color: var(--mist); margin-top: .6rem; text-indent: .5em; }
#start .tagline {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--mist);
  margin-top: 1.8rem;
  font-size: clamp(.95rem, 2vw, 1.15rem);
}
#start .press {
  margin-top: 2.6rem;
  font-size: .8rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--lime);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }
#start .legend {
  margin-top: 2.2rem;
  display: flex;
  gap: 2.2rem;
  justify-content: center;
  flex-wrap: wrap;
  font-size: .8rem;
  color: var(--mist);
}
#start .legend span + span { margin-left: .3em; }

/* ================= HUD ================= */
#hud { opacity: 0; transition: opacity 1s .4s; pointer-events: none; }
#hud.show { opacity: 1; }

.hud-top {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: .8rem clamp(1rem, 3vw, 2rem);
  background: linear-gradient(rgba(2, 8, 4, .72), transparent);
}
.hud-top > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: .6rem; }
.brand img { width: 40px; height: 40px; object-fit: contain; filter: drop-shadow(0 2px 10px rgba(155, 226, 58, .4)); }
.brand b { font-weight: 500; letter-spacing: .14em; font-size: .8rem; }
.brand small { display: block; font-size: .52rem; letter-spacing: .3em; color: var(--mist); font-weight: 300; }

.quest { flex: 1; text-align: center; min-width: 0; }

/* mobile: give the objective its own full row under the logo */
@media (max-width: 720px) {
  .hud-top {
    flex-wrap: wrap;
    gap: .3rem .8rem;
    padding-bottom: .55rem;
    background: linear-gradient(rgba(2, 8, 4, .82), rgba(2, 8, 4, .35) 80%, transparent);
  }
  .brand { order: 1; }
  .brand img { width: 34px; height: 34px; }
  .hud-toggles { order: 2; margin-left: auto; }
  #sound-btn { padding: .4rem .8rem; }
  .quest { order: 3; flex-basis: 100%; }
  .obj-line { white-space: normal; line-height: 1.35; }
}
.quest .q-label { font-size: .56rem; letter-spacing: .4em; text-transform: uppercase; color: var(--lime); }
.obj-line { font-family: var(--font-display); font-size: clamp(.9rem, 1.8vw, 1.1rem); color: var(--cloud); text-shadow: 0 2px 14px rgba(1, 8, 4, .9); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#counters { font-size: .62rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); margin-top: .15rem; }
#chapter-help {
  display: inline-grid;
  place-items: center;
  width: 1.35em; height: 1.35em;
  margin-left: .35em;
  vertical-align: middle;
  border-radius: 50%;
  border: 1px solid rgba(155, 226, 58, .55);
  background: rgba(13, 47, 24, .7);
  color: var(--lime);
  font-size: .72em;
  font-weight: 600;
  transition: transform .3s var(--ease), box-shadow .3s, color .3s;
}
#chapter-help:hover {
  transform: scale(1.2);
  color: var(--glow);
  box-shadow: 0 0 12px rgba(155, 226, 58, .6);
}

.hud-toggles { display: flex; gap: .5rem; }
#sound-btn, #voice-btn {
  font-size: .6rem;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--mist);
  border: 1px solid rgba(155, 226, 58, .3);
  border-radius: 999px;
  padding: .5rem 1rem;
  background: rgba(4, 16, 10, .5);
  transition: color .3s, border-color .3s;
}
#sound-btn:hover, #sound-btn.is-on, #voice-btn:hover, #voice-btn.is-on { color: var(--glow); border-color: var(--lime); }

/* bottom-left reader's guide button */
#guide-btn {
  position: fixed;
  left: 1.1rem;
  bottom: 1.1rem;
  z-index: 22;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .65rem 1.1rem .65rem .8rem;
  border-radius: 999px;
  border: 1px solid rgba(155, 226, 58, .35);
  background: rgba(4, 16, 10, .65);
  color: var(--glow);
  backdrop-filter: blur(6px);
  transition: border-color .3s, transform .3s var(--ease), box-shadow .3s;
}
#guide-btn:hover { border-color: var(--lime); transform: translateY(-3px); box-shadow: 0 8px 24px rgba(155, 226, 58, .2); }
#guide-btn svg { width: 20px; height: 20px; flex: 0 0 20px; }
#guide-btn span { text-align: left; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; line-height: 1.2; }
#guide-btn small { display: block; font-size: .55rem; letter-spacing: .08em; text-transform: none; color: var(--mist); }
@media (max-width: 640px) { #guide-btn span small { display: none; } }
@media (max-width: 700px) { #guide-btn { bottom: 4rem; } }
/* perangkat sentuh: tombol panah kiri ada di kiri-bawah — naikkan tombol
   Materials ke atasnya (sejajar tombol loncat di sisi kanan) agar tak menumpuk */
@media (hover: none), (pointer: coarse) {
  #guide-btn { bottom: 8.2rem; }
}

/* progress map */
.map {
  position: fixed;
  bottom: 1.1rem;
  left: 50%;
  transform: translateX(-50%);
  width: min(520px, 74vw);
  height: 30px;
  z-index: 20;
  pointer-events: auto;
}
#map-track {
  position: absolute;
  inset: 12px 0 auto;
  height: 2px;
  background: linear-gradient(90deg, rgba(155, 226, 58, .5), rgba(155, 226, 58, .15));
  border-radius: 2px;
}
.map-dot {
  position: absolute;
  top: 50%;
  width: 11px; height: 11px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(155, 226, 58, .6);
  background: #0a2010;
  transition: transform .3s, box-shadow .3s;
}
.map-dot:hover { transform: translate(-50%, -50%) scale(1.5); box-shadow: 0 0 12px rgba(155, 226, 58, .7); }
.map-dot.gold {
  border-color: rgba(232, 200, 118, .75);
  background: #2a1c04;
  box-shadow: 0 0 8px rgba(232, 200, 118, .45);
}
.map-dot.gold:hover { box-shadow: 0 0 14px rgba(232, 200, 118, .85); }
#map-marker {
  position: absolute;
  top: 12px;
  width: 9px; height: 9px;
  transform: translate(-50%, -50%) rotate(45deg);
  background: var(--glow);
  box-shadow: 0 0 12px rgba(220, 247, 155, .9);
  pointer-events: none;
  transition: left .15s linear;
}

/* walk buttons (touch) */
.walk-btns {
  position: fixed;
  bottom: 3.4rem;
  left: 1.2rem;
  right: 1.2rem;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}
.walk-btns button {
  pointer-events: auto;
  width: 62px; height: 62px;
  border-radius: 50%;
  border: 1px solid rgba(155, 226, 58, .4);
  background: rgba(4, 16, 10, .55);
  display: grid;
  place-items: center;
  color: var(--glow);
  touch-action: none;
}
.walk-btns svg { width: 22px; height: 22px; }
#btn-act {
  position: fixed;
  bottom: 3.4rem;
  right: 50%;
  transform: translateX(50%) scale(.6);
  z-index: 21;
  width: 66px; height: 66px;
  border-radius: 50%;
  border: 1px solid var(--lime);
  background: rgba(27, 94, 32, .75);
  color: var(--glow);
  font-weight: 600;
  font-size: 1.2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s, transform .3s var(--ease);
}
#btn-act.show { opacity: 1; transform: translateX(50%) scale(1); pointer-events: auto; }
@media (hover: hover) and (pointer: fine) {
  .walk-btns, #btn-act { display: none; }
}

/* hint bubble above landmarks */
#hint {
  position: fixed;
  top: 0; left: 0;
  z-index: 18;
  pointer-events: auto;
  cursor: pointer;
  opacity: 0;
  transition: opacity .3s;
}
#hint.show { opacity: 1; }
#hint .bubble {
  transform: translate(-50%, -100%);
  display: flex;
  align-items: center;
  gap: .55rem;
  white-space: nowrap;
  background: rgba(4, 16, 10, .82);
  border: 1px solid rgba(155, 226, 58, .45);
  border-radius: 999px;
  padding: .45rem .95rem .45rem .55rem;
  font-size: .78rem;
  color: var(--glow);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .45), 0 0 20px rgba(155, 226, 58, .12);
  animation: bubble-bob 2.2s ease-in-out infinite;
}
@keyframes bubble-bob { 0%, 100% { margin-top: 0; } 50% { margin-top: -5px; } }

/* subtitles */
#subtitle {
  position: fixed;
  bottom: 4.6rem;
  left: 50%;
  transform: translate(-50%, 10px);
  z-index: 19;
  max-width: min(640px, 86vw);
  text-align: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(.95rem, 2vw, 1.2rem);
  color: var(--cloud);
  text-shadow: 0 2px 18px rgba(1, 6, 3, 1), 0 0 40px rgba(1, 6, 3, .8);
  opacity: 0;
  transition: opacity .7s, transform .7s var(--ease);
  pointer-events: none;
}
#subtitle.show { opacity: 1; transform: translate(-50%, 0); }

/* chapter title card */
#zonecard {
  position: fixed;
  inset: 0;
  z-index: 17;
  display: grid;
  place-items: center;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity .8s;
}
#zonecard.show { opacity: 1; }
#zonecard h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.2rem, 7vw, 4.6rem);
  color: var(--cloud);
  text-shadow: 0 6px 60px rgba(1, 8, 4, .95);
  letter-spacing: .02em;
  transform: translateY(14px);
  transition: transform .8s var(--ease);
}
#zonecard.show h2 { transform: none; }
#zonecard p {
  font-size: .72rem;
  letter-spacing: .45em;
  text-transform: uppercase;
  color: var(--lime);
  margin-top: 1rem;
}

/* finale overlay */
#finale {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  text-align: center;
  background: radial-gradient(80% 70% at 50% 45%, rgba(20, 40, 12, .55), rgba(2, 8, 4, .88));
  opacity: 0;
  visibility: hidden;
  transition: opacity 1.2s, visibility 1.2s;
}
#finale.show { opacity: 1; visibility: visible; }
#finale .kicker { font-size: .7rem; letter-spacing: .5em; text-transform: uppercase; color: var(--gold); }
#finale h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 6vw, 4rem);
  max-width: 18ch;
  margin: 1rem auto 0;
}
#finale h2 em { font-style: italic; color: var(--glow); }
#finale p { color: var(--mist); max-width: 46ch; margin: 1.2rem auto 0; }
#finale .row { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-top: 2.2rem; }

/* ================= BUTTONS ================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  padding: .95rem 1.8rem;
  border-radius: 999px;
  transition: transform .35s var(--ease), box-shadow .35s;
}
.btn-primary {
  background: linear-gradient(120deg, var(--leaf), var(--grass) 55%, var(--lime));
  color: #06210c;
  box-shadow: 0 8px 28px rgba(98, 181, 42, .35);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 14px 40px rgba(155, 226, 58, .5); }
.btn-ghost { border: 1px solid rgba(155, 226, 58, .4); color: var(--glow); background: rgba(244, 250, 239, .04); }
.btn-ghost:hover { border-color: var(--lime); transform: translateY(-3px); }

/* ================= DIALOG PANELS ================= */
dialog::backdrop { background: rgba(1, 6, 3, .78); backdrop-filter: blur(6px); }
dialog {
  margin: auto;
  width: min(640px, 92vw);
  max-height: 84vh;
  overflow-y: auto;
  border: 1px solid rgba(155, 226, 58, .4);
  border-radius: 18px;
  background:
    repeating-linear-gradient(0deg, rgba(155, 226, 58, .04) 0 1px, transparent 1px 4px),
    linear-gradient(170deg, rgba(13, 47, 24, .97), rgba(4, 16, 10, .99));
  color: var(--cloud);
  padding: clamp(1.6rem, 4vw, 2.5rem);
  box-shadow: 0 0 80px rgba(155, 226, 58, .2);
  user-select: text;
}
dialog[open] { animation: holo-in .5s var(--ease); }
@keyframes holo-in {
  from { opacity: 0; transform: translateY(28px) scaleY(.88); filter: brightness(2) blur(3px); }
  to { opacity: 1; transform: none; filter: none; }
}
.p-kicker { font-size: .64rem; letter-spacing: .32em; text-transform: uppercase; color: var(--leaf); }
dialog h3 { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.5rem, 3.4vw, 2rem); color: var(--glow); margin: .3rem 0 1rem; }
dialog .p-body > p, .p-body p { color: var(--mist); }
.p-body p + p, .p-body p + div, .p-body div + p { margin-top: 1rem; }
dialog .close { margin-top: 1.8rem; }
dialog strong { color: var(--cloud); font-weight: 500; }

.pic {
  display: inline-grid;
  place-items: center;
  width: 42px; height: 42px;
  flex: 0 0 42px;
  border-radius: 12px;
  border: 1px solid rgba(155, 226, 58, .3);
  background: rgba(155, 226, 58, .08);
  color: var(--lime);
}
.pic svg { width: 22px; height: 22px; }
.pic.sm { width: 30px; height: 30px; flex-basis: 30px; border-radius: 9px; }
.pic.sm svg { width: 16px; height: 16px; }

.pillars { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.4rem; }
.pillar { border: 1px solid rgba(155, 226, 58, .16); border-radius: 14px; padding: 1rem; }
.pillar h4 { font-family: var(--font-display); font-weight: 400; margin: .6rem 0 .3rem; }
.pillar p { font-size: .84rem; color: var(--mist); }
@media (max-width: 560px) { .pillars { grid-template-columns: 1fr; } }

.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .9rem;
  border-top: 1px solid rgba(155, 226, 58, .2);
  padding-top: 1.1rem;
  margin-top: 1.2rem;
}
.facts dt { font-size: .6rem; letter-spacing: .26em; text-transform: uppercase; color: var(--leaf); }
.facts dd { font-size: .92rem; margin-top: .2rem; }

.found-note {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin-top: 1.3rem;
  padding: .8rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(232, 200, 118, .3);
  background: rgba(232, 200, 118, .07);
  color: var(--gold) !important;
  font-size: .85rem;
}
.found-note .pic { color: var(--gold); border-color: rgba(232, 200, 118, .35); background: rgba(232, 200, 118, .08); }

.guides, .guide-row + .guide-row { margin-top: 1rem; }
.guide-row { display: flex; gap: 1rem; align-items: flex-start; }
.guide-row h4 { font-family: var(--font-display); font-weight: 400; font-size: 1.05rem; }
.guide-row h4 em { font-style: normal; font-size: .68rem; letter-spacing: .22em; text-transform: uppercase; color: var(--lime); }
.guide-row p { font-size: .86rem; color: var(--mist); }

/* library */
.lib-tools { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1.1rem 0 1.3rem; }
.search {
  flex: 1 1 200px;
  display: flex;
  align-items: center;
  gap: .5rem;
  background: rgba(4, 16, 10, .6);
  border: 1px solid rgba(155, 226, 58, .25);
  border-radius: 999px;
  padding: .55rem 1.1rem;
}
.search svg { width: 15px; height: 15px; color: var(--mist); flex: 0 0 15px; }
.search input { flex: 1; background: none; border: none; color: var(--cloud); font: inherit; outline: none; min-width: 0; }
.search input::placeholder { color: var(--mist); }
.cats { display: flex; flex-wrap: wrap; gap: .4rem; }
.cat {
  font-size: .62rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--mist);
  border: 1px solid rgba(155, 226, 58, .25);
  border-radius: 999px;
  padding: .45rem .85rem;
  transition: all .3s;
}
.cat:hover { color: var(--glow); border-color: var(--lime); }
.cat.is-active { background: linear-gradient(120deg, var(--leaf), var(--grass)); color: #06210c; border-color: transparent; font-weight: 500; }
.lib-row { display: flex; gap: 1rem; align-items: flex-start; padding: .9rem 0; border-top: 1px solid rgba(155, 226, 58, .12); }
.lib-row .cat-tag { font-size: .58rem; letter-spacing: .26em; text-transform: uppercase; color: var(--lime); }
.lib-row h4 { font-family: var(--font-display); font-weight: 400; font-size: 1.05rem; margin: .15rem 0 .25rem; }
.lib-row p { font-size: .85rem; color: var(--mist); }
.lib-row .meta { font-size: .62rem; letter-spacing: .2em; text-transform: uppercase; color: var(--mist); opacity: .7; }
.lib-empty { color: var(--mist); font-style: italic; padding: 1rem 0; }

/* contact form */
.field { margin-bottom: 1.2rem; }
.field label {
  display: block;
  font-size: .62rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--lime);
  margin-bottom: .45rem;
}
.field input, .field select, .field textarea {
  width: 100%;
  background: rgba(4, 16, 10, .55);
  border: 1px solid rgba(155, 226, 58, .24);
  border-radius: 10px;
  color: var(--cloud);
  font: inherit;
  padding: .8rem .95rem;
  transition: border-color .3s, box-shadow .3s;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--lime);
  box-shadow: 0 0 0 3px rgba(155, 226, 58, .15);
}
.form-note { font-size: .8rem; color: var(--mist); margin-top: .9rem; }
.form-done {
  display: none;
  margin-top: 1rem;
  padding: .9rem 1.1rem;
  border-radius: 10px;
  border: 1px solid rgba(155, 226, 58, .4);
  background: rgba(155, 226, 58, .1);
  color: var(--glow);
  font-size: .88rem;
}
.form-done.is-on { display: block; animation: holo-in .5s var(--ease); }
.contact-meta { margin-top: 1.4rem; font-size: .82rem; color: var(--mist); border-top: 1px solid rgba(155, 226, 58, .15); padding-top: 1.1rem; }
.contact-meta a { color: var(--lime); text-decoration: none; }
.contact-meta a:hover { color: var(--glow); }

/* ================= NEW: start-screen read link ================= */
.start-read {
  margin-top: 2rem;
  font-size: .72rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--mist);
  border-bottom: 1px solid rgba(155, 226, 58, .35);
  padding-bottom: .2rem;
  transition: color .3s, border-color .3s;
}
.start-read:hover { color: var(--glow); border-color: var(--lime); }

/* ================= NEW: zonecard contents line ================= */
#zonecard .tells {
  display: block;
  margin-top: 1.1rem;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(.9rem, 1.9vw, 1.1rem);
  color: var(--cloud);
  opacity: .85;
  text-shadow: 0 2px 20px rgba(1, 8, 4, 1);
}

/* ================= NEW: touch jump button ================= */
#btn-jump {
  position: fixed;
  bottom: 8.2rem;
  right: 1.2rem;
  z-index: 20;
  pointer-events: auto;   /* wajib: parent #hud pointer-events:none */
  width: 62px; height: 62px;
  border-radius: 50%;
  border: 1px solid rgba(155, 226, 58, .4);
  background: rgba(4, 16, 10, .55);
  display: grid;
  place-items: center;
  color: var(--glow);
  touch-action: none;
}
#btn-jump svg { width: 22px; height: 22px; }
@media (hover: hover) and (pointer: fine) { #btn-jump { display: none; } }

/* ================= NEW: golden promo ================= */
.btn-gold {
  background: linear-gradient(120deg, #8a6420, var(--gold) 55%, #ffe9a8);
  color: #2a1c04;
  box-shadow: 0 8px 30px rgba(232, 200, 118, .4), inset 0 1px 0 rgba(255, 255, 255, .5);
}
.btn-gold:hover { transform: translateY(-3px); box-shadow: 0 14px 44px rgba(232, 200, 118, .6); }

dialog.gold {
  border-color: rgba(232, 200, 118, .55);
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(232, 200, 118, .12), transparent 60%),
    repeating-linear-gradient(0deg, rgba(232, 200, 118, .045) 0 1px, transparent 1px 4px),
    linear-gradient(170deg, rgba(42, 30, 8, .97), rgba(10, 8, 3, .99));
  box-shadow: 0 0 100px rgba(232, 200, 118, .3);
}
dialog.gold h3 { color: #ffe9a8; }
.gold-k { color: var(--gold) !important; }
dialog.gold .field label { color: var(--gold); }
dialog.gold .field input, dialog.gold .field textarea {
  border-color: rgba(232, 200, 118, .3);
  background: rgba(10, 8, 3, .6);
}
dialog.gold .field input:focus, dialog.gold .field textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(232, 200, 118, .18);
}
dialog.gold .form-done { border-color: rgba(232, 200, 118, .5); background: rgba(232, 200, 118, .1); color: #ffe9a8; }
dialog.gold::backdrop { background: rgba(6, 4, 1, .8); }

.price-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 1.2rem 0 .9rem;
}
.price-old {
  font-size: 1.05rem;
  color: var(--mist);
  text-decoration: line-through;
  text-decoration-color: rgba(255, 130, 110, .8);
  text-decoration-thickness: 2px;
}
.price-arrow { color: var(--gold); display: grid; }
.price-arrow svg { width: 22px; height: 22px; }
.price-new {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4.5vw, 2.4rem);
  color: #ffe9a8;
  text-shadow: 0 0 30px rgba(232, 200, 118, .6);
  animation: price-glow 2.4s ease-in-out infinite;
}
@keyframes price-glow {
  0%, 100% { text-shadow: 0 0 24px rgba(232, 200, 118, .45); }
  50% { text-shadow: 0 0 44px rgba(255, 232, 150, .85); }
}
.promo-note { color: var(--mist); margin-bottom: 1.4rem; }
.gold-price { color: #ffe9a8; }

/* ================= NEW: reader's guide panel ================= */
.guide-sub { color: var(--mist); font-size: .9rem; margin-bottom: 1.4rem; }
.g-sec { border-top: 1px solid rgba(155, 226, 58, .15); padding-top: 1.3rem; margin-top: 1.5rem; }
.g-sec > h4 {
  font-size: .68rem;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--lime);
  margin-bottom: 1rem;
  font-weight: 500;
}
.g-sec .pillars { margin-top: .4rem; }
.g-facts { font-size: .72rem !important; color: var(--mist); opacity: .85; margin-top: .3rem; }
.g-facts b { color: var(--leaf); font-weight: 500; }
.g-sec .guide-row { margin-top: .9rem; }
.gold-sec { border-top-color: rgba(232, 200, 118, .35); }
.gold-sec > h4 { color: var(--gold); }
.gold-sec .btn { margin-top: .8rem; }
.g-sec .btn { margin-top: .6rem; }
.g-sec s { color: var(--mist); }

/* ================= NEW: per-project portfolio cards ================= */
dialog.wide { width: min(920px, 94vw); }

.proj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: .9rem;
  margin-top: 1.2rem;
}
.proj-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .3rem;
  padding: 1.1rem 1rem .95rem;
  border-radius: 14px;
  border: 1px solid rgba(155, 226, 58, .18);
  background: linear-gradient(165deg, rgba(155, 226, 58, .06), rgba(4, 16, 10, .6));
  transition: transform .35s var(--ease), border-color .35s, box-shadow .35s;
  overflow: hidden;
}
.proj-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, var(--lime), transparent 70%);
  opacity: .5;
}
.proj-card:hover {
  transform: translateY(-5px);
  border-color: rgba(155, 226, 58, .55);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .4), 0 0 24px rgba(155, 226, 58, .12);
}
.proj-id {
  align-self: flex-start;
  font-size: .56rem;
  letter-spacing: .24em;
  color: var(--gold);
  border: 1px solid rgba(232, 200, 118, .4);
  border-radius: 999px;
  padding: .18rem .55rem;
  margin-bottom: .35rem;
}
.proj-card h5 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.02rem;
  color: var(--cloud);
  line-height: 1.25;
}
.proj-cat { font-size: .58rem; letter-spacing: .26em; text-transform: uppercase; color: var(--lime); }
.proj-d { font-size: .8rem; color: var(--mist); flex: 1; }
.proj-tech { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .45rem; }
.proj-tech span {
  font-size: .58rem;
  letter-spacing: .08em;
  color: var(--mist);
  border: 1px solid rgba(155, 226, 58, .2);
  border-radius: 6px;
  padding: .14rem .45rem;
  background: rgba(4, 16, 10, .5);
}
.proj-link {
  margin-top: .6rem;
  align-self: flex-start;
  font-size: .64rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--glow);
  text-decoration: none;
  border-bottom: 1px solid rgba(155, 226, 58, .4);
  padding-bottom: .12rem;
  transition: color .3s, border-color .3s;
}
.proj-link:hover { color: #fff; border-color: var(--glow); }
.g-sub {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.06rem;
  color: var(--glow);
  margin-top: 1.4rem;
}
.g-sub em { font-style: normal; font-size: .64rem; letter-spacing: .22em; text-transform: uppercase; color: var(--mist); }

/* ================= NEW: readable blog chapters ================= */
.lib-body {
  display: none;
  margin: .7rem 0 .5rem;
  padding: .9rem 1rem;
  border-left: 2px solid rgba(155, 226, 58, .4);
  background: rgba(155, 226, 58, .05);
  border-radius: 0 10px 10px 0;
}
.lib-body p { font-size: .86rem; color: var(--cloud); opacity: .92; }
.lib-body p + p { margin-top: .7rem; }
.lib-row.is-open .lib-body { display: block; animation: holo-in .4s var(--ease); }
.lib-toggle {
  display: block;
  margin: .45rem 0 .3rem;
  font-size: .62rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--lime);
  border-bottom: 1px solid rgba(155, 226, 58, .35);
  padding-bottom: .15rem;
  transition: color .3s;
}
.lib-toggle:hover { color: var(--glow); }

/* ================= NEW: messenger bird ================= */
#mailbird {
  position: fixed;
  top: 0; left: 0;
  z-index: 18;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .6s;
  will-change: transform;
}
#mailbird.show { opacity: 1; pointer-events: auto; }
.mb-bird { width: 52px; height: 34px; overflow: visible; }
.mb-bird path { fill: #10240f; }
.mb-wing { transform-origin: 26px 17px; animation: mb-flap .38s ease-in-out infinite alternate; }
.mb-w1 { animation-delay: 0s; }
.mb-w2 { animation-delay: .02s; }
@keyframes mb-flap {
  from { transform: rotate(-14deg) scaleY(1); }
  to { transform: rotate(16deg) scaleY(.82); }
}
.mb-label {
  white-space: nowrap;
  font-size: .6rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--glow);
  background: rgba(4, 16, 10, .78);
  border: 1px solid rgba(155, 226, 58, .45);
  border-radius: 999px;
  padding: .32rem .8rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .4), 0 0 14px rgba(155, 226, 58, .15);
  animation: pulse 2s ease-in-out infinite;
}
#mailbird:hover .mb-label { color: #fff; border-color: var(--lime); animation: none; opacity: 1; }
#mailbird:hover .mb-bird path { fill: #1d4020; }

/* library / guide article actions */
.lib-actions { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; margin: .45rem 0 .3rem; }
.lib-actions .lib-toggle { margin: 0; }
.lib-open {
  font-size: .62rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid rgba(232, 200, 118, .4);
  padding-bottom: .15rem;
  transition: color .3s, border-color .3s;
}
.lib-open:hover { color: #ffe9a8; border-color: var(--gold); }

/* ================= NEW: motto ================= */
.motto {
  font-family: var(--font-display);
  font-style: italic;
  text-align: center;
  color: var(--gold);
  margin-top: 1.6rem;
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  letter-spacing: .04em;
}
.motto::before, .motto::after { content: " ✦ "; font-style: normal; font-size: .7em; opacity: .7; }
.motto-finale {
  margin-top: 2.6rem;
  font-size: clamp(1.15rem, 2.8vw, 1.7rem);
  text-shadow: 0 0 30px rgba(232, 200, 118, .45);
  animation: motto-in 1.4s var(--ease) both;
}
@keyframes motto-in {
  from { opacity: 0; transform: translateY(16px); letter-spacing: .2em; }
  to { opacity: 1; transform: none; letter-spacing: .04em; }
}
.motto-sub {
  text-align: center;
  font-size: .62rem;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--mist);
  margin-top: .7rem;
}
.contact-meta b { color: var(--glow); font-weight: 500; }

/* gambar artikel dari CMS di dialog dalam game */
dialog img { max-width: 100%; height: auto; border-radius: 10px; }

@media (prefers-reduced-motion: reduce) {
  .grain, #start img, #start .press, #hint .bubble, .price-new, .motto-finale { animation: none; }
}
