:root {
  color-scheme: dark;
  --gold: #d9ad63;
  --gold-soft: #ffe3a5;
  --text: #f5dfbd;
  --muted: rgba(245, 223, 189, 0.7);
  --dim: rgba(245, 223, 189, 0.46);
  --panel: rgba(16, 17, 19, 0.66);
  --panel-strong: rgba(18, 17, 18, 0.86);
  --line: rgba(233, 183, 104, 0.22);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background: #090d13;
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

.site-menu {
  display: none !important;
}

.app-shell {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  height: 100vh;
  background:
    radial-gradient(circle at 52% 42%, rgba(237, 143, 68, 0.2), transparent 34%),
    radial-gradient(circle at 72% 18%, rgba(99, 82, 151, 0.18), transparent 22%),
    linear-gradient(180deg, #111827 0%, #12161d 48%, #080b0d 100%);
}

.rail {
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 24px 10px;
  border-right: 1px solid rgba(255, 230, 184, 0.08);
  background: linear-gradient(180deg, rgba(12, 17, 21, 0.96), rgba(9, 12, 12, 0.9));
  box-shadow: 20px 0 80px rgba(0, 0, 0, 0.25);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
  color: var(--gold);
  font-size: 28px;
}

.nav-item {
  display: grid;
  place-items: center;
  gap: 7px;
  width: 62px;
  min-height: 66px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: rgba(245, 223, 189, 0.68);
  font-size: 12px;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
}

.nav-item span {
  color: rgba(217, 173, 99, 0.88);
  font-size: 22px;
  line-height: 1;
}

.nav-item.active,
.nav-item:hover {
  border-color: rgba(217, 173, 99, 0.18);
  background: linear-gradient(180deg, rgba(217, 173, 99, 0.18), rgba(217, 173, 99, 0.06));
  color: var(--text);
}

.content {
  position: relative;
  min-width: 0;
  height: 100vh;
  overflow: hidden;
}

.content.workspace-open {
  overflow: auto;
  scrollbar-gutter: stable;
}

.content.workspace-open .hero-copy,
.content.workspace-open .toolbar,
.content.workspace-open .daily-card,
.content.workspace-open .dock {
  opacity: 0;
  pointer-events: none;
}

.content.workspace-open .forest-world {
  opacity: 0.32;
  filter: blur(1px) saturate(0.82);
}

.forest-window {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(5, 7, 10, 0.62), transparent 22%, transparent 76%, rgba(5, 7, 10, 0.34)),
    linear-gradient(180deg, rgba(8, 11, 18, 0.12), transparent 42%, rgba(4, 7, 6, 0.38)),
    url("./assets/forest-hero.png") center / cover no-repeat,
    linear-gradient(180deg, #111827 0%, #1b1d2a 42%, #101410 100%);
}

.forest-window::before {
  position: absolute;
  inset: -8%;
  background:
    linear-gradient(90deg, rgba(5, 7, 10, 0.52), transparent 22%, transparent 76%, rgba(5, 7, 10, 0.32)),
    url("./assets/forest-hero.png") center / cover no-repeat;
  content: "";
  filter: blur(18px) saturate(1.08);
  opacity: 0.58;
  pointer-events: none;
  transform: scale(1.08);
}

.forest-window::after {
  position: absolute;
  inset: 0;
  z-index: 3;
  background:
    linear-gradient(90deg, rgba(5, 7, 9, 0.5), transparent 18%, transparent 82%, rgba(5, 7, 9, 0.32)),
    linear-gradient(180deg, rgba(8, 11, 18, 0.2), transparent 38%, rgba(5, 8, 7, 0.26));
  content: "";
  pointer-events: none;
}

.sky-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 72% 14%, rgba(255, 232, 172, 0.35), transparent 3.5%),
    radial-gradient(circle at 46% 5%, rgba(255, 255, 255, 0.46) 0 1px, transparent 1.5px),
    radial-gradient(circle at 30% 18%, rgba(255, 255, 255, 0.36) 0 1px, transparent 1.5px),
    radial-gradient(circle at 88% 29%, rgba(255, 255, 255, 0.38) 0 1px, transparent 1.5px),
    linear-gradient(180deg, rgba(10, 16, 28, 0.22) 0%, transparent 56%);
  opacity: 0.48;
}

.sky-layer::after {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(255, 238, 197, 0.56) 0 1px, transparent 1.3px),
    radial-gradient(circle, rgba(255, 185, 94, 0.38) 0 1px, transparent 1.2px);
  background-position:
    0 0,
    80px 40px;
  background-size:
    140px 140px,
    210px 210px;
  content: "";
  opacity: 0.5;
  animation: starDrift 30s linear infinite;
}

