:root {
  --hud-height: 70px;
  --hud-top: 12px;
  --hud-inset: 18px;
  --hud-safe-top: env(safe-area-inset-top, 0px);
  --hud-safe-right: env(safe-area-inset-right, 0px);
  --hud-safe-left: env(safe-area-inset-left, 0px);
}

.root-game-hud {
  --hud-status-label-size: 9px;
  --hud-status-value-size: 17px;
  position: absolute;
  top: max(var(--hud-top), var(--hud-safe-top));
  right: max(var(--hud-inset), var(--hud-safe-right));
  left: max(var(--hud-inset), var(--hud-safe-left));
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(170px, auto) minmax(420px, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-width: 0;
  min-height: var(--hud-height);
  padding: 8px 12px;
  border: 1px solid rgba(255, 253, 247, 0.82);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.9);
  box-shadow: 0 14px 34px rgba(8, 35, 27, 0.25);
  backdrop-filter: blur(12px);
}

.root-game-nav-menu {
  display: contents;
}

.root-game-nav-menu > summary {
  display: none;
}

.root-game-nav-close-icon {
  display: none;
}

.root-game-nav-item-icon {
  display: none;
}

.root-game-brand {
  grid-column: 1;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--forest, #173f32);
  text-decoration: none;
}

.root-game-brand img {
  width: 46px;
  height: 46px;
  object-fit: contain;
}

.root-game-brand span {
  display: grid;
  min-width: 0;
}

.root-game-brand strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 21px;
  line-height: 1;
}

.root-game-brand small {
  margin-top: 4px;
  color: var(--muted, #607166);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.root-game-nav {
  grid-column: 2;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: max-content;
  max-width: 520px;
  min-width: 0;
}

.root-game-nav a,
.root-game-nav button,
.root-game-wallet button {
  min-height: 38px;
  border: 1px solid var(--line, rgba(29, 69, 52, 0.22));
  border-radius: 7px;
  padding: 0 14px;
  background: #fffdf7;
  color: var(--forest, #173f32);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: 0 3px 8px rgba(20, 54, 41, 0.08);
}

.root-game-nav a {
  display: inline-flex;
  align-items: center;
}

.root-game-nav a[aria-current="page"] {
  border-color: #245840;
  background: #245840;
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(28, 74, 53, 0.2);
}

.root-game-nav a:hover,
.root-game-nav button:hover,
.root-game-wallet button:hover {
  border-color: rgba(71, 115, 63, 0.62);
  background: #eef4e5;
}

.root-game-nav a[aria-current="page"]:hover {
  border-color: #173f32;
  background: #173f32;
}

.root-game-nav--garden .root-game-nav-group,
.root-game-nav--garden .root-game-nav-list,
.root-game-nav--garden .root-game-nav-shortcuts {
  display: contents;
}

.root-game-nav--garden .root-game-nav-label,
.root-game-nav--garden i,
.root-game-nav--garden .root-game-nav-practice small {
  display: none;
}

.root-game-nav--garden .root-game-nav-practice span {
  display: contents;
}

.root-game-nav--garden .root-game-nav-practice strong {
  font: inherit;
}

.root-game-level-meter {
  position: absolute;
  top: calc(50% - 11px);
  left: 50%;
  z-index: 2;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  width: clamp(360px, 26vw, 500px);
  transform: translate(-50%, -50%);
  min-height: 58px;
  padding: 4px 10px 4px 6px;
  border: 1px solid rgba(52, 103, 70, 0.52);
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(250, 255, 238, 0.98), rgba(226, 239, 211, 0.98));
  color: var(--forest, #173f32);
  text-align: left;
  text-decoration: none;
  box-shadow: 0 3px 8px rgba(20, 54, 41, 0.08);
}

.root-game-level-meter:hover {
  border-color: rgba(52, 103, 70, 0.8);
  background: linear-gradient(180deg, #fbfff1, #dcebc9);
}

.root-game-level-medallion {
  position: relative;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  overflow: hidden;
  border: 2px solid #d9b653;
  border-radius: 50%;
  background: #214f3d;
  box-shadow: inset 0 0 0 2px rgba(255, 247, 195, 0.35), 0 3px 8px rgba(16, 57, 40, 0.22);
}

.root-game-level-medallion img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  opacity: 0.28;
  filter: brightness(4) saturate(0.3);
}

.root-game-level-medallion b {
  position: absolute;
  color: #fff9d8;
  font: 800 20px/1 Georgia, "Times New Roman", serif;
}

.root-game-level-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.root-game-level-copy small {
  color: #55705d;
  font-size: var(--hud-status-label-size);
  font-weight: 950;
  text-transform: uppercase;
}

.root-game-level-copy strong {
  color: var(--forest, #173f32);
  font: 700 var(--hud-status-value-size)/1 Georgia, "Times New Roman", serif;
}

.root-game-level-copy em {
  color: #315345;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  transform: translate(-2px, -2px);
  transform-origin: left top;
}

.root-game-level-track {
  display: block;
  width: 100%;
  height: 9px;
  overflow: hidden;
  border-radius: 5px;
  background: rgba(23, 63, 50, 0.16);
}

.root-game-level-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #5b8f46, #e3b948);
  transform-origin: left center;
  transition: width 620ms cubic-bezier(0.22, 0.75, 0.2, 1);
}

.root-game-level-track i.is-load-animating {
  animation: root-game-xp-load 1600ms cubic-bezier(0.2, 0.82, 0.25, 1) both;
}

@keyframes root-game-xp-load {
  0% {
    opacity: 0.4;
    transform: scaleX(0);
  }
  72% {
    opacity: 1;
    filter: brightness(1.12);
  }
  100% {
    opacity: 1;
    filter: brightness(1);
    transform: scaleX(1);
  }
}

.root-game-xp-flyout {
  position: absolute;
  top: -14px;
  right: 8px;
  border: 1px solid rgba(255, 245, 179, 0.8);
  border-radius: 12px;
  padding: 3px 7px;
  background: #214f3d;
  color: #fff6ad;
  font-size: 9px;
  font-weight: 950;
  box-shadow: 0 6px 14px rgba(9, 43, 31, 0.28);
  pointer-events: none;
}

.root-game-xp-flyout.is-visible {
  display: block;
  animation: root-game-xp-rise 1.6s ease-out both;
}

@keyframes root-game-xp-rise {
  0% { opacity: 0; transform: translateY(8px) scale(0.9); }
  20%, 68% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-13px) scale(0.96); }
}

