.wwf-tree-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: #EDE2D2;
  border: 1px solid rgba(43, 29, 22, 0.14);
}
.wwf-tree-tab {
  min-height: 38px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #69564C;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 10px;
}
.wwf-tree-tab.is-active {
  background: #7E2534;
  color: #FFF9F4;
}
.wwf-tree-guide {
  padding: 10px 12px;
  border-radius: 12px;
  background: #F5EDE1;
  border: 1px solid rgba(169, 129, 71, 0.35);
  font-size: 13px;
  line-height: 1.45;
  color: #3D2C23;
}
.wwf-tree-themes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.wwf-tree-theme-btn {
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(43, 29, 22, 0.25);
  background: #FCF8F1;
  color: #2B1D16;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.wwf-tree-theme-btn.is-selected {
  background: #F3E3E4;
  border-color: #7E2534;
  color: #7E2534;
  font-weight: 600;
}
.wwf-tree-stage {
  background: linear-gradient(180deg, #101E16 0%, #15251C 100%);
  color: #F6EADB;
  border-radius: 22px;
  padding: 20px;
  border: 1px solid rgba(217, 184, 114, 0.42);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.wwf-tree-stage.theme-snow { background: linear-gradient(180deg, #142230 0%, #1B2E3D 100%); }
.wwf-tree-stage.theme-burgundy { background: linear-gradient(180deg, #271117 0%, #381820 100%); }
.wwf-tree-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.wwf-tree-actions-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}
.wwf-tree-pill {
  font-family: var(--wwf-font-sans);
  font-variant-numeric: lining-nums tabular-nums;
  font-size: 12px;
  font-weight: 600;
  color: #F6EADB;
  background: rgba(24, 16, 12, 0.65);
  border: 1px solid rgba(217, 184, 114, 0.45);
  padding: 5px 11px;
  border-radius: 999px;
}
.wwf-tree-reset {
  font-family: var(--wwf-font-sans);
  font-size: 12px;
  font-weight: 500;
  color: #F6EADB;
  background: transparent;
  border: 1px solid rgba(246, 234, 219, 0.32);
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
}
.wwf-tree-reset:hover { border-color: #D9B872; }
.wwf-orn-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.wwf-orn-choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 6px;
  border-radius: 12px;
  border: 1px solid rgba(43, 29, 22, 0.18);
  background: #F5EDE1;
  color: #2B1D16;
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease, transform 150ms ease;
}
.wwf-orn-choice:hover { transform: translateY(-1px); border-color: #A98147; }
.wwf-orn-choice.is-selected {
  background: #F3E3E4;
  border-color: #7E2534;
  color: #7E2534;
  font-weight: 600;
}
.wwf-tree-canvas {
  position: relative;
  width: 100%;
  max-width: 520px;
  aspect-ratio: 3 / 4;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(217, 184, 114, 0.32);
}
.wwf-tree-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.wwf-fx-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.wwf-snow {
  position: absolute;
  top: -8%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 250, 240, 0.95) 0%, rgba(255, 250, 240, 0) 72%);
  animation: wwf-snowfall 9s linear infinite;
}
.wwf-fairy {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 232, 163, 0.95) 0%, rgba(255, 214, 110, 0.35) 45%, rgba(255, 214, 110, 0) 75%);
  animation: wwf-twinkle 2.8s ease-in-out infinite;
}
.wwf-tree-nodes {
  position: absolute;
  inset: 0;
}
.wwf-branch-node {
  position: absolute;
  transform: translate(-50%, -35%);
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  z-index: 2;
  transform-origin: 50% 0%;
  transition: transform 180ms ease;
}
.wwf-branch-node:hover { transform: translate(-50%, -40%) scale(1.1); z-index: 6; }
.wwf-branch-node:not(.is-open) { animation: wwf-sway 4.4s ease-in-out infinite; }
.wwf-branch-node.is-just-hung { animation: wwf-pop 520ms cubic-bezier(0.22, 1, 0.36, 1) 1; }
.wwf-branch-node.is-open {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1.5px dashed rgba(252, 248, 241, 0.72);
  background: rgba(16, 26, 20, 0.56);
  color: #F6EADB;
  font-family: var(--wwf-font-sans);
  font-size: 15px;
  font-weight: 700;
  justify-content: center;
  transform: translate(-50%, -50%);
  backdrop-filter: blur(2px);
}
.wwf-branch-node.is-open.is-targeted {
  border-style: solid;
  border-color: #E8C678;
  background: rgba(217, 184, 114, 0.42);
  box-shadow: 0 0 0 5px rgba(217, 184, 114, 0.25);
}
.wwf-branch-icon {
  width: 38px;
  height: 44px;
  filter: drop-shadow(0 5px 8px rgba(0, 0, 0, 0.65));
}
.wwf-branch-tag {
  background: rgba(252, 248, 241, 0.96);
  color: #2B1D16;
  border: 1px solid rgba(169, 129, 71, 0.78);
  border-radius: 999px;
  padding: 2px 8px;
  font-family: var(--wwf-font-sans);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  max-width: 82px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.45);
}
.wwf-tree-node-active .wwf-branch-tag {
  background: #7E2534;
  color: #FFF9F4;
  border-color: #F6EADB;
}
.wwf-tree-preview {
  background: rgba(252, 248, 241, 0.96);
  color: #2B1D16;
  border-radius: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(217, 184, 114, 0.6);
  font-size: 14px;
  line-height: 1.45;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
@keyframes wwf-snowfall {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  12% { opacity: 0.85; }
  88% { opacity: 0.75; }
  100% { transform: translateY(680px) translateX(18px); opacity: 0; }
}
@keyframes wwf-twinkle {
  0%, 100% { opacity: 0.28; transform: scale(0.82); }
  50% { opacity: 1; transform: scale(1.22); }
}
@keyframes wwf-sway {
  0%, 100% { transform: translate(-50%, -35%) rotate(-2.2deg); }
  50% { transform: translate(-50%, -35%) rotate(2.2deg); }
}
@keyframes wwf-pop {
  0% { transform: translate(-50%, -35%) scale(0.45); }
  65% { transform: translate(-50%, -35%) scale(1.22); }
  100% { transform: translate(-50%, -35%) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .wwf-snow, .wwf-fairy, .wwf-branch-node { animation: none !important; }
}
@media (max-width: 520px) {
  .wwf-tree-stage { padding: 14px; }
  .wwf-branch-icon { width: 30px; height: 34px; }
  .wwf-branch-tag { font-size: 12px; padding: 1px 6px; max-width: 66px; }
}