.mountains {
  position: absolute;
  z-index: 1;
  right: -5%;
  bottom: 23%;
  left: -5%;
  height: 27%;
  clip-path: polygon(0 100%, 0 64%, 8% 56%, 15% 68%, 25% 42%, 36% 68%, 47% 46%, 58% 66%, 68% 39%, 80% 61%, 90% 49%, 100% 69%, 100% 100%);
}

.mountains.far {
  background: linear-gradient(180deg, rgba(70, 75, 94, 0.36), rgba(21, 24, 29, 0.44));
}

.mountains.near {
  bottom: 15%;
  height: 24%;
  background: linear-gradient(180deg, rgba(46, 53, 43, 0.56), rgba(13, 18, 14, 0.82));
  filter: blur(0.4px);
}

.mist {
  position: absolute;
  z-index: 2;
  right: -20%;
  bottom: 18%;
  left: -20%;
  height: 32%;
  background:
    radial-gradient(ellipse at 45% 50%, rgba(255, 219, 153, 0.26), transparent 52%),
    radial-gradient(ellipse at 65% 58%, rgba(186, 151, 214, 0.12), transparent 45%);
  filter: blur(16px);
  pointer-events: none;
}

.forest-world {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  width: 1672px;
  height: 941px;
  transform-origin: center center;
  transition: transform 420ms cubic-bezier(0.2, 0.8, 0.25, 1);
  will-change: transform;
}

.forest-world.dragging {
  transition: none;
  cursor: grabbing;
}

.forest-world::before {
  position: absolute;
  inset: -6% -6%;
  background:
    radial-gradient(ellipse at 52% 58%, rgba(255, 196, 108, 0.08), transparent 58%),
    radial-gradient(ellipse at 50% 84%, rgba(0, 0, 0, 0.16), transparent 50%),
    linear-gradient(90deg, rgba(8, 11, 14, 0.5), transparent 23%, transparent 76%, rgba(7, 9, 12, 0.25)),
    linear-gradient(180deg, rgba(9, 13, 20, 0.06), transparent 44%, rgba(6, 8, 8, 0.18)),
    url("./assets/forest-hero.png") center 42% / 112% auto no-repeat;
  content: "";
  pointer-events: none;
}

.forest-world::after {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 55% 52%, transparent 26%, rgba(4, 6, 8, 0.12) 72%),
    linear-gradient(180deg, rgba(5, 8, 12, 0.12), transparent 45%, rgba(4, 7, 6, 0.34));
  content: "";
  pointer-events: none;
}

.path {
  position: absolute;
  border: 1px dashed rgba(255, 224, 163, 0.32);
  border-color: rgba(255, 224, 163, 0.32) transparent transparent;
  border-radius: 50%;
  pointer-events: none;
}

.tree-card {
  position: absolute;
  width: var(--tree-width);
  height: var(--tree-height);
  transform: translate(-50%, -100%);
  border: 0;
  background: transparent;
  color: inherit;
  outline: none;
  text-align: left;
  filter:
    brightness(var(--tree-brightness, 1))
    drop-shadow(0 0 calc(22px * var(--tree-glow, 0)) color-mix(in srgb, var(--accent), transparent 38%))
    drop-shadow(0 28px 32px rgba(0, 0, 0, 0.34));
  transition:
    filter 220ms ease,
    transform 220ms ease;
}

.tree-card:focus-visible {
  filter:
    brightness(var(--tree-brightness, 1))
    drop-shadow(0 0 22px color-mix(in srgb, var(--accent), transparent 18%))
    drop-shadow(0 30px 36px rgba(0, 0, 0, 0.38));
}

.tree-card:hover,
.tree-card.focused {
  z-index: 5;
  filter:
    brightness(var(--tree-brightness, 1))
    drop-shadow(0 0 20px color-mix(in srgb, var(--accent), transparent 25%))
    drop-shadow(0 30px 36px rgba(0, 0, 0, 0.38));
  transform: translate(-50%, -100%) scale(1.025);
}

.canopy {
  position: absolute;
  left: 50%;
  top: 10%;
  width: 96%;
  height: 68%;
  transform: translateX(-50%);
  transform-origin: center bottom;
  animation: treeBreath 7.5s ease-in-out infinite;
}

