:root {
  --bog-ink: #171C14;
  --moss-felt: #4D6040;
  --lichen-milk: #D8D8B8;
  --mushroom-taupe: #8A7760;
  --spore-gold: #C2A447;
  --bruised-violet: #6B5C7B;
  --rust-cap: #9A573D;
  --commissioner: 'Commissioner', Inter, system-ui, sans-serif;
  --fraunces: 'Fraunces', Georgia, serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
}

/* Typography note: IBM Plex Mono is restricted to small coordinates and hashes. IBM Plex Mono** Mono* from Google Fonts appears sparingly for tiny block numbers. */

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--bog-ink); }

body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
  color: var(--lichen-milk);
  font-family: var(--commissioner);
  background: var(--bog-ink);
}

.forest-floor {
  position: relative;
  min-height: 100vh;
  padding: clamp(18px, 3vw, 42px);
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 12%, rgba(194, 164, 71, .18), transparent 25%),
    radial-gradient(circle at 78% 18%, rgba(107, 92, 123, .35), transparent 28%),
    radial-gradient(circle at 54% 62%, rgba(77, 96, 64, .52), transparent 36%),
    linear-gradient(145deg, var(--bog-ink) 0%, #20281d 38%, #11150f 100%);
}

.forest-floor::before,
.forest-floor::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .28;
}

.forest-floor::before {
  background:
    repeating-linear-gradient(45deg, transparent 0 16px, rgba(216, 216, 184, .05) 17px 19px),
    repeating-linear-gradient(-8deg, transparent 0 34px, rgba(194, 164, 71, .04) 35px 38px);
  mix-blend-mode: screen;
}

.forest-floor::after {
  background-image: radial-gradient(rgba(216,216,184,.12) 1px, transparent 1px);
  background-size: 22px 22px;
}

.mist {
  position: fixed;
  width: 55vw;
  height: 55vw;
  border-radius: 50%;
  filter: blur(42px);
  pointer-events: none;
  opacity: .35;
  animation: breathe 13s ease-in-out infinite;
}

.mist-one { left: -14vw; top: -12vw; background: rgba(216, 216, 184, .28); }
.mist-two { right: -16vw; bottom: -20vw; background: rgba(107, 92, 123, .38); animation-delay: -5s; }

.spore-field span {
  position: fixed;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--spore-gold);
  box-shadow: 0 0 14px var(--spore-gold);
  opacity: .45;
  pointer-events: none;
  animation: sporeDrift linear infinite;
}

.moss-ledger {
  position: relative;
  z-index: 2;
  width: min(1120px, 92vw);
  margin: 0 auto -18px 3vw;
  padding: clamp(24px, 5vw, 58px);
  transform: rotate(-1.4deg);
  background:
    radial-gradient(circle at 16% 18%, rgba(216,216,184,.2), transparent 17%),
    repeating-linear-gradient(90deg, rgba(216,216,184,.05) 0 9px, transparent 10px 25px),
    linear-gradient(135deg, rgba(77,96,64,.95), rgba(138,119,96,.76));
  border: 2px solid rgba(216,216,184,.24);
  border-radius: 35px 18px 44px 21px;
  box-shadow: inset 0 0 34px rgba(23,28,20,.58), 0 28px 70px rgba(0,0,0,.42);
}

.ledger-seal,
.panel-label,
code,
.ledger-coords {
  font-family: var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: 11px;
}

.ledger-seal { color: var(--spore-gold); }

h1 {
  margin: 8px 0 0;
  font-size: clamp(52px, 12vw, 148px);
  line-height: .82;
  letter-spacing: -.075em;
  font-weight: 900;
  color: var(--lichen-milk);
  text-shadow: 0 8px 0 rgba(23,28,20,.34), 0 0 30px rgba(216,216,184,.12);
}

.weather { max-width: 620px; font-weight: 300; font-size: clamp(16px, 2vw, 24px); }
.ledger-coords { color: rgba(216,216,184,.6); }

.dashboard-table {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(260px, .8fr) minmax(360px, 1.55fr) minmax(230px, .7fr);
  grid-template-rows: auto auto auto;
  gap: clamp(16px, 2.5vw, 30px);
  align-items: start;
  max-width: 1380px;
  margin: 0 auto;
}

.specimen {
  position: relative;
  transition: transform .45s ease, filter .45s ease, box-shadow .45s ease;
}

