:root {
  --ink: #140F1F;
  --panel: #1E1830;
  --edge: #4B3F6B;
  --leaf: #8EDB6A;
  --amber: #FFC857;
  --rose: #FF6F7D;
  --cream: #FFF1D6;
  --dim: #B4A8D6;
  --display: "Pixelify Sans", "Courier New", monospace;
  --mono: "VT323", "Courier New", monospace;
  color-scheme: dark;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --ink: #140F1F; }
}
:root[data-theme="dark"] { --ink: #140F1F; }
html { scroll-padding-top: env(safe-area-inset-top, 0px); }
*, *::before, *::after { box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  padding: 0;
  background: var(--ink);
  color: var(--cream);
  display: block;
  overflow: hidden;
}
body {
  font-family: var(--mono);
  font-size: 20px;
}
[hidden] { display: none !important; }

/* Pełnoekranowy kontener gry */
.app {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  background: var(--ink);
}
.app::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .06) 0 1px, transparent 1px 3px);
}
.px {
  image-rendering: pixelated;
  shape-rendering: crispEdges;
}

/* Drewniany, fakturowany HUD ze złotymi nitami w narożnikach */
.hud {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  padding-top: 10px;
  padding-left: max(16px, calc(50% - 440px));
  padding-right: max(16px, calc(50% - 440px));
  padding-bottom: 0;
  position: relative;
  background: repeating-linear-gradient(180deg, #6E4B2F 0 13px, #5F402A 13px 15px);
  box-shadow: inset 0 3px 0 #8A6440, inset 0 -3px 0 #3E2A1A;
  border: 0;
}
.hud::before, .hud::after {
  content: "";
  position: absolute;
  top: 6px;
  width: 4px;
  height: 4px;
  background: #D9B98A;
  box-shadow: 1px 1px 0 #2A1B0F;
}
.hud::before { left: 5px; }
.hud::after { right: 5px; }

.hud-top {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hud-top h2 {
  flex: 1;
  margin: 0;
  text-align: center;
  font: 500 19px/1.1 var(--display);
  color: var(--cream);
  text-shadow: 2px 2px 0 #2E1D10;
  text-wrap: balance;
}
.day {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .12em;
  color: #16310F;
  background: var(--leaf);
  box-shadow: 2px 2px 0 #2E1D10;
  padding: 2px 8px;
  flex: none;
}
.exitb {
  width: 34px;
  height: 34px;
  flex: none;
  background: #3B2818;
  border: 2px solid #24170C;
  box-shadow: 0 3px 0 #120B05;
  color: var(--cream);
  font: 18px var(--mono);
  cursor: pointer;
}
.exitb:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #120B05;
}
.hud-top .chip {
  height: 34px;
  min-width: 36px;
  padding: 0 6px;
  background: #3B2818;
  border: 2px solid #24170C;
  box-shadow: 0 3px 0 #120B05;
  color: var(--cream);
  font-size: 17px;
  font-family: var(--mono);
  cursor: pointer;
}
.hud-top .chip:active {
  transform: translateY(2px);
}

.stats {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.stat {
  background: #3B2818;
  border: 2px solid #24170C;
  box-shadow: inset 0 3px 0 #2A1B0F, 0 2px 0 #8A6440;
  padding: 2px 10px;
  min-width: 84px;
}
.stat.m {
  flex: 1;
  text-align: center;
  min-width: 0;
}
.stat.r {
  text-align: right;
}
.stat.streak-stat {
  background: linear-gradient(180deg, #6B3410 0%, #4A2208 100%);
  border: 2px solid #FFC857;
  box-shadow: inset 0 2px 0 #9A4B17, 0 0 10px rgba(255, 200, 87, 0.4);
  animation: streakPulse 1.2s infinite alternate;
  min-width: 90px;
}
.stat.streak-stat strong {
  color: #FFE08A !important;
  text-shadow: 0 0 8px rgba(255, 200, 87, 0.6);
  justify-content: center;
}
@keyframes streakPulse {
  from { transform: scale(1); filter: brightness(1); }
  to { transform: scale(1.03); filter: brightness(1.2); }
}
.stat small {
  display: block;
  font-size: 14px;
  letter-spacing: .14em;
  color: #E8C99A;
}
.stat strong {
  font: 500 24px/1.15 var(--display);
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: inherit;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: var(--cream);
}
.stat.m strong {
  font-size: 18px;
  justify-content: center;
}
.stat strong i {
  width: 12px;
  height: 12px;
  border: 2px solid #F3E3C3;
  display: inline-block;
}

.gauge {
  position: relative;
  display: flex;
  height: 10px;
  border: 2px solid #24170C;
  box-shadow: 0 -2px 0 #24170C, 0 2px 0 #24170C;
  margin-top: 2px;
  margin-bottom: 8px;
}
.gauge span { height: 100%; }
.gauge b {
  position: absolute;
  top: -6px;
  width: 6px;
  height: 18px;
  margin-left: -3px;
  background: var(--cream);
  border: 2px solid #140F1F;
  transition: left .5s;
}

/* Scena gry, świat, paski stref i korzenie */
.scene {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
  background: #1C1730;
}
.world {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  will-change: transform;
}
.band {
  position: absolute;
  left: 0;
  right: 0;
}
.mark {
  position: absolute;
  left: 10px;
  max-width: 40%;
  font-size: 18px;
  line-height: 1.05;
  background: rgba(20, 15, 31, .62);
  padding: 2px 6px;
  transform: translateY(-50%);
  color: var(--cream);
}
.mark::before {
  content: "";
  position: absolute;
  left: 100%;
  top: 50%;
  width: 14px;
  border-top: 2px dashed rgba(255, 241, 214, .7);
}
.ruler {
  position: absolute;
  right: 8px;
  width: 2px;
  background: rgba(255, 241, 214, .55);
}
.tick {
  position: absolute;
  right: 8px;
  height: 2px;
  background: rgba(255, 241, 214, .55);
}
.tick b {
  position: absolute;
  right: 12px;
  top: -11px;
  font-weight: 400;
  font-size: 18px;
  background: rgba(20, 15, 31, .55);
  padding: 0 3px;
  color: var(--cream);
  white-space: nowrap;
}
#stalk {
  position: absolute;
  left: 0;
  top: 0;
  overflow: visible;
  z-index: 1;
}
#stalk rect {
  shape-rendering: crispEdges;
}
#nodes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}
.node {
  position: absolute;
  transform: translate(-50%, -50%);
  animation: pop .45s cubic-bezier(.3, 1.6, .5, 1) both;
}
.node.w svg {
  animation: wig 2.6s ease-in-out infinite alternate;
}
.tip {
  position: absolute;
  transform: translate(-50%, var(--tipy, 0%));
  filter: drop-shadow(0 0 6px rgba(255, 241, 214, .9));
  z-index: 2;
  pointer-events: none;
}
#tip {
  position: absolute;
  transform: translate(-50%, var(--tipy, 0%));
  filter: drop-shadow(0 0 6px rgba(255, 241, 214, .9));
  z-index: 2;
  pointer-events: none;
}
.wig {
  animation: wig 2.6s ease-in-out infinite alternate;
}
.twinkle {
  animation: twinkle 2.4s ease-in-out infinite;
}
@keyframes twinkle {
  50% { opacity: .45; transform: scale(.9); }
}
@keyframes pop {
  from { transform: translate(-50%, -50%) scale(0); }
}
@keyframes wig {
  to { transform: translateX(12px); }
}
.dust {
  position: absolute;
  width: 4px;
  height: 4px;
  pointer-events: none;
  animation: dust .7s ease-out forwards;
}
@keyframes dust {
  to { transform: translate(var(--dx), var(--dy)); opacity: 0; }
}