.wish-branches {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.branch {
  position: absolute;
  left: var(--branch-left);
  top: var(--branch-top);
  width: var(--branch-width);
  height: var(--branch-thick);
  border-radius: 999px 70% 70% 999px;
  background:
    linear-gradient(90deg, rgba(62, 38, 25, 0.96), rgba(120, 76, 42, 0.82) 44%, rgba(38, 24, 18, 0.58));
  box-shadow:
    inset 0 2px 4px rgba(255, 219, 156, 0.12),
    inset 0 -2px 5px rgba(0, 0, 0, 0.26),
    0 0 10px rgba(245, 181, 90, 0.12),
    0 4px 10px rgba(0, 0, 0, 0.22);
  opacity: 0.86;
  transform: rotate(var(--branch-rotate));
  transform-origin: left center;
}

.branch::before {
  position: absolute;
  right: 8%;
  top: -7px;
  width: 38%;
  height: max(2px, calc(var(--branch-thick) * 0.38));
  border-radius: 999px;
  background: rgba(62, 38, 25, 0.74);
  content: "";
  transform: rotate(var(--twig-rotate));
  transform-origin: left center;
}

.branch::after {
  position: absolute;
  right: 10%;
  top: 50%;
  width: 6px;
  height: 6px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: rgba(255, 213, 139, 0.58);
  box-shadow: 0 0 10px rgba(244, 183, 89, 0.28);
  content: "";
}

.canopy::before {
  position: absolute;
  inset: 12% 7% 0;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent), transparent 58%), transparent 68%);
  filter: blur(22px);
  opacity: 0;
  transition: opacity 220ms ease;
  content: "";
}

.tree-card:hover .canopy::before,
.tree-card.focused .canopy::before {
  opacity: 0.85;
}

.tree-card:nth-child(2n) .canopy {
  animation-delay: -2s;
}

.tree-card:nth-child(3n) .canopy {
  animation-delay: -4s;
}

.tree-card[data-type="giant"] .canopy {
  width: 104%;
  height: 76%;
}

.leaf {
  position: absolute;
  z-index: 0;
  left: var(--leaf-left);
  top: var(--leaf-top);
  width: var(--leaf-size);
  height: calc(var(--leaf-size) * 0.82);
  border-radius: 68% 18% 62% 22%;
  background:
    radial-gradient(circle at 36% 28%, color-mix(in srgb, var(--accent), white 38%), transparent 24%),
    radial-gradient(circle at 70% 72%, rgba(0, 0, 0, 0.28), transparent 42%),
    var(--leaf-gradient);
  box-shadow:
    inset 0 12px 24px rgba(255, 245, 203, 0.08),
    inset 0 -22px 36px rgba(0, 0, 0, 0.2),
    0 0 24px color-mix(in srgb, var(--accent), transparent 68%);
  opacity: var(--leaf-opacity);
  transform: translate(-50%, -50%) rotate(var(--leaf-rotate)) skew(-4deg, 2deg);
  transform-origin: center;
  pointer-events: none;
}

.trunk {
  position: absolute;
  left: 50%;
  bottom: 16px;
  z-index: 1;
  width: calc(var(--tree-width) * 0.16);
  height: 64%;
  transform: translateX(-50%) rotate(-1.5deg);
  border-radius: 54% 46% 20px 18px / 70% 66% 24px 22px;
  background:
    radial-gradient(ellipse at 72% 28%, rgba(255, 218, 154, 0.13), transparent 28%),
    linear-gradient(90deg, rgba(255, 224, 166, 0.24), transparent 22%, rgba(0, 0, 0, 0.2) 78%),
    linear-gradient(180deg, rgba(128, 86, 50, 0.95), rgba(79, 49, 31, 0.95) 54%, rgba(37, 25, 20, 0.94));
  clip-path: polygon(42% 0, 62% 0, 73% 100%, 17% 100%);
  box-shadow:
    inset -12px 0 22px rgba(0, 0, 0, 0.28),
    inset 7px 0 14px rgba(255, 218, 154, 0.09),
    0 0 22px rgba(238, 169, 82, 0.08);
}

.bark-ridges,
.bark-ridges::before,
.bark-ridges::after {
  position: absolute;
  inset: 8% 24% 8% 33%;
  border-radius: 50%;
  border-left: 2px solid rgba(31, 20, 16, 0.44);
  border-right: 1px solid rgba(255, 222, 164, 0.14);
  content: "";
}

.bark-ridges::before {
  inset: 15% -28% 6% 32%;
  transform: rotate(5deg);
}

.bark-ridges::after {
  inset: 4% 30% 14% -24%;
  transform: rotate(-7deg);
}

.roots {
  position: absolute;
  left: 50%;
  bottom: 9px;
  z-index: 0;
  width: calc(var(--tree-width) * 0.46);
  height: calc(var(--tree-height) * 0.09);
  transform: translateX(-50%);
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 50% 18%, rgba(97, 61, 35, 0.92) 0 18%, transparent 19%),
    linear-gradient(20deg, transparent 0 15%, rgba(58, 37, 24, 0.78) 16% 27%, transparent 28%),
    linear-gradient(-18deg, transparent 0 18%, rgba(72, 45, 27, 0.8) 19% 32%, transparent 33%),
    linear-gradient(0deg, transparent 0 44%, rgba(41, 30, 20, 0.7) 45% 62%, transparent 63%);
  filter: blur(0.1px);
  opacity: 0.92;
}