.specimen.is-focused {
  transform: translateY(-6px) scale(1.025) rotate(var(--focus-rotate, 0deg));
  filter: saturate(1.12);
  box-shadow: 0 34px 80px rgba(0,0,0,.56), 0 0 0 1px rgba(194,164,71,.34) inset;
}

.burrow-map {
  grid-column: 2;
  min-height: 580px;
  padding: 30px;
  background:
    radial-gradient(circle at 56% 50%, rgba(194,164,71,.15), transparent 35%),
    linear-gradient(160deg, rgba(23,28,20,.92), rgba(77,96,64,.67));
  border: 2px solid rgba(138,119,96,.8);
  border-radius: 42px 26px 52px 31px;
  transform: rotate(.8deg);
  overflow: hidden;
  box-shadow: inset 0 0 55px rgba(0,0,0,.5), 0 30px 80px rgba(0,0,0,.4);
}

.burrow-map h2,
.root-archive h2,
.zoom-glade h2 {
  font-family: var(--fraunces);
  font-size: clamp(30px, 4vw, 58px);
  line-height: .95;
  margin: 14px 0 18px;
  color: var(--lichen-milk);
}

.panel-label { color: var(--spore-gold); }

.iso-clearing {
  position: relative;
  min-height: 360px;
  margin-top: 18px;
  perspective: 900px;
}

.terrace {
  position: absolute;
  left: 50%;
  width: 62%;
  height: 110px;
  transform: translateX(-50%) rotateX(55deg) rotateZ(-35deg);
  border-radius: 24px 36px 28px 44px;
  border: 2px solid rgba(216,216,184,.2);
  box-shadow: 0 30px 0 rgba(23,28,20,.72), inset 0 0 36px rgba(216,216,184,.08);
}

.terrace span {
  position: absolute;
  transform: rotateZ(35deg) rotateX(-55deg);
  font-family: var(--mono);
  font-size: 10px;
  color: rgba(216,216,184,.76);
  left: 30px;
  top: 35px;
  text-transform: uppercase;
}

.terrace i {
  position: absolute;
  width: 13px;
  height: 13px;
  right: 30px;
  top: 25px;
  border-radius: 50%;
  background: var(--spore-gold);
  box-shadow: 0 0 18px var(--spore-gold);
  animation: blink 3.7s infinite;
}

