* { box-sizing: border-box; }

html { overflow-x: hidden; }

body {
  margin: 0;
  padding: 2em;
  position: relative;
  background: #ffffff;
  color: #000000;
  font-family: Helvetica, Arial, sans-serif;
  text-align: justify;
}

.page {
  position: relative;
  min-height: 0;
}

.back-link {
  display: inline-block;
  margin-bottom: 0;
  color: #072aec;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-decoration: none;

}

.project-title {
  margin-top: 48px;
  margin-left: 24px;
  color: #000000;
  font-family: "IBM Plex Mono",  monospace;
  font-size: 20px;
 font-weight: normal;
  letter-spacing: -0.02em;
}

.project-meta {
  margin-left: 24px;
  padding: 0;
  color: #000000;
  font-family: "IBM Plex Mono", monospace;
  font-size: 14px;
  line-height: 0.7;
  letter-spacing: 0.01em;

}

.index-instructions {
  margin-left: 24px;
  padding: 24px;
  color: #072aec;
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  line-height: 0.7;
  letter-spacing: 0.01em;
  margin-bottom: 0;
}

.expandable-menu {
  margin-left: 24px;
  padding: 12px;
  margin-bottom: 10px;
}

.menu-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toggle-btn {
  background: transparent;
  border: none;
  padding: 0;
  color: #072aec;
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  line-height: 0.7;
  letter-spacing: 0.01em;
  text-align: left;
  cursor: pointer;
}

.toggle-content {
  color: #072aec;
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: 0.01em;
  padding-left: 18px;
  padding-top: 12px;
  display: none;
}

.toggle-content.active { display: block; }

.rock-field {
  width: min(1366px, 100%);
  aspect-ratio: 1366 / 768;
  position: relative;
  isolation: isolate;
  margin: 24px auto 0;
}

.rock-sheet,
.rock-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.rock-sheet {
  display: block;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
}

.rock-map { overflow: visible; }

.rock {
  fill: rgba(35, 93, 255, 0);
  stroke: transparent;
  stroke-width: 3.5;
  vector-effect: non-scaling-stroke;
  cursor: pointer;
  transition: fill .18s ease, stroke .18s ease, filter .18s ease;
}

.rock:hover,
.rock.selected {
  fill: rgba(35, 93, 255, .055);
  stroke: #072aec;
  filter: drop-shadow(0 0 2px rgba(7, 42, 236, .18));
}

.instruction {
  margin: 1rem 0 0;
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-align: center;
}

.fortune-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 6vw;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,.35), transparent 35%),
    rgba(238, 235, 226, .68);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .35s ease, visibility .35s ease;
}

.fortune-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .18;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(0deg, rgba(60,50,35,.04) 0, rgba(60,50,35,.04) 1px, transparent 1px, transparent 4px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.12) 0, rgba(255,255,255,.12) 1px, transparent 1px, transparent 5px);
  mix-blend-mode: multiply;
}

.fortune-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.paper {
  width: min(650px, 90vw);
  min-height: 300px;
  padding: clamp(2rem, 5vw, 4rem);
  background: rgba(248, 246, 239, .9);
  border: 1px solid rgba(22,22,22,.12);
  box-shadow: 0 25px 80px rgba(0,0,0,.13);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transform: translateY(15px);
  transition: transform .4s ease;
}

.fortune-overlay.open .paper { transform: translateY(0); }

.close {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  border: 0;
  background: transparent;
  font-size: 1.7rem;
  font-weight: 200;
  cursor: pointer;
  line-height: 1;
}

.fortune-label {
  margin: 0 0 .5rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: .7rem;
  letter-spacing: .16em;
  font-weight: 700;
  opacity: .55;
}

.fortune {
  margin: 1.2rem 0 2rem;
  max-width: 560px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 18px;
  text-align: center;
  line-height: 1.08;
  font-weight: 400;
  color: #072aec;
}

.again {
  align-self: flex-start;
  border: 1px solid #000;
  background: transparent;
  padding: .7rem 1rem;
  font: inherit;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  cursor: pointer;
}

.again:hover { background: #000; color: white; }

@media (max-width: 700px) {
  body { padding: 36px; text-align: left; }

  .project-title,
  .project-meta { margin-left: 32px; }

  .project-title { margin-top: 48px; }

  .project-meta { line-height: 1.15; font-size: 12px; }

  .index-instructions {
    margin-left: 32px;
    padding: 24px 0;
    line-height: 1.15;
  }

  .expandable-menu {
    margin-left: 32px;
    padding: 12px 0;
  }

  .rock-field { margin-top: 12px; }
  .fortune-overlay { padding: 4vw; }
  .paper { min-height: 260px; padding: 2.2rem 1.5rem 1.7rem; }
}