.fruit {
  position: absolute;
  z-index: 2;
  width: calc(var(--fruit-size) * 0.62);
  height: calc(var(--fruit-size) * 3.4);
  border: 1px solid color-mix(in srgb, var(--fruit-color), white 24%);
  border-radius: 999px 999px 4px 4px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.32), transparent 22%, rgba(0, 0, 0, 0.12) 82%),
    linear-gradient(180deg, color-mix(in srgb, var(--fruit-color), white 18%), var(--fruit-color) 52%, color-mix(in srgb, var(--fruit-color), #180e0c 38%));
  box-shadow:
    0 0 8px color-mix(in srgb, var(--fruit-color), white 22%),
    0 0 20px color-mix(in srgb, var(--fruit-color), transparent 48%);
  transform: translate(-50%, -8%) rotate(var(--fruit-rotate));
  transform-origin: center 0;
  animation: fruitPulse 4.8s ease-in-out infinite;
  mix-blend-mode: screen;
  cursor: pointer;
}

.fruit::before {
  position: absolute;
  left: 50%;
  top: -18px;
  width: 7px;
  height: 21px;
  transform: translateX(-50%);
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 4px, color-mix(in srgb, var(--fruit-color), white 48%) 0 3px, transparent 3.5px),
    linear-gradient(90deg, transparent 0 3px, color-mix(in srgb, var(--fruit-color), white 32%) 3px 4px, transparent 4px);
  box-shadow: 0 0 8px color-mix(in srgb, var(--fruit-color), white 24%);
  content: "";
}

.tree-card:hover .fruit {
  animation-name: fruitPulse, fruitSwing;
}

.fruit-message {
  position: absolute;
  z-index: 8;
  width: min(230px, calc(var(--tree-width) * 0.82));
  transform: translate(-50%, -112%) scale(0.96);
  border: 1px solid rgba(255, 225, 171, 0.26);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(12, 12, 13, 0.82);
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.34),
    0 0 18px color-mix(in srgb, var(--accent), transparent 68%);
  color: rgba(255, 242, 218, 0.94);
  font-size: 12px;
  line-height: 1.55;
  opacity: 0;
  pointer-events: none;
  text-align: left;
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.fruit-message span {
  display: block;
  margin-bottom: 4px;
  color: var(--accent);
  font-size: 11px;
}

.fruit-message.show {
  opacity: 1;
  transform: translate(-50%, -122%) scale(1);
}

.tree-label {
  position: absolute;
  left: 50%;
  z-index: 4;
  width: max-content;
  max-width: 190px;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 225, 171, 0.18);
  border-radius: 8px;
  background: rgba(12, 12, 13, 0.6);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(12px);
}

.tree-label {
  top: 63%;
  padding: 8px 12px;
  text-align: center;
}

.tree-label strong,
.tree-label span {
  display: block;
}

.tree-label strong {
  font-size: 14px;
}

.tree-label span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.tree-shadow {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: calc(var(--tree-width) * 0.7);
  height: calc(var(--tree-height) * 0.11);
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.36), transparent 68%);
  filter: blur(4px);
  display: block;
}