.terrace-top { top: 18px; background: linear-gradient(135deg, var(--moss-felt), #6b7650); }
.terrace-mid { top: 118px; width: 74%; background: linear-gradient(135deg, var(--mushroom-taupe), var(--moss-felt)); }
.terrace-low { top: 220px; width: 84%; background: linear-gradient(135deg, #2b3226, var(--bruised-violet)); }

.root-lines {
  position: absolute;
  inset: 20px 0 0 6%;
  width: 88%;
  height: 320px;
  pointer-events: none;
}

.root-lines path {
  fill: none;
  stroke: var(--spore-gold);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 10 12;
  filter: drop-shadow(0 0 8px rgba(194,164,71,.7));
  animation: rootPulse 4.8s ease-in-out infinite;
}

.icon,
.drawer-icon {
  position: absolute;
  filter: drop-shadow(0 18px 18px rgba(0,0,0,.36));
}

.mushroom-server { left: 19%; top: 52px; width: 82px; height: 92px; }
.mushroom-server span { position: absolute; width: 82px; height: 42px; border-radius: 50% 50% 38% 38%; background: var(--rust-cap); border: 3px solid var(--spore-gold); }
.mushroom-server b { position: absolute; left: 31px; top: 35px; width: 25px; height: 55px; border-radius: 12px; background: var(--lichen-milk); box-shadow: inset 0 -16px 0 var(--mushroom-taupe); }

.acorn-vault { right: 17%; top: 133px; width: 72px; height: 86px; }
.acorn-vault span { position: absolute; inset: 18px 8px 0; border-radius: 45% 45% 55% 55%; background: var(--mushroom-taupe); border: 3px solid var(--bog-ink); }
.acorn-vault b { position: absolute; inset: 0 0 auto; height: 28px; border-radius: 50%; background: var(--moss-felt); }

.shard { left: 45%; top: 235px; width: 55px; height: 76px; }
.shard span { display: block; width: 100%; height: 100%; clip-path: polygon(50% 0, 96% 34%, 70% 100%, 12% 88%, 0 28%); background: linear-gradient(135deg, var(--lichen-milk), var(--bruised-violet)); box-shadow: inset 0 0 18px rgba(194,164,71,.5); }

.field-note { font-family: var(--fraunces); color: rgba(216,216,184,.82); font-size: 20px; }

.depth-gauge,
.mushroom-ring,
.drawer,
.root-archive,
.zoom-glade {
  background:
    repeating-linear-gradient(135deg, rgba(216,216,184,.04) 0 7px, transparent 8px 18px),
    linear-gradient(155deg, rgba(138,119,96,.83), rgba(77,96,64,.72));
  border: 2px solid rgba(216,216,184,.18);
  box-shadow: inset 0 0 24px rgba(23,28,20,.44), 0 23px 48px rgba(0,0,0,.32);
}

.depth-gauge {
  grid-column: 3;
  margin-top: 70px;
  padding: 22px;
  border-radius: 24px 44px 20px 35px;
  transform: rotate(3deg);
}

.gauge { height: 220px; width: 44px; margin: 18px auto; padding: 7px; border-radius: 30px; background: rgba(23,28,20,.72); border: 1px solid rgba(216,216,184,.25); display: flex; align-items: end; }
.gauge span { display: block; width: 100%; border-radius: 20px; background: linear-gradient(var(--spore-gold), var(--rust-cap)); box-shadow: 0 0 18px rgba(194,164,71,.55); }
.depth-gauge strong { display: block; text-align: center; font-size: 44px; color: var(--spore-gold); }
.depth-gauge p { text-align: center; margin: 4px 0 0; color: rgba(216,216,184,.75); }

.mushroom-ring {
  grid-column: 1;
  grid-row: 1;
  margin-top: 110px;
  padding: 20px;
  min-height: 260px;
  border-radius: 50%;
  transform: rotate(-5deg);
  display: grid;
  place-items: center;
}

.mushroom-ring button {
  width: 112px;
  padding: 12px 10px;
  margin: -2px;
  border: 0;
  border-radius: 50% 50% 42% 42%;
  background: linear-gradient(var(--rust-cap), #70402f);
  color: var(--lichen-milk);
  font-family: var(--commissioner);
  font-weight: 800;
  box-shadow: inset 0 -7px 0 rgba(23,28,20,.27), 0 10px 20px rgba(0,0,0,.28);
  cursor: pointer;
}

.specimen-drawers {
  grid-column: 1 / 4;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(14px, 2vw, 24px);
  margin-top: -12px;
}

.drawer {
  min-height: 230px;
  padding: 80px 20px 20px;
  border-radius: 22px 36px 28px 18px;
  transform: rotate(var(--r));
  overflow: hidden;
}

.drawer::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px dashed rgba(216,216,184,.22);
  border-radius: inherit;
  pointer-events: none;
}

.drawer-bridge { --r: -2.5deg; }
.drawer-proof { --r: 1.4deg; margin-top: 28px; }
.drawer-trace { --r: -1.2deg; }
.drawer-settle { --r: 2.6deg; margin-top: 18px; }

.drawer h3 { font-family: var(--fraunces); margin: 0 0 8px; font-size: 27px; }
.drawer p { color: rgba(216,216,184,.77); line-height: 1.45; }
.drawer code { color: var(--spore-gold); }
.drawer-icon { left: 22px; top: 18px; width: 78px; height: 52px; }
.rope-bridge span { display: block; height: 28px; border-bottom: 6px solid var(--spore-gold); border-radius: 50%; box-shadow: 0 14px 0 -9px var(--bog-ink); }
.dome span { display: block; width: 72px; height: 48px; border-radius: 50% 50% 8px 8px; background: linear-gradient(rgba(216,216,184,.55), rgba(107,92,123,.24)); border: 2px solid var(--lichen-milk); }
.roots span { display: block; width: 75px; height: 48px; border: solid var(--spore-gold); border-width: 0 0 5px 5px; border-radius: 0 0 0 70%; transform: rotate(-20deg); }
.seal span { display: block; width: 58px; height: 58px; border-radius: 50%; background: var(--rust-cap); box-shadow: inset 0 0 0 9px rgba(23,28,20,.2); }

.zoom-glade {
  grid-column: 1 / 3;
  padding: 34px;
  min-height: 230px;
  border-radius: 38px 22px 54px 24px;
  transform: rotate(-.8deg);
  background:
    radial-gradient(circle at 28% 50%, rgba(194,164,71,.2), transparent 28%),
    linear-gradient(135deg, rgba(77,96,64,.78), rgba(107,92,123,.58));
}
.glade-copy span { color: var(--spore-gold); font-family: var(--mono); text-transform: uppercase; font-size: 11px; }
.zoom-glade p { max-width: 580px; color: rgba(216,216,184,.78); font-size: 18px; }

.root-archive {
  grid-column: 3;
  padding: 30px;
  min-height: 310px;
  border-radius: 28px 52px 30px 18px;
  background: linear-gradient(180deg, rgba(23,28,20,.88), rgba(107,92,123,.4));
}

.archive-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.archive-tags span { font-family: var(--mono); font-size: 11px; color: rgba(216,216,184,.7); border: 1px solid rgba(216,216,184,.18); border-radius: 999px; padding: 8px 10px; background: rgba(23,28,20,.32); }
.buried-icons { display: flex; gap: 16px; margin-top: 32px; opacity: .6; }
.buried-icons i { width: 34px; height: 42px; border-radius: 50% 50% 10px 10px; background: var(--moss-felt); box-shadow: 0 18px 0 rgba(0,0,0,.24); animation: sink 5s ease-in-out infinite; }
.buried-icons i:nth-child(2n) { background: var(--mushroom-taupe); animation-delay: -2s; }

.spore-loupe {
  position: fixed;
  left: 0;
  top: 0;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  z-index: 20;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(.72);
  transition: opacity .28s ease, transform .28s ease;
  border: 4px solid var(--spore-gold);
  background:
    radial-gradient(circle at 32% 28%, rgba(216,216,184,.38), transparent 21%),
    radial-gradient(circle, rgba(216,216,184,.2), rgba(107,92,123,.48) 68%, rgba(23,28,20,.72));
  box-shadow: 0 0 0 12px rgba(194,164,71,.12), 0 30px 90px rgba(0,0,0,.52), inset 0 0 34px rgba(216,216,184,.22);
  backdrop-filter: blur(3px) saturate(1.35);
}

.spore-loupe.active { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.loupe-inner { position: absolute; inset: 28px; display: grid; place-content: center; text-align: center; }
.loupe-inner span { font-family: var(--fraunces); color: var(--lichen-milk); font-size: 25px; line-height: 1; }
.loupe-inner p { margin: 10px 0 0; font-size: 13px; line-height: 1.35; color: rgba(216,216,184,.86); }

.forest-floor.loupe-on .dashboard-table > *:not(.is-focused),
.forest-floor.loupe-on .moss-ledger:not(.is-focused) { filter: blur(1.4px) brightness(.86); }

@keyframes breathe { 0%,100% { transform: scale(.92) translate(0,0); } 50% { transform: scale(1.12) translate(4vw, 2vw); } }
@keyframes sporeDrift { from { transform: translateY(18vh) scale(.6); opacity: 0; } 18% { opacity: .55; } to { transform: translateY(-105vh) scale(1.1); opacity: 0; } }
@keyframes blink { 0%, 100% { opacity: .35; transform: scale(.8); } 45% { opacity: 1; transform: scale(1.25); } }
@keyframes rootPulse { 0%,100% { stroke-dashoffset: 0; opacity: .48; } 50% { stroke-dashoffset: -32; opacity: .95; } }
@keyframes sink { 0%,100% { transform: translateY(0); } 50% { transform: translateY(10px); } }

@media (max-width: 980px) {
  .dashboard-table { grid-template-columns: 1fr; }
  .burrow-map, .depth-gauge, .mushroom-ring, .specimen-drawers, .zoom-glade, .root-archive { grid-column: 1; grid-row: auto; }
  .specimen-drawers { grid-template-columns: 1fr 1fr; }
  .mushroom-ring { border-radius: 32px; min-height: auto; display: flex; flex-wrap: wrap; justify-content: center; margin-top: 0; }
}

@media (max-width: 640px) {
  .forest-floor { padding: 14px; }
  .moss-ledger { margin: 0 0 18px; width: 100%; }
  .specimen-drawers { grid-template-columns: 1fr; }
  .burrow-map { min-height: 520px; padding: 20px; }
  .terrace { width: 80%; }
  .spore-loupe { width: 190px; height: 190px; }
}