#tree {
  transform-origin: 50% 100%;
  transition: transform .9s cubic-bezier(.3, 1.4, .5, 1);
}
#crownW {
  transform-origin: 50% 0;
  transition: transform .9s cubic-bezier(.3, 1.4, .5, 1);
}

#bubble {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 6;
  pointer-events: none;
  max-width: calc(100% - 72px);
}
#bubble.out {
  animation: bubOut .5s ease-in forwards;
}
@keyframes bubOut {
  to { opacity: 0; transform: translate(-50%, -24px); }
}
.bub {
  position: relative;
  text-align: center;
  background: #140F1F;
  border: 3px solid var(--c);
  box-shadow: 0 0 0 3px #140F1F, 5px 7px 0 3px rgba(0, 0, 0, .35);
  padding: 6px 22px 4px;
  animation: bubIn .4s cubic-bezier(.3, 1.6, .5, 1) both;
}
.bub::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -13px;
  transform: translateX(-50%);
  border: 10px solid transparent;
  border-top-color: var(--c);
  border-bottom: 0;
}
.bub.glow {
  box-shadow: 0 0 0 3px #140F1F, 0 0 22px var(--c);
}
.bub.streak-glow {
  border-color: #FFC857 !important;
  box-shadow: 0 0 0 3px #140F1F, 0 0 26px rgba(255, 200, 87, 0.85), inset 0 0 10px rgba(255, 200, 87, 0.3) !important;
}
.streak-pill {
  display: inline-block;
  background: linear-gradient(90deg, #FF6F00, #FFC857);
  color: #1A0E05;
  font-family: var(--display);
  font-size: 11px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 0 8px rgba(255, 200, 87, 0.6);
  vertical-align: middle;
}
.bub b {
  display: block;
  font: 400 28px/1.05 var(--mono);
  letter-spacing: .06em;
  color: var(--c);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bub small {
  display: block;
  font-size: 15px;
  letter-spacing: .22em;
  color: var(--dim);
}
@keyframes bubIn {
  from { transform: scale(.4); opacity: 0; }
}
.fl {
  position: absolute;
  transform: translate(-50%, -50%);
  animation: flIn .45s cubic-bezier(.3, 1.7, .5, 1) both;
  z-index: 1;
}
@keyframes flIn {
  from { transform: translate(-50%, -50%) scale(0) rotate(-40deg); }
}

/* Center-screen Fancy Announcement dla Sztafety Nisz - czas trwania 3.8s */
.relay-announce {
  position: absolute;
  top: 38%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 25;
  pointer-events: none;
  width: min(94%, 500px);
  text-align: center;
}
.ra-inner {
  background: repeating-linear-gradient(180deg, #5A3C24 0 13px, #4B321D 13px 15px);
  border: 3px solid #FFC857;
  box-shadow: inset 0 3px 0 #8A6440, 0 0 0 3px #140F1F, 0 16px 42px rgba(0, 0, 0, 0.9), 0 0 32px rgba(255, 200, 87, 0.55);
  padding: 22px 26px 20px;
  border-radius: 4px;
  animation: relayPop 3.8s cubic-bezier(0.18, 1.25, 0.3, 1) forwards;
}
@keyframes relayPop {
  0% { transform: scale(0.3) rotate(-3deg); opacity: 0; filter: drop-shadow(0 0 35px #FFC857) brightness(1.8); }
  10% { transform: scale(1.05) rotate(1deg); opacity: 1; filter: drop-shadow(0 0 24px #FFC857) brightness(1.2); }
  18% { transform: scale(1) rotate(0deg); filter: drop-shadow(0 0 16px rgba(255, 200, 87, 0.45)) brightness(1); opacity: 1; }
  85% { transform: scale(1) translateY(0); opacity: 1; }
  100% { transform: scale(0.88) translateY(-30px); opacity: 0; }
}
@keyframes hudRelayPulse {
  0% { background: rgba(255, 200, 87, 0.4); box-shadow: 0 0 18px rgba(255, 200, 87, 0.8); color: #FFE08A; }
  50% { background: rgba(255, 200, 87, 0.15); box-shadow: 0 0 8px rgba(255, 200, 87, 0.4); color: #FFF1D6; }
  100% { background: transparent; box-shadow: none; color: inherit; }
}
.hud .q.q-relay-pulse {
  animation: hudRelayPulse 2s cubic-bezier(0.2, 0.8, 0.2, 1);
  border-radius: 6px;
  padding: 2px 8px;
}
.ra-badge {
  display: inline-block;
  font-family: var(--display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: #1E1208;
  background: #FFC857;
  padding: 3px 12px;
  border: 2px solid #24170C;
  box-shadow: 0 2px 0 #24170C;
  margin-bottom: 10px;
  text-transform: uppercase;
}
.ra-q {
  font-family: var(--display);
  font-size: clamp(22px, 6vw, 30px);
  font-weight: 700;
  line-height: 1.15;
  color: #FFF4E0;
  text-shadow: 2px 2px 0 #24170C, 0 0 14px rgba(255, 224, 138, 0.5);
  margin: 6px 0 10px;
  text-wrap: balance;
}
.ra-hint {
  font-size: 16px;
  color: #E8C99A;
  letter-spacing: 0.08em;
  font-family: var(--mono);
}

/* Powiadomienie o wykopaniu artefaktu */
.artifact-toast {
  position: absolute;
  top: 32%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 24;
  pointer-events: none;
  background: repeating-linear-gradient(180deg, #5A3C1E 0 13px, #482E14 13px 15px);
  border: 2px solid #FFC857;
  box-shadow: 0 0 0 2px #1E1208, 0 12px 30px rgba(0, 0, 0, 0.85), 0 0 26px rgba(255, 200, 87, 0.55);
  padding: 14px 22px;
  border-radius: 4px;
  text-align: center;
  animation: artifactPop 3.2s cubic-bezier(0.18, 1.25, 0.3, 1) forwards;
}
.artifact-toast b {
  display: block;
  font-family: var(--display);
  font-size: 19px;
  color: #FFF4E0;
  text-shadow: 1px 1px 0 #1E1208, 0 0 10px rgba(255, 200, 87, 0.6);
}
.artifact-toast small {
  display: block;
  font-size: 14px;
  color: #FFE08A;
  letter-spacing: 0.08em;
  margin-top: 4px;
}
@keyframes artifactPop {
  0% { transform: translate(-50%, -50%) scale(0.4); opacity: 0; }
  15% { transform: translate(-50%, -50%) scale(1.06); opacity: 1; }
  25% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  80% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -75%) scale(0.85); opacity: 0; }
}

/* Drewniany dolny pasek wpisywania i zegar */
.bar {
  flex: none;
  position: relative;
  width: 100%;
  background: repeating-linear-gradient(180deg, #6E4B2F 0 13px, #5F402A 13px 15px);
  box-shadow: inset 0 3px 0 #8A6440, inset 0 -3px 0 #3E2A1A;
  border: 0;
  padding-top: 8px;
  padding-left: max(16px, calc(50% - 360px));
  padding-right: max(16px, calc(50% - 360px));
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
}
.bar::before, .bar::after {
  content: "";
  position: absolute;
  top: 6px;
  width: 4px;
  height: 4px;
  background: #D9B98A;
  box-shadow: 1px 1px 0 #2A1B0F;
}
.bar::before { left: 5px; }
.bar::after { right: 5px; }

.reveal {
  height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  padding: 0 10px;
  background: #3B2818;
  border: 2px solid #24170C;
  box-shadow: inset 0 3px 0 #2A1B0F;
  overflow: hidden;
  white-space: nowrap;
}
.reveal b {
  font: 700 18px var(--display);
  letter-spacing: .08em;
  flex: none;
}
.reveal q {
  quotes: none;
  font-size: 21px;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  color: var(--cream);
}
.reveal em {
  font-style: normal;
  margin-left: auto;
  font-size: 21px;
  color: var(--amber);
  flex: none;
}
.reveal.flash {
  animation: flash .5s;
}
@keyframes flash {
  from { background: #6A4A2C; }
}

.row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.clock {
  width: 52px;
  height: 52px;
  flex: none;
  position: relative;
}
.clock svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.clock circle:first-child {
  fill: #3B2818;
  stroke: #24170C;
}
.clock span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font: 500 20px var(--display);
  text-shadow: 2px 2px 0 #2E1D10;
}
.time-bonus {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--display);
  font-size: 16px;
  font-weight: 800;
  color: #8EDB6A;
  text-shadow: 0 0 8px rgba(142, 219, 106, 0.9), 1px 1px 0 #1A0E05;
  pointer-events: none;
  animation: bonusPop 1.1s cubic-bezier(0.18, 1.25, 0.3, 1) forwards;
  z-index: 10;
}
@keyframes bonusPop {
  0% { transform: translateX(-50%) translateY(10px) scale(0.6); opacity: 0; }
  25% { transform: translateX(-50%) translateY(-6px) scale(1.2); opacity: 1; }
  75% { transform: translateX(-50%) translateY(-12px) scale(1); opacity: 1; }
  100% { transform: translateX(-50%) translateY(-24px) scale(0.85); opacity: 0; }
}
input {
  flex: 1;
  min-width: 0;
  height: 50px;
  font: 24px var(--mono);
  letter-spacing: .05em;
  padding: 0 12px;
  background: #FFF4E0;
  color: #3A2418;
  border: 2px solid #24170C;
  box-shadow: inset 0 3px 0 #E8D3B0;
  outline: none;
  border-radius: 0;
}
input::placeholder {
  color: #A88B66;
}
input:focus-visible {
  border-color: var(--leaf);
}
.go {
  height: 50px;
  padding: 0 16px;
  font: 700 20px var(--display);
  letter-spacing: .1em;
  background: var(--leaf);
  color: #16310F;
  border: 0;
  box-shadow: 0 4px 0 #2F5E22, 0 0 0 2px #24170C;
  cursor: pointer;
  flex: none;
}
.go:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #2F5E22, 0 0 0 2px #24170C;
}
.skip-btn {
  height: 50px;
  padding: 0 12px;
  font: 700 16px var(--display);
  letter-spacing: .08em;
  background: #3B2818;
  color: var(--amber);
  border: 2px solid #24170C;
  box-shadow: inset 0 2px 0 #6A4A2C, 0 3px 0 #24170C;
  cursor: pointer;
  flex: none;
}
.skip-btn:hover {
  color: #FFE08A;
  border-color: var(--amber);
}
.skip-btn:active {
  transform: translateY(2px);
  box-shadow: inset 0 2px 0 #6A4A2C, 0 1px 0 #24170C;
}
.note {
  height: 24px;
  margin: 6px 2px 0;
  font-size: 19px;
  color: #F3E3C3;
  text-shadow: 1px 1px 0 #2E1D10;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.note.bad {
  color: #FFB3A8;
}
.shake {
  animation: shake .35s;
}
@keyframes shake {
  25% { transform: translateX(-6px); }
  50% { transform: translateX(6px); }
  75% { transform: translateX(-3px); }
}

/* Ekran menu głównego i podsumowania */
.screen {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.panel {
  flex: none;
  background: var(--ink);
  padding: 18px max(16px, calc(50% - 260px)) calc(20px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 12px;
}
/* Sekcja informacyjna pod menu (treść indeksowana przez wyszukiwarki) */
.seo {
  flex: none;
  background: #141024;
  color: #C9C2E0;
  padding: 16px max(16px, calc(50% - 260px)) calc(24px + env(safe-area-inset-bottom, 0px));
  border-top: 2px solid #2A2240;
  font: 15px/1.55 var(--mono, monospace);
}
.seo h2 {
  margin: 0 0 8px;
  font: 700 clamp(18px, 5vw, 22px) var(--display, sans-serif);
  letter-spacing: .04em;
  color: var(--leaf, #8EDB6A);
  text-wrap: balance;
}
.seo p {
  margin: 0 0 10px;
  max-width: 62ch;
}
.seo strong { color: #FFE08A; }
.seo details {
  border-top: 1px dashed #2A2240;
  padding: 6px 0;
}
.seo summary {
  cursor: pointer;
  color: #FFF1D6;
  font-weight: 700;
}
.seo details p { margin: 6px 0 0; }
.start-sky {
  flex: 1 0 auto;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 30px 16px 0;
  position: relative;
  overflow: hidden;
  background: #9FD8EE;
  text-align: center;
}
.start-sky > * {
  position: relative;
  z-index: 2;
}
.start-sky > .hx {
  position: absolute;
  z-index: 0;
}
.title {
  font: 700 clamp(36px, 8.5vw, 62px) var(--display);
  letter-spacing: .06em;
  margin: 20px 0 0;
  color: var(--leaf);
  text-shadow: 4px 4px 0 #2F5E22;
  white-space: nowrap;
}
.tag {
  margin: 0;
  padding: 2px 10px;
  background: #FFF8E8;
  color: #0E2A40;
  font-size: clamp(15px, 4.8vw, 22px);
  letter-spacing: .04em;
  max-width: 94%;
}
.taphint {
  margin: 4px 0 0;
  font: 500 17px var(--display);
  letter-spacing: .1em;
  color: #4A1630;
  background: #FFE3EE;
  border: 2px solid #C2507F;
  padding: 2px 12px;
  animation: hop 2.8s ease-in-out infinite;
}
.skyBtn {
  position: absolute !important;
  left: 12px;
  top: 12px;
  z-index: 4;
  height: 38px;
  padding: 0 10px;
  font: 16px var(--mono);
  letter-spacing: .1em;
  color: var(--cream);
  background: #3B2818;
  border: 2px solid #24170C;
  box-shadow: inset 0 2px 0 #6A4A2C, 0 3px 0 #24170C;
  cursor: pointer;
}
.treebtn {
  position: absolute !important;
  left: 50%;
  bottom: 4px;
  transform: translateX(-50%);
  width: 250px;
  height: 208px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  z-index: 1 !important;
}
#treeHolder {
  display: block;
  transform-origin: 50% 100%;
}
.treebtn #treeHolder svg {
  display: block;
  width: 250px;
  height: 208px;
  transform-origin: 50% 100%;
  animation: treesway 5s ease-in-out infinite, treeglow 6s ease-in-out infinite;
}
#startSky[data-sky=night] .treebtn #treeHolder svg {
  --g: .3;
}
.treebtn.tapped #treeHolder {
  animation: tapshake .4s ease-out;
}
.treebtn:focus-visible {
  outline: 3px dashed var(--amber);
  outline-offset: 4px;
}
.hero-ground {
  position: relative;
  flex: none;
  height: 200px;
  overflow: hidden;
  background: #1C1730;
}
.hero-ground .hs {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 2;
  transition: transform 0.25s ease, filter 0.25s ease;
  pointer-events: auto;
}
.hero-ground .hs:hover {
  transform: translate(-50%, -50%) scale(1.25);
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.6));
}
.petal {
  position: absolute;
  width: 5px;
  height: 4px;
  background: var(--pa, #FFC2D8);
  opacity: 0;
  pointer-events: none;
  animation: petal var(--d, 7s) linear infinite;
}
.petal:nth-child(3n) {
  background: var(--pb, #FFF);
  width: 4px;
}
.fx-fire .petal {
  width: 4px;
  height: 4px;
  box-shadow: 0 0 6px 2px rgba(255, 224, 138, .65);
}
.bird {
  position: absolute;
  left: -8%;
  pointer-events: none;
  animation: fly var(--bd, 16s) linear infinite;
}
.bird .w1 { animation: flap .5s steps(1) infinite; }
.bird .w2 { animation: flap .5s steps(1) infinite reverse; }

/* Drewniane przyciski menu i popupów */
.big {
  width: 100%;
  height: 56px;
  font: 700 20px var(--display);
  letter-spacing: .16em;
  color: var(--cream);
  background: repeating-linear-gradient(180deg, #4A3220 0 13px, #422C1C 13px 15px);
  border: 3px solid #24170C;
  box-shadow: inset 0 3px 0 #6A4A2C, 0 4px 0 #120B05;
  cursor: pointer;
}
.big:active {
  transform: translateY(3px);
  box-shadow: inset 0 3px 0 #6A4A2C, 0 1px 0 #120B05;
}
.big.alt {
  background: repeating-linear-gradient(180deg, #3A2845 0 13px, #32223C 13px 15px);
  border-color: #24170C;
  box-shadow: inset 0 3px 0 #4E385C, 0 4px 0 #120B05;
}
.relay-btn {
  background: repeating-linear-gradient(180deg, #6E4B2F 0 13px, #5F402A 13px 15px) !important;
  border-color: #FFC857 !important;
  color: #FFE08A !important;
  box-shadow: inset 0 3px 0 #8A6440, 0 4px 0 #120B05, 0 0 16px rgba(255, 200, 87, 0.45) !important;
  line-height: 1.2 !important;
  padding: 10px 14px !important;
  height: auto !important;
  min-height: 52px;
}
.relay-btn:hover {
  background: repeating-linear-gradient(180deg, #86603C 0 11px, #77512F 11px 13px) !important;
  border-color: #FFF1D6 !important;
}
.survival-btn {
  background: repeating-linear-gradient(180deg, #A83216 0 13px, #8C240E 13px 15px) !important;
  border-color: #FFA07A !important;
  color: #FFF0E6 !important;
  box-shadow: inset 0 3px 0 #C94624, 0 4px 0 #120B05, 0 0 16px rgba(230, 78, 36, 0.5) !important;
  line-height: 1.2 !important;
  padding: 10px 14px !important;
  height: auto !important;
  min-height: 52px;
}
.survival-btn:hover {
  background: repeating-linear-gradient(180deg, #C23E1D 0 11px, #A83216 11px 13px) !important;
  border-color: #FFE4D6 !important;
  box-shadow: inset 0 3px 0 #DE552F, 0 4px 0 #120B05, 0 0 24px rgba(230, 78, 36, 0.75) !important;
}

.topr {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 4;
  display: flex;
  gap: 6px;
}
.chip {
  height: 38px;
  min-width: 42px;
  padding: 0 10px;
  font: 18px var(--mono);
  color: var(--cream);
  background: #3B2818;
  border: 2px solid #24170C;
  box-shadow: inset 0 2px 0 #6A4A2C, 0 3px 0 #24170C;
  cursor: pointer;
}
.chip:active {
  transform: translateY(2px);
}
.pk {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pk .big {
  height: 50px;
  width: 46px;
  flex: none;
  font-size: 22px;
  letter-spacing: 0;
}
.pk div {
  flex: 1;
  text-align: center;
  line-height: 1.1;
}
.pk b {
  display: block;
  font: 700 18px var(--display);
  color: var(--amber);
  letter-spacing: .08em;
}
.pk small {
  font-size: 16px;
  color: var(--dim);
}
.how {
  margin: 0;
  font-size: 19px;
  line-height: 1.3;
  color: var(--cream);
  text-align: center;
}
.how span {
  color: var(--dim);
}

/* Legenda poziomów nisz na ekranie głównym */
.tiers {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 10px;
  margin: 4px auto 8px;
  padding: 0 4px;
  max-width: 680px;
  width: 100%;
}
.tiers .tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(25, 20, 36, 0.75);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  user-select: none;
}
.tiers .tier-badge:hover {
  transform: translateY(-2px);
  background: rgba(35, 28, 52, 0.95);
  border-color: var(--tier-col, #FFF);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.45), 0 0 12px var(--tier-col, transparent);
}
.tiers .t-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
}
.tiers .t-main {
  font-family: var(--display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #FFF4E0;
}
.tiers .t-sub {
  font-size: 10px;
  color: var(--dim);
  font-weight: 500;
  letter-spacing: 0.02em;
}
.tiers .t-pts {
  font-family: var(--display);
  font-size: 11px;
  font-weight: 800;
  color: var(--tier-col, #FFE08A);
  margin-left: 3px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
@media (max-width: 520px) {
  .tiers {
    gap: 6px 6px;
  }
  .tiers .tier-badge {
    padding: 4px 8px;
    gap: 5px;
  }
  .tiers .t-main {
    font-size: 10px;
  }
  .tiers .t-sub {
    display: none;
  }
  .tiers .t-pts {
    font-size: 10px;
    padding: 1px 4px;
  }
}
.best {
  margin: 0;
  font-size: 18px;
  letter-spacing: .12em;
  color: var(--amber);
  text-align: center;
  min-height: 22px;
}

.pop {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  background: rgba(20, 15, 31, .62);
  padding: 16px;
}
.popcard {
  position: relative;
  width: 100%;
  max-width: 380px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 26px 20px 20px;
  background: repeating-linear-gradient(180deg, #6E4B2F 0 13px, #5F402A 13px 15px);
  border: 3px solid #24170C;
  box-shadow: inset 0 3px 0 #8A6440, 0 0 0 3px #140F1F, 0 10px 0 3px rgba(0, 0, 0, .35);
  animation: popIn .55s cubic-bezier(.3, 1.6, .5, 1) both;
}
.popcard small {
  font-size: 17px;
  letter-spacing: .2em;
  color: var(--amber);
  text-shadow: 1px 1px 0 #2E1D10;
}
.popcard b {
  font: 500 34px/1.1 var(--display);
  color: var(--cream);
  text-shadow: 3px 3px 0 #2E1D10;
}
.popcard .how {
  color: #F3E3C3;
  font-size: 19px;
}
.popcard .ghost {
  width: 100%;
  height: 42px;
  border-color: #3E2A1A;
}
#cdNum {
  font: 700 110px var(--display);
  color: var(--cream);
  text-shadow: 5px 5px 0 #000;
}

.end {
  background: var(--ink);
  padding: calc(16px + env(safe-area-inset-top, 0px)) max(16px, calc(50% - 280px)) 24px;
  gap: 12px;
}
.end header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  font: 700 28px var(--display);
  color: var(--leaf);
}
.kick {
  font-size: 17px;
  letter-spacing: .2em;
  color: #E8C99A;
}
.rcard {
  background: linear-gradient(180deg, rgba(58, 46, 88, .92), rgba(38, 30, 60, .92));
  border: 2px solid var(--edge);
  box-shadow: 0 4px 0 rgba(0, 0, 0, .35), inset 0 2px 0 rgba(255, 255, 255, .06);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rlab {
  font-size: 15px;
  letter-spacing: .24em;
  color: var(--dim);
}
.rscore {
  align-items: center;
  text-align: center;
  padding: 18px 16px;
}
.rscore strong {
  font: 700 84px/1 var(--display);
  text-shadow: 0 4px 0 #120B05;
}
.rscore span {
  font-size: 24px;
  color: var(--leaf);
}
.verdict {
  display: inline-block;
  padding: 3px 12px;
  border: 2px solid var(--amber);
  background: rgba(255, 200, 90, .08);
  font-size: 20px;
  letter-spacing: .1em;
  color: var(--amber);
}
.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.two .rcard {
  padding: 8px 12px;
}
.two strong {
  font: 700 24px var(--display);
  color: var(--amber);
}
.log svg {
  width: 100%;
  height: 34px;
  display: block;
}
.words {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.words li {
  font-size: 18px;
  padding: 1px 8px;
  border: 2px solid var(--c);
}

/* Karta Czego nie odkryłeś na ekranie końcowym */
.missed-card {
  border-color: rgba(143, 227, 211, 0.45) !important;
  background: radial-gradient(circle at top right, rgba(143, 227, 211, 0.12), transparent 70%), linear-gradient(180deg, rgba(38, 48, 65, 0.95), rgba(24, 28, 48, 0.95)) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(143, 227, 211, 0.3) !important;
}
.missed-hint {
  margin: 4px 0 10px;
  font-size: 15px;
  color: var(--cream);
  line-height: 1.35;
}
.missed-hint b {
  color: #8FE3D3;
}
.missed-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.missed-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(18, 14, 28, 0.65);
  border: 1px solid rgba(143, 227, 211, 0.25);
  border-radius: 8px;
  padding: 8px 12px;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.missed-item:hover {
  transform: translateX(4px);
  border-color: #8FE3D3;
  background: rgba(28, 22, 42, 0.85);
}
.missed-item .m-icon {
  font-size: 20px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 6px rgba(143, 227, 211, 0.7));
}
.missed-item .m-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.missed-item .m-name {
  font-size: 16px;
  color: #FFF4E0;
  font-weight: 700;
  word-break: break-word;
}
.missed-item .m-cat {
  font-size: 12px;
  color: var(--dim);
}
.missed-item .m-grow {
  font-family: var(--display);
  font-size: 13px;
  font-weight: 800;
  color: #8FE3D3;
  background: rgba(143, 227, 211, 0.12);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(143, 227, 211, 0.3);
  flex-shrink: 0;
}
.btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.btns .go {
  grid-column: 1 / -1;
  height: 52px;
}
.ghost {
  background: rgba(20, 14, 30, .5);
  border: 2px solid var(--edge);
  color: #E8C99A;
  font: 19px var(--mono);
  letter-spacing: .1em;
  height: 46px;
  cursor: pointer;
}

/* Animacje otoczenia i efektów */
@keyframes treesway { 50% { transform: rotate(1.2deg); } }
@keyframes treeglow { 0%, 100% { filter: drop-shadow(0 0 0 rgba(255, 255, 255, 0)); } 50% { filter: drop-shadow(0 0 7px rgba(255, 255, 255, .45)); } }
@keyframes petal {
  0% { transform: translate(0, 0) rotate(0); opacity: 0; }
  8% { opacity: 1; }
  85% { opacity: 1; }
  100% { transform: translate(var(--px, -60px), var(--py, 120px)) rotate(260deg); opacity: 0; }
}
@keyframes fly {
  0% { left: -8%; transform: translateY(0); }
  50% { transform: translateY(-14px); }
  100% { left: 108%; transform: translateY(0); }
}
@keyframes flap { 50% { opacity: 0; } }
@keyframes hop { 50% { transform: translateY(5px); } }
@keyframes tapshake {
  25% { transform: rotate(-2.5deg) scale(1.03); }
  60% { transform: rotate(2deg); }
}

.zb {
  position: absolute;
  left: 0;
  right: 0;
  top: 38%;
  z-index: 7;
  text-align: center;
  pointer-events: none;
  animation: zb 2s both;
}
.zb span {
  display: inline-block;
  padding: 6px 24px 8px;
  background: #140F1F;
  border: 3px solid var(--c);
  box-shadow: 0 0 0 3px #140F1F, 5px 7px 0 3px rgba(0, 0, 0, .35), 0 0 26px var(--c);
  font: 700 32px var(--display);
  letter-spacing: .12em;
  color: var(--cream);
}
.zb small {
  display: block;
  font: 19px var(--mono);
  letter-spacing: .3em;
  color: var(--c);
}
@keyframes zb {
  0% { transform: scale(.5); opacity: 0; }
  12% { transform: scale(1.08); opacity: 1; }
  20% { transform: scale(1); }
  82% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-26px); }
}

.conf {
  position: absolute;
  inset: 0;
  z-index: 45;
  pointer-events: none;
  overflow: hidden;
}
.conf i {
  position: absolute;
  top: -10px;
  animation: cf linear both;
}
@keyframes cf {
  to { transform: translate(var(--dx), 110vh) rotate(540deg); }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 220%);
  z-index: 9999;
  max-width: min(92vw, 380px);
  padding: 10px 14px;
  background: #2B2440;
  border: 3px solid var(--leaf);
  box-shadow: 0 6px 0 #15111F;
  color: var(--cream);
  text-align: center;
  font-size: 19px;
  transition: transform .35s;
}
.toast.on {
  transform: translate(-50%, 0);
}

/* Modale i Ranking */
.modal-overlay {
  position: absolute;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(14, 10, 24, 0.85);
  backdrop-filter: blur(2px);
  padding: 16px;
  overflow-y: auto;
}
.modal-card {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px 20px 20px;
  background: var(--panel);
  border: 3px solid var(--edge);
  box-shadow: 0 0 0 3px #140F1F, 0 10px 0 3px rgba(0, 0, 0, .45);
  overflow: hidden;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--edge);
  padding-bottom: 8px;
}
.modal-header h2 {
  margin: 0;
  font: 700 24px var(--display);
  color: var(--amber);
  display: flex;
  align-items: center;
  gap: 8px;
}
.modal-close {
  background: transparent;
  border: 2px solid var(--edge);
  color: var(--dim);
  font: 18px var(--mono);
  width: 32px;
  height: 32px;
  cursor: pointer;
}
.modal-close:hover {
  color: var(--cream);
  border-color: var(--rose);
}
.modal-body {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 4px;
}
.ranking-tabs {
  display: flex;
  gap: 6px;
}
.ranking-tab {
  flex: 1;
  height: 42px;
  font: 700 17px var(--display);
  letter-spacing: .08em;
  background: var(--ink);
  color: var(--dim);
  border: 2px solid var(--edge);
  cursor: pointer;
}
.ranking-tab.active {
  background: var(--panel);
  color: var(--leaf);
  border-color: var(--leaf);
}
.ranking-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 360px;
  overflow-y: auto;
}
.ranking-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--ink);
  border: 2px solid var(--edge);
  padding: 8px 12px;
  font-size: 19px;
}
.ranking-item.rank-1 {
  border-color: #FFD700;
  background: rgba(255, 215, 0, 0.08);
}
.ranking-item.rank-2 {
  border-color: #C0C0C0;
  background: rgba(192, 192, 192, 0.08);
}
.ranking-item.rank-3 {
  border-color: #CD7F32;
  background: rgba(205, 127, 50, 0.08);
}
.ranking-pos {
  font: 700 20px var(--display);
  min-width: 32px;
  color: var(--amber);
}
.ranking-nick {
  flex: 1;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ranking-score {
  font: 700 22px var(--display);
  color: var(--leaf);
  white-space: nowrap;
}
.ranking-meta {
  font-size: 15px;
  color: var(--dim);
  white-space: nowrap;
}
.ranking-empty {
  text-align: center;
  padding: 28px 12px;
  color: var(--dim);
  font-size: 18px;
}

/* Karta zapisu wyniku na ekranie końcowym */
.save-score-card {
  background: linear-gradient(180deg, rgba(38, 30, 60, .95), rgba(28, 22, 46, .95));
  border: 2px solid var(--leaf);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.save-score-form {
  display: flex;
  gap: 8px;
}
.save-score-input {
  flex: 1;
  height: 46px;
  font: 20px var(--mono);
  padding: 0 10px;
  background: #FFF4E0;
  color: #3A2418;
  border: 2px solid #24170C;
}
.save-score-input:focus {
  border-color: var(--leaf);
  outline: none;
}
.save-score-btn {
  height: 46px;
  padding: 0 16px;
  font: 700 17px var(--display);
  background: var(--leaf);
  color: #16310F;
  border: 0;
  box-shadow: 0 3px 0 #2F5E22;
  cursor: pointer;
  white-space: nowrap;
}
.save-score-btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #2F5E22;
}
.save-score-status {
  font-size: 16px;
  min-height: 20px;
}
.save-score-status.ok {
  color: var(--leaf);
}
.save-score-status.err {
  color: var(--rose);
}

@keyframes qPop {
  0% { transform: scale(.95); opacity: .7; }
  50% { transform: scale(1.05); color: var(--amber); }
  100% { transform: scale(1); opacity: 1; }
}
.hud-top h2.q-pop {
  animation: qPop .35s ease-out;
}
.words li .q-origin {
  display: block;
  font-size: 13px;
  opacity: .75;
  color: var(--dim);
  margin-bottom: 2px;
}

/* Artefakty na ekranie końcowym */
.artifact-card {
  border-color: rgba(255, 200, 87, 0.45) !important;
  background: radial-gradient(circle at top left, rgba(255, 200, 87, 0.12), transparent 70%), linear-gradient(180deg, rgba(46, 36, 62, 0.95), rgba(28, 20, 42, 0.95)) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 200, 87, 0.3) !important;
}
.artifact-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.artifact-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(18, 12, 28, 0.75);
  border: 1px solid rgba(255, 200, 87, 0.35);
  padding: 6px 12px;
  border-radius: 6px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.artifact-pill:hover {
  transform: translateX(3px);
  border-color: #FFC857;
}
.artifact-pill .a-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  filter: drop-shadow(0 0 5px rgba(255, 200, 87, 0.6));
}
.artifact-pill .a-info b {
  display: block;
  font-size: 14px;
  color: #FFF4E0;
}
.artifact-pill .a-info small {
  display: block;
  font-size: 11px;
  color: #FFC857;
}

/* Bioluminescencja głębinowa */
.scene.deep-abyss {
  box-shadow: inset 0 0 120px rgba(10, 24, 38, 0.9);
}
.scene.deep-abyss #pxI rect {
  filter: drop-shadow(0 0 5px #8FE3D3) drop-shadow(0 0 14px rgba(143, 227, 211, 0.7));
  transition: filter 0.8s ease;
}
.biomotes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}
.biomote {
  position: absolute;
  width: 4px;
  height: 4px;
  background: #8FE3D3;
  border-radius: 50%;
  box-shadow: 0 0 8px #8FE3D3, 0 0 16px #8FE3D3;
  animation: biomoteDrift var(--duration, 7s) linear infinite;
  pointer-events: none;
}
@keyframes biomoteDrift {
  0% { transform: translateY(0) scale(0.5); opacity: 0; }
  25% { opacity: 0.85; }
  75% { opacity: 0.85; }
  100% { transform: translateY(-260px) scale(1.3); opacity: 0; }
}

/* Modal: Dziennik Odkrywcy */
.journal-card {
  max-width: 520px;
}
.journal-rank-box {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(22, 16, 36, 0.85);
  border: 2px solid #FFC857;
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 14px;
  box-shadow: inset 0 2px 0 rgba(255, 200, 87, 0.2), 0 4px 12px rgba(0, 0, 0, 0.4);
}
.j-rank-badge {
  font-size: 42px;
  line-height: 1;
  filter: drop-shadow(0 0 8px rgba(255, 200, 87, 0.5));
  flex-shrink: 0;
}
.j-rank-info {
  flex: 1;
  min-width: 0;
}
.j-rank-sub {
  display: block;
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--dim);
  text-transform: uppercase;
}
.j-rank-title {
  display: block;
  font-family: var(--display);
  font-size: 21px;
  color: #FFE08A;
  margin: 2px 0 6px;
}
.j-progress-wrap {
  width: 100%;
  height: 10px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 4px;
}
.j-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #8EDB6A, #8FE3D3);
  border-radius: 999px;
  transition: width 0.4s ease;
}
.j-progress-text {
  display: block;
  font-size: 12px;
  color: var(--dim);
}
.journal-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}
.j-stat {
  background: rgba(22, 16, 36, 0.7);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  padding: 10px 12px;
  border-radius: 6px;
}
.j-stat .j-lbl {
  display: block;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--dim);
  margin-bottom: 4px;
}
.j-stat strong {
  font-family: var(--display);
  font-size: 19px;
  color: #FFF4E0;
}

@media (prefers-reduced-motion: reduce) {
  .dust, .wig, .twinkle, .node, #tree, #crownW, .world, .tip, .shake, .reveal.flash, .relay-pop, .zb, .conf i {
    animation: none !important;
    transition: none !important;
  }
}