.hero-copy {
  position: absolute;
  z-index: 8;
  top: 48px;
  left: 36px;
  width: 350px;
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p,
blockquote {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  color: #f7d9a8;
  font-size: clamp(44px, 4vw, 68px);
  font-weight: 520;
  letter-spacing: 0;
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
}

.subtitle {
  margin-bottom: 42px;
  color: rgba(245, 223, 189, 0.82);
  font-size: 18px;
  line-height: 1.85;
}

.stats-panel,
.primary-action {
  pointer-events: auto;
}

.stats-panel {
  display: grid;
  gap: 18px;
  margin-bottom: 28px;
}

.stats-panel strong {
  margin-right: 8px;
  color: #ffe2ad;
  font-family: Georgia, serif;
  font-size: 30px;
  font-weight: 500;
}

.stats-panel span {
  color: rgba(245, 223, 189, 0.88);
}

.stats-panel small {
  display: block;
  margin-top: 4px;
  color: var(--dim);
  font-size: 12px;
}

.stat-label {
  display: block;
  margin-bottom: 10px;
  font-size: 14px;
}

.tag-cloud,
.panel-tags,
.panel-symbols {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-pill,
.panel-tags span,
.panel-symbols span,
.daily-meta em {
  border: 1px solid rgba(255, 222, 168, 0.16);
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(217, 173, 99, 0.1);
  color: #f1d297;
  font-size: 12px;
  font-style: normal;
}

.primary-action,
.solid-action {
  min-height: 42px;
  border: 1px solid rgba(255, 226, 176, 0.5);
  border-radius: 999px;
  padding: 0 24px;
  background: linear-gradient(135deg, #f3d08b, #b97935);
  color: #22170e;
  font-weight: 700;
  box-shadow: 0 18px 50px rgba(150, 91, 35, 0.28);
}

.toolbar {
  position: absolute;
  z-index: 8;
  top: 26px;
  right: 32px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-box,
.toolbar select,
.dock,
.daily-card,
.tree-panel,
.compose-card {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 22px 56px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(18px);
}

.search-box {
  display: flex;
  align-items: center;
  width: 280px;
  height: 42px;
  gap: 10px;
  border-radius: 999px;
  padding: 0 15px;
  color: var(--dim);
}

.search-box input {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  outline: 0;
}

.toolbar select {
  height: 42px;
  border-radius: 999px;
  padding: 0 16px;
  color: var(--text);
}

.toolbar-action {
  min-height: 42px;
  border: 1px solid rgba(255, 226, 176, 0.36);
  border-radius: 999px;
  padding: 0 16px;
  background: rgba(238, 184, 103, 0.16);
  color: #ffe2ad;
  font-weight: 700;
}

.avatar-button {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 226, 176, 0.25);
  border-radius: 999px;
  background:
    radial-gradient(circle at 35% 25%, #f7d6ad, transparent 23%),
    linear-gradient(135deg, #624532, #172433);
  color: #fff0d4;
  font-weight: 800;
}

.daily-card {
  position: absolute;
  z-index: 8;
  top: 106px;
  right: 32px;
  width: 310px;
  border-radius: 18px;
  padding: 20px;
}

.daily-card blockquote {
  margin-bottom: 18px;
  color: #fff1d2;
  font-size: 20px;
  line-height: 1.65;
}

.daily-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.leaderboard-panel,
.my-tree-panel,
.tree-page-panel {
  position: absolute;
  z-index: 9;
  top: 44px;
  right: 42px;
  bottom: 38px;
  left: 42px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(17, 18, 20, 0.88), rgba(10, 12, 13, 0.74)),
    radial-gradient(circle at 18% 6%, rgba(217, 173, 99, 0.16), transparent 26%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 28px 80px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(20px);
}

.leaderboard-panel[hidden],
.my-tree-panel[hidden],
.tree-page-panel[hidden] {
  display: none;
}

.leaderboard-head,
.my-tree-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.leaderboard-head h2,
.my-tree-head h2 {
  margin-bottom: 0;
  color: #ffe2ad;
  font-size: 36px;
  font-weight: 560;
}

.rank-tabs {
  display: inline-flex;
  gap: 4px;
  border: 1px solid rgba(255, 226, 176, 0.14);
  border-radius: 999px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.04);
}

.rank-tabs button {
  min-width: 66px;
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(245, 223, 189, 0.72);
}

.rank-tabs button.active {
  background: rgba(238, 184, 103, 0.2);
  color: #ffe2ad;
  box-shadow: 0 0 18px rgba(238, 184, 103, 0.12);
}

.podium {
  display: none;
}

.rank-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f0c17a, #5e4030 50%, #293948);
  color: #fff4dc;
  font-weight: 800;
}

.leaderboard-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: start;
  gap: 24px;
  min-height: 0;
  overflow: auto;
  padding: 6px 8px 26px 0;
}

.rank-bubble {
  position: relative;
  display: grid;
  min-height: 220px;
  align-content: space-between;
  gap: 18px;
  border: 1px solid rgba(255, 225, 171, 0.32);
  border-radius: 20px;
  padding: 22px;
  background:
    radial-gradient(circle at 14% 10%, color-mix(in srgb, var(--gold), transparent 74%), transparent 31%),
    radial-gradient(circle at 92% 86%, rgba(94, 73, 44, 0.2), transparent 32%),
    linear-gradient(145deg, rgba(21, 21, 21, 0.82), rgba(9, 10, 11, 0.58));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 0 28px rgba(255, 214, 132, 0.04),
    0 20px 54px rgba(0, 0, 0, 0.34),
    0 0 32px color-mix(in srgb, var(--gold), transparent 86%);
  color: var(--text);
  overflow: hidden;
  text-align: left;
  backdrop-filter: blur(14px) saturate(1.08);
  transition:
    border-color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.rank-bubble::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 226, 176, 0.1), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 42%);
  opacity: 0.82;
  pointer-events: none;
}

.rank-bubble:nth-child(3n + 2) {
  margin-top: 26px;
  min-height: 248px;
}

.rank-bubble:nth-child(3n) {
  margin-top: 10px;
  min-height: 210px;
}

.rank-bubble:nth-child(6n + 4) {
  margin-top: -8px;
}

.rank-bubble:hover {
  border-color: rgba(255, 225, 171, 0.48);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 22px 58px rgba(0, 0, 0, 0.38),
    0 0 40px color-mix(in srgb, var(--gold), transparent 72%);
  transform: translateY(-3px);
}