.root-game-xp-win[hidden] {
  display: none;
}

.root-game-xp-win {
  position: absolute;
  z-index: 68;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 18px;
  background: rgba(5, 31, 24, 0.7);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.root-game-xp-win.is-visible {
  opacity: 1;
}

.root-game-xp-win-particles {
  position: absolute;
  inset: 0;
}

.root-game-xp-win-particles i {
  --xp-leaf-x: 50%;
  --xp-leaf-delay: 0ms;
  position: absolute;
  left: var(--xp-leaf-x);
  bottom: 16%;
  width: 12px;
  height: 20px;
  border-radius: 85% 14% 85% 14%;
  background: #e0c55b;
  box-shadow: 0 0 10px rgba(255, 239, 141, 0.5);
  opacity: 0;
  transform: rotate(34deg);
}

.root-game-xp-win.is-visible .root-game-xp-win-particles i {
  animation: root-game-xp-win-leaf 1800ms var(--xp-leaf-delay) cubic-bezier(0.16, 0.74, 0.28, 1) both;
}

.root-game-xp-win-particles i:nth-child(1) { --xp-leaf-x: 18%; --xp-leaf-delay: 80ms; }
.root-game-xp-win-particles i:nth-child(2) { --xp-leaf-x: 27%; --xp-leaf-delay: 220ms; background: #82ad67; }
.root-game-xp-win-particles i:nth-child(3) { --xp-leaf-x: 35%; --xp-leaf-delay: 20ms; }
.root-game-xp-win-particles i:nth-child(4) { --xp-leaf-x: 43%; --xp-leaf-delay: 320ms; background: #f0b96a; }
.root-game-xp-win-particles i:nth-child(5) { --xp-leaf-x: 49%; --xp-leaf-delay: 140ms; }
.root-game-xp-win-particles i:nth-child(6) { --xp-leaf-x: 56%; --xp-leaf-delay: 280ms; background: #82ad67; }
.root-game-xp-win-particles i:nth-child(7) { --xp-leaf-x: 64%; --xp-leaf-delay: 40ms; }
.root-game-xp-win-particles i:nth-child(8) { --xp-leaf-x: 72%; --xp-leaf-delay: 360ms; background: #f0b96a; }
.root-game-xp-win-particles i:nth-child(9) { --xp-leaf-x: 79%; --xp-leaf-delay: 190ms; }
.root-game-xp-win-particles i:nth-child(10) { --xp-leaf-x: 86%; --xp-leaf-delay: 100ms; background: #82ad67; }

.root-game-xp-win-panel {
  position: relative;
  z-index: 2;
  display: grid;
  width: min(540px, 100%);
  justify-items: center;
  border: 1px solid rgba(255, 246, 183, 0.88);
  border-radius: 8px;
  padding: 26px 32px 28px;
  background: rgba(250, 247, 227, 0.98);
  color: var(--forest, #173f32);
  text-align: center;
  box-shadow: 0 30px 90px rgba(2, 25, 17, 0.68), 0 0 52px rgba(225, 190, 83, 0.3);
  transform: translateY(18px) scale(0.94);
  transition: opacity 260ms ease, transform 480ms cubic-bezier(0.16, 0.86, 0.24, 1);
}

.root-game-xp-win.is-visible .root-game-xp-win-panel {
  transform: translateY(0) scale(1);
}

.root-game-xp-win-panel > small {
  color: #b6533e;
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.root-game-xp-win-emblem {
  position: relative;
  display: grid;
  width: 82px;
  height: 82px;
  margin: 12px 0 8px;
  place-items: center;
  border: 3px solid #d9b653;
  border-radius: 50%;
  background: #214f3d;
  box-shadow: inset 0 0 0 4px rgba(255, 247, 195, 0.2), 0 0 0 7px rgba(217, 182, 83, 0.15), 0 12px 25px rgba(10, 61, 41, 0.26);
}

.root-game-xp-win-emblem img {
  width: 62px;
  height: 62px;
  object-fit: contain;
  opacity: 0.34;
  filter: brightness(4) saturate(0.35);
}

.root-game-xp-win-emblem b {
  position: absolute;
  color: #fff7c9;
  font: 800 27px/1 Georgia, "Times New Roman", serif;
}

.root-game-xp-win-amount {
  color: #b15d34;
  font: 800 34px/1 Georgia, "Times New Roman", serif;
}

.root-game-xp-win-panel h2 {
  margin: 7px 0 4px;
  color: var(--forest, #173f32);
  font: 700 25px/1.08 Georgia, "Times New Roman", serif;
}

.root-game-xp-win-panel > p {
  margin: 0 0 15px;
  color: #5f6e62;
  font-size: 12px;
  font-weight: 750;
}

.root-game-xp-win-progress {
  display: grid;
  width: 100%;
  gap: 7px;
}

.root-game-xp-win-progress > span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: var(--forest, #173f32);
  font-size: 12px;
}

.root-game-xp-win-progress > span em {
  color: #586d60;
  font-style: normal;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.root-game-xp-win-progress > div {
  height: 14px;
  overflow: hidden;
  border: 2px solid rgba(33, 79, 61, 0.24);
  border-radius: 8px;
  background: rgba(23, 63, 50, 0.13);
  box-shadow: inset 0 2px 4px rgba(18, 59, 43, 0.12);
}

.root-game-xp-win-progress i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 5px;
  background: linear-gradient(90deg, #4c8646, #dfb94f);
  box-shadow: 0 0 12px rgba(225, 188, 71, 0.58);
}

.root-game-xp-win.is-major .root-game-xp-win-emblem {
  animation: root-game-xp-win-emblem 720ms 120ms cubic-bezier(0.16, 0.9, 0.2, 1) both;
}

.root-game-xp-win.is-level-up .root-game-xp-win-panel {
  border-color: #f1ce6b;
  box-shadow: 0 30px 90px rgba(2, 25, 17, 0.72), 0 0 72px rgba(244, 205, 92, 0.5);
}

@keyframes root-game-xp-win-emblem {
  from { opacity: 0; transform: scale(0.5) rotate(-10deg); }
  to { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes root-game-xp-win-leaf {
  0% { opacity: 0; transform: translateY(50px) rotate(10deg) scale(0.7); }
  18% { opacity: 0.95; }
  100% { opacity: 0; transform: translateY(-340px) rotate(210deg) scale(1.05); }
}

.root-game-wallet {
  grid-column: 3;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.root-game-wallet > span {
  display: grid;
  min-width: 74px;
  min-height: 42px;
  align-content: center;
  justify-items: center;
  border: 1px solid rgba(189, 122, 42, 0.25);
  border-radius: 7px;
  padding: 4px 10px;
  background: #fff8df;
}

.root-game-wallet > .root-game-wallet-currency {
  grid-template-columns: 24px auto;
  grid-template-rows: auto auto;
  column-gap: 6px;
  justify-items: start;
  min-width: 94px;
}

.root-game-wallet-currency .root-game-currency-icon {
  grid-column: 1;
  grid-row: 1 / 3;
  align-self: center;
}

.root-game-wallet-currency b,
.root-game-wallet-currency small {
  grid-column: 2;
}

.root-game-focus-recovery {
  grid-column: 2;
  grid-row: 3;
  display: inline-flex;
  max-width: 100%;
  min-width: 0;
  align-items: center;
  justify-content: flex-start;
  gap: 3px;
  margin-top: 2px;
  overflow: hidden;
  border: 1px solid rgba(39, 117, 111, 0.2);
  border-radius: 999px;
  padding: 2px 5px;
  background: linear-gradient(90deg, rgba(121, 213, 176, 0.16), rgba(255, 246, 173, 0.28));
  color: #35675f;
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  text-transform: none;
  white-space: nowrap;
}

.root-game-focus-recovery::before {
  width: 4px;
  height: 4px;
  flex: 0 0 4px;
  border-radius: 50%;
  background: #3f9a7e;
  box-shadow: 0 0 5px rgba(63, 154, 126, 0.65);
  content: "";
}

.root-game-focus-recovery time {
  width: 5ch;
  min-width: 5ch;
  flex: 0 0 5ch;
  color: #1f5148;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  text-align: right;
}

.root-game-focus-recovery.is-full {
  border-color: rgba(186, 137, 38, 0.2);
  background: linear-gradient(90deg, rgba(255, 246, 173, 0.3), rgba(231, 240, 219, 0.5));
  color: #6d5d2d;
}

.root-game-focus-recovery.is-full::before {
  background: #d5ad49;
  box-shadow: 0 0 5px rgba(213, 173, 73, 0.5);
}

.root-game-focus-recovery.is-full time {
  width: auto;
  min-width: 0;
  flex-basis: auto;
  color: #5b5d38;
}

.root-game-currency-icon {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  vertical-align: -5px;
}

.root-game-currency-icon.is-seed-token {
  border: 2px solid #a96f18;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 27%, #fff2a6 0 15%, #efc44f 18% 58%, #c68a20 62% 100%);
  box-shadow: inset 0 0 0 2px rgba(255, 250, 193, 0.54), 0 2px 4px rgba(88, 56, 10, 0.24);
}

.root-game-currency-icon.is-seed-token::before {
  position: absolute;
  top: 4px;
  left: 8px;
  width: 6px;
  height: 11px;
  border-radius: 85% 12% 85% 12%;
  background: #386b38;
  box-shadow: inset 1px 1px rgba(255, 255, 255, 0.34);
  content: "";
  transform: rotate(38deg);
}

.root-game-currency-icon.is-seed-token::after {
  position: absolute;
  top: 10px;
  left: 9px;
  width: 7px;
  height: 2px;
  border-radius: 2px;
  background: #244d2b;
  content: "";
  transform: rotate(-50deg);
  transform-origin: left center;
}

.root-game-currency-icon.is-focus-energy {
  border: 2px solid #27756f;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #dbfff1 0 10%, #79d5b0 15% 47%, #20665f 52% 100%);
  box-shadow: 0 0 0 2px rgba(94, 216, 177, 0.16), 0 0 10px rgba(60, 206, 178, 0.45);
  animation: root-focus-current 1.8s ease-in-out infinite;
}

.root-game-currency-icon.is-focus-energy::before {
  position: absolute;
  inset: 3px 5px;
  background: #fff6ad;
  clip-path: polygon(58% 0, 24% 48%, 49% 48%, 35% 100%, 78% 39%, 53% 39%);
  content: "";
  filter: drop-shadow(0 0 2px #fff6ad);
}

.root-game-currency-icon.is-garden-coin {
  border: 2px solid #9d671c;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 28%, #fff0a0 0 12%, #e6b745 17% 58%, #a76818 64% 100%);
  box-shadow: inset 0 0 0 2px rgba(255, 245, 174, 0.45), 0 2px 5px rgba(92, 54, 9, 0.28);
}

.root-game-currency-icon.is-garden-coin::before {
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(126, 77, 13, 0.72);
  border-radius: 50%;
  content: "";
}

.root-game-currency-icon.is-garden-coin::after {
  position: absolute;
  top: 5px;
  left: 8px;
  width: 6px;
  height: 11px;
  border-radius: 80% 15% 80% 15%;
  background: #52783e;
  content: "";
  transform: rotate(34deg);
}

.root-game-currency-icon.is-produce {
  border: 2px solid #9a532e;
  border-radius: 48% 52% 52% 48%;
  background: radial-gradient(circle at 38% 34%, #ffd078 0 13%, #df694b 17% 60%, #a43b35 66% 100%);
  box-shadow: inset 0 0 0 2px rgba(255, 213, 138, 0.26), 0 2px 5px rgba(86, 41, 21, 0.28);
}

.root-game-currency-icon.is-produce::before {
  position: absolute;
  top: -4px;
  left: 11px;
  width: 8px;
  height: 9px;
  border-radius: 90% 15% 90% 15%;
  background: #47733f;
  content: "";
  transform: rotate(24deg);
}

.root-game-currency-icon.is-produce::after {
  position: absolute;
  top: 0;
  left: 8px;
  width: 3px;
  height: 6px;
  border-radius: 3px;
  background: #315333;
  content: "";
  transform: rotate(-12deg);
}

@keyframes root-focus-current {
  0%, 100% { box-shadow: 0 0 0 2px rgba(94, 216, 177, 0.12), 0 0 6px rgba(60, 206, 178, 0.35); }
  50% { box-shadow: 0 0 0 3px rgba(94, 216, 177, 0.24), 0 0 14px rgba(60, 206, 178, 0.72); }
}

.root-game-testing-refill {
  width: 38px;
  min-width: 38px;
  padding: 0 !important;
  border-color: rgba(65, 118, 97, 0.48) !important;
  background: #e8f6ec !important;
  color: #245b49 !important;
  font-size: 18px !important;
  line-height: 1;
}

.root-game-wallet b {
  color: var(--forest, #173f32);
  font-family: Georgia, "Times New Roman", serif;
  font-size: var(--hud-status-value-size);
  line-height: 1;
}

.root-game-wallet b[data-wallet-coins],
.root-game-wallet b[data-course-wallet-coins] {
  color: #8a5a12;
}

.root-game-wallet b[data-wallet-focus],
.root-game-wallet b[data-course-wallet-focus] {
  color: #b64e3f;
}

.root-game-wallet small {
  margin-top: 3px;
  color: #7a683d;
  font-size: var(--hud-status-label-size);
  font-weight: 900;
  text-transform: uppercase;
}

@media (max-width: 2100px) {
  :root {
    --hud-height: 70px;
    --hud-inset: 12px;
  }

  .root-game-hud {
    grid-template-columns: minmax(145px, auto) minmax(330px, 1fr) auto;
    gap: 10px;
    padding: 6px 10px;
  }

  .root-game-level-meter {
    width: clamp(390px, 25vw, 500px);
  }

  .root-game-brand img {
    width: 39px;
    height: 39px;
  }

  .root-game-brand strong {
    font-size: 17px;
  }

  .root-game-nav {
    gap: 5px;
    max-width: 520px;
  }

  .root-game-nav a,
  .root-game-nav button,
  .root-game-wallet button {
    min-height: 34px;
    padding-inline: 9px;
    font-size: 10px;
  }

  .root-game-wallet > span {
    min-width: 60px;
    min-height: 38px;
  }

  .root-game-wallet > .root-game-wallet-currency {
    min-width: 82px;
  }
}

@media (min-width: 761px) and (max-width: 1900px) {
  .root-game-wallet {
    gap: 5px;
  }

  .root-game-wallet small,
  .root-game-focus-recovery > span {
    display: none;
  }

  .root-game-wallet > .root-game-wallet-currency {
    min-width: 68px;
    padding-inline: 7px;
  }

  .root-game-wallet [data-fullscreen],
  .root-game-wallet [data-course-fullscreen] {
    width: 40px;
    min-width: 40px;
    overflow: hidden;
    padding: 0;
    font-size: 0;
  }

  .root-game-wallet [data-fullscreen]::before,
  .root-game-wallet [data-course-fullscreen]::before {
    content: "\26F6";
    font-size: 17px;
  }

  .root-game-hud .root-game-water-meter > small {
    display: none;
  }
}

@media (max-width: 1700px) {
  :root {
    --hud-inset: 8px;
  }

  .root-game-hud {
    grid-template-columns: minmax(135px, auto) minmax(310px, 1fr) auto;
    gap: 7px;
    padding-inline: 7px;
  }

  .root-game-level-meter {
    width: clamp(340px, 25vw, 410px);
  }

  .root-game-wallet {
    gap: 5px;
  }

  .root-game-wallet small {
    display: none;
  }

  .root-game-wallet > .root-game-wallet-currency {
    min-width: 62px;
    padding-inline: 7px;
  }

  .root-game-nav {
    gap: 4px;
    max-width: 380px;
  }

  .root-game-nav a,
  .root-game-nav button,
  .root-game-wallet button {
    padding-inline: 8px;
    font-size: 10px;
  }
}

@media (max-width: 2100px) {
  .root-game-hud {
    grid-template-columns: minmax(135px, auto) 38px minmax(0, 1fr) auto;
  }

  .root-game-nav-menu {
    position: relative;
    z-index: 4;
    display: block;
    grid-column: 2;
  }

  .root-game-nav-menu > summary {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid var(--line, rgba(29, 69, 52, 0.22));
    border-radius: 7px;
    background: #fffdf7;
    color: var(--forest, #173f32);
    font-size: 20px;
    font-weight: 900;
    line-height: 1;
    list-style: none;
    box-shadow: 0 3px 8px rgba(20, 54, 41, 0.08);
    cursor: pointer;
  }

  .root-game-nav-menu > summary:hover {
    border-color: rgba(71, 115, 63, 0.62);
    background: #eef4e5;
  }

  .root-game-nav-menu > summary:focus-visible {
    outline: 3px solid rgba(210, 159, 56, 0.72);
    outline-offset: 2px;
  }

  .root-game-nav-menu[open] > summary {
    border-color: #245840;
    background: #245840;
    color: #ffffff;
    box-shadow: 0 5px 12px rgba(28, 74, 53, 0.24);
  }

  .root-game-nav-menu[open] .root-game-nav-open-icon {
    display: none;
  }

  .root-game-nav-menu[open] .root-game-nav-close-icon {
    display: inline-block;
  }

  .root-game-nav-menu > summary::-webkit-details-marker {
    display: none;
  }

  .root-game-nav {
    position: absolute;
    top: calc(100% + 10px);
    left: calc(100% + 32px);
    display: none;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    justify-content: stretch;
    width: 260px;
    max-width: calc(100vw - 24px);
    gap: 6px;
    border: 1px solid rgba(255, 253, 247, 0.88);
    border-radius: 8px;
    padding: 9px;
    background: rgba(255, 250, 240, 0.98);
    box-shadow: 0 16px 34px rgba(8, 35, 27, 0.3);
    backdrop-filter: blur(12px);
  }

  .root-game-nav-menu[open] .root-game-nav {
    display: grid;
  }

  .root-game-nav--garden {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    justify-content: stretch;
    width: 260px;
    gap: 0;
    padding: 10px;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .root-game-nav--garden .root-game-nav-group {
    display: grid;
    min-width: 0;
  }

  .root-game-nav--garden .root-game-nav-group + .root-game-nav-group {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(29, 69, 52, 0.13);
  }

  .root-game-nav--garden .root-game-nav-label {
    display: block;
    padding: 0 7px 6px;
    color: var(--muted, #607166);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.08em;
    line-height: 1;
    text-transform: uppercase;
  }

  .root-game-nav--garden .root-game-nav-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .root-game-nav--garden .root-game-nav-item {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    min-height: 42px;
    border: 0;
    border-radius: 8px;
    padding: 5px 8px;
    background: transparent;
    box-shadow: none;
    font-size: 12px;
    text-align: left;
  }

  .root-game-nav .root-game-nav-item-icon,
  .root-game-nav--garden .root-game-nav-practice > i {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 7px;
    background: rgba(71, 115, 63, 0.1);
    color: #2f6947;
    font-size: 17px;
  }

  .root-game-nav--garden .root-game-nav-shortcuts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .root-game-nav--garden .root-game-nav-shortcuts button {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    min-height: 42px;
    border-color: rgba(29, 69, 52, 0.16);
    border-radius: 8px;
    padding: 6px 9px;
    background: rgba(255, 253, 247, 0.82);
    box-shadow: none;
    font-size: 11px;
  }

  .root-game-nav--garden .root-game-nav-shortcuts i {
    display: inline-block;
    flex: 0 0 auto;
    color: #47733f;
    font-size: 16px;
  }

  .root-game-nav--garden .root-game-nav-practice {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    min-height: 48px;
    margin-top: 9px;
    border-color: rgba(71, 115, 63, 0.22);
    border-radius: 8px;
    padding: 7px 8px;
    background: #eef4e5;
    box-shadow: none;
    text-align: left;
  }

  .root-game-nav--garden .root-game-nav-practice span {
    display: grid;
    gap: 2px;
    min-width: 0;
  }

  .root-game-nav--garden .root-game-nav-practice strong {
    overflow: hidden;
    color: var(--forest, #173f32);
    font-size: 11px;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .root-game-nav--garden .root-game-nav-practice small {
    display: block;
    color: var(--muted, #607166);
    font-size: 9px;
    font-weight: 750;
    line-height: 1.15;
  }

  .root-game-nav--garden .root-game-nav-item:hover,
  .root-game-nav--garden .root-game-nav-item:focus-visible {
    background: #eef4e5;
  }

  .root-game-nav a,
  .root-game-nav button {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: flex-start;
    gap: 9px;
    min-height: 42px;
    padding: 5px 8px;
    text-align: left;
    transition: border-color 140ms ease, background 140ms ease, color 140ms ease, transform 140ms ease;
  }

  .root-game-nav a:hover,
  .root-game-nav button:hover {
    transform: translateX(2px);
  }

  .root-game-nav a:hover .root-game-nav-item-icon,
  .root-game-nav button:hover .root-game-nav-item-icon {
    background: rgba(210, 159, 56, 0.2);
    color: #765b18;
  }

  .root-game-nav a[aria-current="page"] .root-game-nav-item-icon {
    background: rgba(255, 253, 247, 0.18);
    color: #fff7c9;
  }

  .root-game-nav .lrl-member-shell--game {
    position: relative;
    top: auto;
    right: auto;
    display: flex;
    width: 100%;
    margin-top: 2px;
  }

  .root-game-nav .lrl-member-shell__trigger {
    width: 100%;
    min-height: 38px;
    justify-content: flex-start;
    border-color: var(--line, rgba(29, 69, 52, 0.22));
    border-radius: 7px;
    padding: 4px 8px;
    background: #fffdf7;
    box-shadow: 0 3px 8px rgba(20, 54, 41, 0.08);
  }

  .root-game-nav .lrl-member-shell__panel {
    top: calc(100% + 7px);
    right: auto;
    left: 0;
    width: min(280px, calc(100vw - 24px));
    max-height: calc(100dvh - var(--hud-height) - 28px - env(safe-area-inset-bottom));
  }

  .root-game-wallet {
    grid-column: 4;
  }
}

@media (max-width: 760px) {
  :root {
    --hud-height: 99px;
    --hud-top: 6px;
    --hud-inset: 6px;
  }

  .root-game-hud {
    --hud-status-value-size: 13px;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    grid-template-rows: 48px 37px;
    gap: 4px;
    min-height: var(--hud-height);
    padding: 4px;
  }

  .root-game-brand {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    min-width: 0;
    justify-content: center;
  }

  .root-game-brand img {
    width: 32px;
    height: 32px;
  }

  .root-game-brand span {
    display: none;
  }

  .root-game-nav-menu > summary {
    width: 32px;
    height: 32px;
    font-size: 18px;
  }

  .root-game-nav-menu {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
  }

  .root-game-nav {
    top: calc(var(--hud-height) - 12px);
    left: -38px;
    max-width: calc(100vw - max(20px, var(--hud-safe-left)) - max(20px, var(--hud-safe-right)));
    max-height: calc(100dvh - var(--hud-height) - 18px - env(safe-area-inset-bottom));
  }

  .root-game-level-meter {
    position: relative;
    top: auto;
    left: auto;
    z-index: 2;
    grid-column: 3 / 7;
    grid-row: 1;
    grid-template-columns: 30px minmax(0, 1fr);
    align-self: center;
    justify-self: stretch;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding-inline: 4px 6px;
    transform: none;
  }

  .root-game-level-medallion {
    width: 30px;
    height: 30px;
  }

  .root-game-level-medallion img {
    width: 24px;
    height: 24px;
  }

  .root-game-level-medallion b {
    font-size: 14px;
  }

  .root-game-level-copy strong {
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .root-game-level-copy em {
    overflow: hidden;
    font-size: 10px;
    font-variant-numeric: tabular-nums;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .root-game-wallet {
    display: contents;
  }

  .root-game-wallet > .root-game-wallet-currency {
    display: grid;
    grid-row: 2;
    width: 100%;
    min-width: 0;
    min-height: 35px;
    grid-template-columns: 16px minmax(0, auto);
    grid-template-rows: 1fr;
    align-content: center;
    justify-content: center;
    column-gap: 3px;
    overflow: hidden;
    padding: 2px;
  }

  .root-game-wallet > .root-game-wallet-currency.is-seed-token {
    grid-column: 1 / 3;
  }

  .root-game-wallet > .root-game-wallet-currency.is-garden-coin {
    grid-column: 3 / 5;
  }

  .root-game-wallet > .root-game-wallet-currency.is-produce {
    grid-column: 5 / 7;
  }

  .root-game-wallet > .root-game-wallet-currency.is-focus-energy {
    grid-column: 7 / 9;
    grid-template-rows: 16px 10px;
    row-gap: 1px;
  }

  .root-game-wallet-currency .root-game-currency-icon {
    grid-column: 1;
    grid-row: 1;
    width: 18px;
    height: 18px;
  }

  .root-game-wallet-currency b {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    min-width: 0;
    font-size: var(--hud-status-value-size);
    font-variant-numeric: tabular-nums;
    line-height: 1;
    white-space: nowrap;
  }

  .root-game-wallet-currency.is-focus-energy b::after {
    color: #6f5f39;
    font: 800 9px/1 system-ui, sans-serif;
    content: "/" attr(data-focus-cap);
  }

  .root-game-focus-recovery {
    grid-column: 2;
    grid-row: 2;
    align-self: center;
    justify-content: flex-start;
    gap: 2px;
    margin: 0;
    border: 0;
    padding: 0;
    background: transparent;
    font-size: 8px;
  }

  .root-game-focus-recovery::before,
  .root-game-focus-recovery > span {
    display: none;
  }

  .root-game-focus-recovery time {
    width: 5ch;
    min-width: 5ch;
    text-align: left;
  }

  .root-game-wallet-currency small {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .root-game-wallet button {
    z-index: 3;
    grid-row: 1;
    align-self: center;
    justify-self: center;
    width: 32px;
    min-width: 32px;
    min-height: 32px;
    overflow: hidden;
    padding: 0;
    font-size: 0;
  }

  .root-game-wallet .root-course-daily-button,
  .root-game-wallet .root-game-testing-refill {
    grid-column: 7;
  }

  .root-game-wallet [data-fullscreen],
  .root-game-wallet [data-course-fullscreen] {
    grid-column: 8;
  }

  .root-game-wallet [data-fullscreen]::before,
  .root-game-wallet [data-course-fullscreen]::before {
    content: "\26F6";
    font-size: 17px;
  }

  .root-game-wallet .root-game-testing-refill[hidden] {
    display: none;
  }

  .root-game-nav .lrl-member-shell__identity {
    display: grid;
  }
}

@media (max-width: 520px) {
  .root-game-xp-win {
    padding: 12px;
  }

  .root-game-xp-win-panel {
    padding: 22px 20px 24px;
  }

  .root-game-xp-win-amount {
    font-size: 30px;
  }

  .root-game-xp-win-panel h2 {
    font-size: 22px;
  }
}

@media (max-width: 360px) {
  :root {
    --hud-inset: 4px;
  }

  .root-game-hud {
    --hud-status-value-size: 12px;
    gap: 3px;
    padding-inline: 3px;
  }

  .root-game-brand img,
  .root-game-nav-menu > summary,
  .root-game-wallet button {
    width: 30px;
    height: 30px;
  }

  .root-game-level-meter {
    grid-template-columns: 27px minmax(0, 1fr);
    gap: 4px;
    padding-inline: 3px 4px;
  }

  .root-game-level-medallion {
    width: 27px;
    height: 27px;
  }

  .root-game-level-medallion img {
    width: 21px;
    height: 21px;
  }

  .root-game-level-copy small {
    font-size: 8px;
  }

  .root-game-level-copy strong {
    font-size: 12px;
  }

  .root-game-level-copy em {
    font-size: 9px;
  }

  .root-game-wallet > .root-game-wallet-currency {
    grid-template-columns: 15px minmax(0, auto);
    column-gap: 2px;
  }

  .root-game-wallet-currency .root-game-currency-icon {
    width: 15px;
    height: 15px;
  }

  .root-game-wallet-currency.is-focus-energy b::after {
    font-size: 8px;
  }

  .root-game-focus-recovery {
    font-size: 7px;
  }
}

.root-game-shell:fullscreen .root-game-hud,
.root-course-game-shell:fullscreen .root-game-hud,
.root-game-shell.is-browser-fullscreen .root-game-hud {
  top: max(var(--hud-top), var(--hud-safe-top));
  right: max(var(--hud-inset), var(--hud-safe-right));
  left: max(var(--hud-inset), var(--hud-safe-left));
}

@media (prefers-reduced-motion: reduce) {
  .root-game-level-track i,
  .root-game-currency-icon.is-focus-energy,
  .root-game-xp-flyout.is-visible,
  .root-game-xp-win,
  .root-game-xp-win-panel,
  .root-game-xp-win-emblem,
  .root-game-xp-win-particles i {
    transition: none;
    animation: none;
  }
}

/* Farm water belongs to the core HUD so its remaining utility is always visible. */
:root {
  --hud-height: 90px;
}

.root-game-hud {
  padding-bottom: 25px;
}

.root-game-hud .root-game-water-meter {
  position: absolute;
  right: 12px;
  bottom: 4px;
  left: 12px;
  display: grid;
  min-height: 18px;
  grid-template-columns: auto minmax(100px, 1fr) auto minmax(0, auto);
  align-items: center;
  gap: 7px;
  margin: 0;
  border-top: 1px solid rgba(39, 111, 128, 0.15);
  padding: 4px 3px 0;
  color: var(--forest, #173f32);
  text-decoration: none;
}

.root-game-hud .root-game-water-meter > span {
  grid-column: 1;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #276f80;
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.root-game-hud .root-game-water-track {
  position: relative;
  grid-column: 2;
  width: 100%;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(39, 111, 128, 0.16);
}

.root-game-hud .root-game-water-track > b {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #4cabc2, #82d5e4);
  transform: scaleX(1);
  transform-origin: left center;
  transition: transform 180ms ease, background 180ms ease;
}

.root-game-hud .root-game-water-meter[data-water-state="low"] .root-game-water-track > b {
  background: #d59b35;
}

.root-game-hud .root-game-water-meter[data-water-state="critical"] .root-game-water-track > b,
.root-game-hud .root-game-water-meter[data-water-state="empty"] .root-game-water-track > b {
  background: var(--coral-dark, #b65244);
}

.root-game-hud .root-game-water-meter > strong {
  grid-column: 3;
  font-family: inherit;
  font-size: 10px;
  line-height: 1;
  white-space: nowrap;
}

.root-game-hud .root-game-water-meter > small {
  grid-column: 4;
  max-width: 190px;
  overflow: hidden;
  color: #276f80;
  font-size: 8px;
  font-weight: 800;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.root-game-hud .root-game-water-meter:focus-visible {
  border-radius: 5px;
  outline: 3px solid #ffd66b;
  outline-offset: 1px;
}

@media (max-width: 760px) {
  :root {
    --hud-height: 126px;
  }

  .root-game-hud {
    grid-template-rows: 48px 37px 25px;
    padding: 4px;
  }

  .root-game-hud .root-game-water-meter {
    position: static;
    grid-column: 1 / 9;
    grid-row: 3;
    min-height: 25px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 6px;
    margin: 0;
    border-top: 1px solid rgba(39, 111, 128, 0.18);
    padding: 3px 7px 0;
  }

  .root-game-hud .root-game-water-meter > span {
    grid-column: 1;
    font-size: 8px;
  }

  .root-game-hud .root-game-water-track {
    grid-column: 2;
    height: 5px;
  }

  .root-game-hud .root-game-water-meter > strong {
    grid-column: 3;
    font-size: 9px;
  }

  .root-game-hud .root-game-water-meter > small {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }
}