.rank-bubble-top,
.rank-bubble-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rank-bubble-top {
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

.rank-tag {
  color: #ffe2ad;
  font-size: 13px;
  font-weight: 800;
}

.rank-bubble-top strong {
  color: #ffe2ad;
  font-family: Georgia, serif;
  font-size: 24px;
  font-weight: 700;
}

.rank-bubble-message {
  position: relative;
  z-index: 1;
  color: rgba(255, 242, 218, 0.96);
  font-size: 21px;
  font-weight: 760;
  line-height: 1.62;
}

.rank-bubble-meta {
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
}

.rank-bubble-user {
  color: rgba(255, 242, 218, 0.9);
  font-weight: 800;
}

.my-tree-panel {
  position: relative;
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-height: calc(100vh - 82px);
  margin: 44px 42px 38px;
}

.tree-page-panel {
  position: relative;
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-height: calc(100vh - 82px);
  margin: 44px 42px 38px;
}

.my-tree-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  border: 1px solid rgba(255, 226, 176, 0.15);
  border-radius: 8px;
  padding: 18px;
  background:
    radial-gradient(circle at 8% 10%, rgba(244, 191, 88, 0.15), transparent 24%),
    rgba(255, 255, 255, 0.055);
}

.my-tree-avatar {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f0c17a, #5e4030 50%, #293948);
  color: #fff4dc;
  font-weight: 800;
}

.my-tree-profile {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.my-tree-profile strong {
  color: #ffe2ad;
  font-size: 22px;
}

.my-tree-profile p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.65;
}

.my-tree-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(76px, 1fr));
  gap: 10px;
}

.my-tree-metrics span {
  display: grid;
  gap: 3px;
  border: 1px solid rgba(255, 226, 176, 0.12);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  text-align: center;
}

.my-tree-metrics strong {
  color: #ffe2ad;
  font-size: 24px;
}

.my-wishes {
  display: grid;
  grid-template-rows: auto auto;
  gap: 14px;
  min-height: auto;
}

.my-wishes-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.my-wishes-head h3 {
  margin-bottom: 0;
  color: #f6d9a6;
  font-size: 18px;
}

.my-wish-list {
  columns: 3 260px;
  column-gap: 18px;
  min-height: auto;
  overflow: visible;
  padding: 6px 8px 24px 0;
}

.my-wish-card {
  position: relative;
  display: inline-grid;
  width: 100%;
  break-inside: avoid;
  gap: 14px;
  margin: 0 0 18px;
  border: 1px solid rgba(255, 226, 176, 0.28);
  border-radius: 20px;
  padding: 20px;
  background:
    radial-gradient(circle at 16% 12%, color-mix(in srgb, var(--gold), transparent 76%), transparent 31%),
    linear-gradient(145deg, rgba(21, 21, 21, 0.8), rgba(8, 9, 10, 0.58));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 0 26px rgba(255, 214, 132, 0.04),
    0 18px 46px rgba(0, 0, 0, 0.32),
    0 0 28px color-mix(in srgb, var(--gold), transparent 88%);
  backdrop-filter: blur(14px) saturate(1.08);
  overflow: hidden;
  transform: translateY(calc(var(--wish-offset) * 2px));
}

.my-wish-card.replyable {
  gap: 15px;
}

.my-wish-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 226, 176, 0.1), transparent 38%),
    radial-gradient(circle at 92% 88%, rgba(238, 184, 103, 0.12), transparent 34%);
  pointer-events: none;
}

.my-wish-card > * {
  position: relative;
  z-index: 1;
}

.my-wish-meta,
.my-wish-card footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.my-wish-meta span,
.my-wish-card footer span {
  border: 1px solid rgba(255, 226, 176, 0.14);
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 12px;
}

.my-wish-meta time {
  color: var(--dim);
  font-size: 12px;
}

.my-wish-card p {
  margin-bottom: 0;
  color: rgba(255, 241, 215, 0.92);
  font-size: 18px;
  font-weight: 760;
  line-height: 1.62;
}

.reply-thread {
  display: grid;
  gap: 8px;
  border-top: 1px solid rgba(255, 226, 176, 0.12);
  padding-top: 12px;
}

.reply-thread-title {
  color: rgba(255, 226, 176, 0.9);
  font-size: 12px;
  letter-spacing: 0;
}

.reply-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 6px 8px;
  border: 1px solid rgba(255, 226, 176, 0.1);
  border-radius: 12px;
  padding: 10px 11px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  font-size: 13px;
}

.reply-item strong {
  color: #ffe2ad;
}

.reply-item time,
.reply-empty {
  grid-column: 2;
  color: var(--dim);
  font-size: 12px;
}

.reply-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.reply-form input {
  min-height: 38px;
  border: 1px solid rgba(255, 226, 176, 0.16);
  border-radius: 14px;
  padding: 0 13px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  outline: 0;
}

.reply-form button {
  min-height: 38px;
  border: 1px solid rgba(255, 226, 176, 0.28);
  border-radius: 999px;
  padding: 0 16px;
  background: rgba(238, 184, 103, 0.16);
  color: #ffe2ad;
  font-weight: 700;
}

.empty-state-inline {
  border: 1px solid rgba(255, 226, 176, 0.14);
  border-radius: 8px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
}

#daily-avatar,
.panel-avatar {
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #f0c17a, #5e4030 50%, #293948);
  color: #fff4dc;
  font-weight: 800;
}

#daily-avatar {
  width: 32px;
  height: 32px;
}

.tree-panel {
  position: absolute;
  z-index: 10;
  top: 96px;
  right: 32px;
  display: grid;
  gap: 20px;
  width: 360px;
  max-height: calc(100vh - 170px);
  overflow: auto;
  border-radius: 20px;
  padding: 24px;
  opacity: 0;
  transform: translateX(28px);
  pointer-events: none;
  transition:
    opacity 220ms ease,
    transform 220ms ease;
}

.tree-panel.open {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.panel-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 226, 176, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 22px;
}

.panel-head {
  display: flex;
  gap: 14px;
  padding-right: 24px;
}

.panel-avatar {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
}

.panel-head h2 {
  margin-bottom: 5px;
  font-size: 24px;
}

.panel-head p,
.featured-message {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.7;
}

.panel-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.panel-metrics span {
  border: 1px solid rgba(255, 226, 176, 0.12);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
}

.panel-metrics strong {
  color: #ffe4aa;
  font-size: 22px;
}

.tree-panel h3 {
  margin-bottom: 8px;
  color: #f6d9a6;
  font-size: 14px;
}

.panel-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1.15fr;
  gap: 10px;
}

.ghost-action {
  min-height: 42px;
  border: 1px solid rgba(255, 226, 176, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.ghost-action.active {
  border-color: rgba(255, 226, 176, 0.46);
  background: rgba(238, 184, 103, 0.2);
  color: #ffe2ad;
  box-shadow: 0 0 22px rgba(238, 184, 103, 0.16);
}

.dock {
  position: absolute;
  z-index: 8;
  right: 32px;
  bottom: 24px;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: min(760px, calc(100% - 150px));
  min-height: 48px;
  transform: translateX(-50%);
  border-radius: 999px;
  padding: 8px 14px;
  color: rgba(245, 223, 189, 0.74);
  font-size: 13px;
}

.dock button {
  min-height: 32px;
  border: 1px solid rgba(255, 226, 176, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(245, 223, 189, 0.82);
  padding: 0 13px;
}

.dock button.active {
  border-color: rgba(255, 226, 176, 0.42);
  background: rgba(238, 184, 103, 0.16);
  color: #ffe2ad;
}

.dock-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(255, 226, 176, 0.12);
  border-radius: 999px;
  padding: 3px;
}

.empty-state {
  position: absolute;
  z-index: 8;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 22px;
  background: var(--panel-strong);
  color: var(--muted);
}

.compose-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(5, 8, 11, 0.1);
  backdrop-filter: blur(1px);
}

.compose-backdrop[hidden] {
  display: none;
}

.access-toast {
  position: fixed;
  z-index: 24;
  right: 28px;
  bottom: 28px;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: min(520px, calc(100vw - 32px));
  border: 1px solid rgba(255, 226, 176, 0.26);
  border-radius: 8px;
  padding: 12px 16px;
  background: rgba(16, 17, 19, 0.88);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.32);
  color: #ffe2ad;
  backdrop-filter: blur(14px);
}

.access-toast button {
  flex: 0 0 auto;
  min-height: 34px;
  border: 1px solid rgba(255, 226, 176, 0.34);
  border-radius: 999px;
  padding: 0 14px;
  background: rgba(238, 184, 103, 0.18);
  color: #ffe2ad;
  font-weight: 700;
}

.access-toast[hidden] {
  display: none;
}

.compose-card {
  position: relative;
  display: grid;
  gap: 14px;
  width: min(520px, 100%);
  border: 1px solid rgba(255, 225, 171, 0.28);
  border-radius: 8px;
  padding: 28px;
  background:
    radial-gradient(circle at 16% 12%, color-mix(in srgb, var(--gold), transparent 76%), transparent 32%),
    linear-gradient(180deg, rgba(16, 17, 18, 0.82), rgba(10, 10, 11, 0.68));
  box-shadow:
    0 22px 58px rgba(0, 0, 0, 0.38),
    0 0 34px color-mix(in srgb, var(--gold), transparent 76%);
  backdrop-filter: blur(10px) saturate(1.08);
}

.compose-card h2 {
  margin-bottom: 0;
  color: rgba(255, 242, 218, 0.96);
  font-size: 28px;
  font-weight: 760;
  line-height: 1.35;
}

.compose-card label {
  display: grid;
  gap: 8px;
  color: rgba(245, 223, 189, 0.76);
  font-size: 13px;
}

.compose-card input,
.compose-card textarea,
.compose-card select {
  width: 100%;
  border: 1px solid rgba(255, 226, 176, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  outline: 0;
}

.compose-card input {
  height: 42px;
  padding: 0 12px;
}

.compose-card textarea {
  min-height: 132px;
  resize: vertical;
  padding: 12px;
  color: rgba(255, 242, 218, 0.96);
  font-size: 16px;
  font-weight: 650;
  line-height: 1.75;
}

.compose-card select {
  height: 42px;
  padding: 0 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.switch-row {
  display: flex !important;
  grid-template-columns: auto 1fr;
  align-items: center;
}

.switch-row input {
  accent-color: var(--gold);
}

.submit {
  justify-self: start;
}

@keyframes starDrift {
  to {
    background-position:
      120px 160px,
      -30px 230px;
  }
}

@keyframes treeBreath {
  0%,
  100% {
    transform: translateX(-50%) rotate(-0.7deg);
  }
  50% {
    transform: translateX(-50%) rotate(0.9deg);
  }
}

@keyframes fruitPulse {
  0%,
  100% {
    opacity: 0.86;
    transform: translate(-50%, -8%) rotate(var(--fruit-rotate)) scaleY(1);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -8%) rotate(calc(var(--fruit-rotate) + 1.2deg)) scaleY(1.04);
  }
}

@keyframes fruitSwing {
  0%,
  100% {
    margin-left: 0;
  }
  50% {
    margin-left: 4px;
  }
}

.growth-pop {
  animation: growthPop 700ms cubic-bezier(0.2, 1.35, 0.22, 1);
}

@keyframes growthPop {
  from {
    opacity: 0;
    transform: translate(-50%, -100%) scale(0.8);
  }
}

@media (max-width: 1180px) {
  .daily-card {
    display: none;
  }

  .toolbar {
    left: 36px;
    right: 24px;
    justify-content: flex-end;
  }

  .hero-copy {
    top: 88px;
  }

  .leaderboard-panel,
  .my-tree-panel,
  .tree-page-panel {
    right: 24px;
    left: 24px;
  }
}

@media (max-width: 860px) {
  body {
    overflow: auto;
  }

  .app-shell {
    grid-template-columns: 1fr;
    min-height: 100vh;
  }

  .rail {
    position: fixed;
    right: 12px;
    bottom: 12px;
    left: 12px;
    z-index: 12;
    flex-direction: row;
    justify-content: space-between;
    height: 68px;
    padding: 8px;
    border: 1px solid rgba(255, 230, 184, 0.12);
    border-radius: 18px;
  }

  .brand-mark,
  .nav-item span {
    display: none;
  }

  .nav-item {
    width: auto;
    min-height: 48px;
    padding: 0 9px;
  }

  .content {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .hero-copy {
    position: relative;
    top: auto;
    left: auto;
    width: auto;
    padding: 28px 22px 0;
  }

  .toolbar {
    position: relative;
    top: auto;
    right: auto;
    left: auto;
    flex-wrap: wrap;
    padding: 20px 22px;
  }

  .search-box {
    width: 100%;
  }

  .toolbar-action {
    flex: 1 1 140px;
  }

  .access-toast {
    right: 16px;
    bottom: 92px;
    left: 16px;
    align-items: stretch;
    flex-direction: column;
  }

  .forest-window {
    position: relative;
    height: 720px;
  }

  .leaderboard-panel,
  .my-tree-panel,
  .tree-page-panel {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    min-height: auto;
    margin: 0 14px 102px;
    max-height: none;
    padding: 16px;
  }

  .leaderboard-head {
    align-items: stretch;
    flex-direction: column;
  }

  .my-tree-head,
  .my-wishes-head {
    align-items: stretch;
    flex-direction: column;
  }

  .rank-tabs {
    width: 100%;
    overflow: auto;
  }

  .rank-tabs button {
    flex: 1 0 auto;
  }

  .rank-bubble {
    margin-top: 0;
    min-height: 190px;
    padding: 18px;
  }

  .rank-bubble-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .rank-bubble-message {
    font-size: 18px;
  }

  .leaderboard-list {
    grid-template-columns: 1fr;
  }

  .my-tree-summary {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 15px;
  }

  .my-tree-metrics {
    grid-template-columns: 1fr;
  }

  .my-wish-list {
    columns: 1;
    column-gap: 0;
    padding: 2px 0 18px;
  }

  .my-wish-card {
    margin-bottom: 14px;
    padding: 17px;
    transform: none;
  }

  .my-wish-card p {
    font-size: 16px;
  }

  .reply-item,
  .reply-form {
    grid-template-columns: 1fr;
  }

  .reply-item time,
  .reply-empty {
    grid-column: auto;
  }

  .forest-world {
    width: 1300px;
    height: 760px;
  }

  .tree-panel {
    top: auto;
    right: 14px;
    bottom: 96px;
    left: 14px;
    width: auto;
    max-height: 62vh;
  }

  .dock {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
