[data-living-evolution] .game-brand,
[data-living-evolution] > .map-button,
[data-living-evolution] > .map-actions,
[data-living-evolution] .tree-tabs,
[data-living-evolution] #map-tutorial { display: none !important; }

[data-living-evolution] { --hud-gold: #eed7a2; --hud-line: #ad8e4e69; --hud-ink: #081623; }
.world-hud, .world-tools { position: absolute; z-index: 760; }
.world-hud {
  inset: max(.7rem, env(safe-area-inset-top)) auto auto max(.7rem, env(safe-area-inset-left));
  display: flex; align-items: center; padding: .22rem; gap: .4rem; max-width: calc(100% - 1.4rem);
  background: linear-gradient(155deg, #182c32, #0b1925);
  border: 1px solid var(--hud-line); border-radius: .8rem;
  box-shadow: 0 6px 20px #0007; color: #f4e8ca;
}
#world-profile {
  min-width: 3.55rem; min-height: 2.65rem; flex: none;
  border: 1px solid #b9a27091; border-radius: .58rem;
  color: var(--hud-gold); font: 760 .84rem system-ui; background: #243c3e; cursor: pointer;
}
#world-wallet { margin: 0; display: flex; gap: .18rem; align-items: stretch; min-width: 0; }
#world-wallet div {
  display: flex; gap: .32rem; padding: .36rem .5rem; align-items: center;
  min-width: 0; border-radius: .38rem; background: #ffffff0a;
}
#world-wallet dt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
#world-wallet dd { margin: 0; font: 720 .79rem system-ui; font-variant-numeric: tabular-nums; white-space: nowrap; }
#world-wallet span { color: #ffd689; font: 800 1.2rem/1 system-ui; }
#world-wallet [data-resource=wood] span { color: #d6ac78; }
#world-wallet [data-resource=stone] span { color: #b4c6e0; }
#world-wallet [data-resource=metal] span { color: #8dddca; }
#world-wallet [data-resource=sp] span { color: #d8abff; }
.world-tools {
  inset: max(4.5rem, calc(env(safe-area-inset-top) + 3.75rem)) max(.88rem, env(safe-area-inset-right)) auto auto;
  display: grid; gap: .42rem;
}
.world-tools button {
  width: 3.8rem; height: 3.8rem; padding: .06rem; cursor: pointer;
  background: transparent; border: 1px solid transparent; border-radius: .75rem;
  transition: filter 150ms ease, transform 150ms ease;
  filter: drop-shadow(0 3px 4px #000e);
}
.world-tools button:hover, .world-tools button:focus-visible { transform: translateX(-3px); filter: drop-shadow(0 0 5px #f1d28c); }
.world-tools img, .building-art { display: block; width: 100%; height: 100%; object-fit: contain; }
[data-living-evolution] .world-picker {
  max-width: min(26rem, calc(100vw - 5.75rem)); inset: 4.65rem auto auto .8rem; translate: none;
}
[data-living-evolution] #map[data-construction] { cursor: crosshair; }
[data-living-evolution] .illustrated-structure .world-map-structure {
  display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; box-shadow: none;
}
.illustrated-structure .building-art { filter: drop-shadow(0 4px 3px #061121bb); }
.illustrated-structure[data-state=constructing] .building-art { opacity: .65; }
.illustrated-structure .nexus-label { background: #091724e6; }
[data-living-evolution] .collection-panel {
  color: #f0e9d6;
  background: radial-gradient(ellipse at 0% 0%, #29423e 0, transparent 58%), #0d1a27;
  border-color: var(--hud-line);
}
[data-living-evolution] .collection-panel::backdrop { background: #030b1070; }
[data-living-evolution] .collection-header {
  align-items: center; padding-bottom: .9rem; margin-bottom: .8rem; border-bottom: 1px solid var(--hud-line);
}
[data-living-evolution] .collection-header h2 { color: #f9e5b5; }
[data-living-evolution] #collection-panel:has(#tree-talents:not([hidden])) { width: min(900px, 96vw); }
[data-living-evolution] #collection-panel:has(#tree-knowledge:not([hidden])) { width: min(680px, 92vw); }
[data-living-evolution] #living-panel { width: min(600px, 92vw); }
[data-living-evolution] #verified-growth { display: flex; flex-direction: column; }
[data-living-evolution] #verified-growth .growth-figure { order: -3; margin: 0 auto; width: min(100%, 34rem); }
[data-living-evolution] #evolution-pillars { order: -2; grid-template-columns: repeat(4,minmax(0,1fr)); }
[data-living-evolution] .evolution-pillars > div {
  border-color: #ac8e4b60; background: #162b32; padding: .7rem; min-width: 0;
}
[data-living-evolution] .evolution-pillars dd { color: #f6d797; }
.world-profile-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-block: 1.1rem; }
.build-cards { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .7rem; list-style: none; margin: 0; padding: 0; }
.build-card {
  display: grid; justify-items: center; align-content: start; gap: .34rem;
  background: radial-gradient(ellipse at 50% 30%, #2d4c48, transparent 70%), #122530;
  border: 1px solid var(--hud-line); border-radius: .8rem; padding: .65rem; text-align: center;
}
.build-card .building-art { width: 7.6rem; height: 6.4rem; max-width: 100%; }
.build-card strong { font-family: Georgia, serif; color: #f9e7b6; font-size: 1.15rem; }
.build-card small { color: #ccdacd; line-height: 1.25; font-size: .77rem; }
.build-card button { margin-top: .28rem; min-height: 2.6rem; }
.world-placement > .building-art { height: 7.5rem; width: 7.5rem; }
.character-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(180px, 30%); gap: clamp(.7rem, 3vw, 1.7rem); }
.character-sheet { align-self: start; text-align: center; order: 2; }
.character-sheet img {
  width: 100%; max-height: 370px; object-fit: contain; object-position: center bottom;
  background: radial-gradient(ellipse, #48756855, transparent 70%);
  filter: drop-shadow(0 6px 8px #0007);
}
.character-sheet h3 { color: #f3d89c; font: 1.7rem Georgia, serif; margin: .25rem 0; }
.character-sheet p { font-size: .78rem; color: #c6cebd; margin: .3rem 0; }
.talent-balance { color: #f4d796; margin: 0 0 .55rem; }
.talent-graph {
  position: relative; height: clamp(310px, 46dvh, 480px);
  border: 1px solid var(--hud-line); border-radius: .8rem;
  background: radial-gradient(ellipse at center, #28463d 0, #111f2c 72%);
}
.talent-graph svg { width: 100%; height: 100%; position: absolute; inset: 0; pointer-events: none; }
.talent-graph path { vector-effect: non-scaling-stroke; fill: none; stroke: #9ca7a259; stroke-width: 1.3px; }
.talent-graph path.reached { stroke: #bacd82; stroke-width: 2px; }
.talent-node {
  position: absolute; left: var(--talent-x); top: var(--talent-y); transform: translate(-50%, -50%);
  display: grid; place-items: center; width: 2.8rem; height: 2.8rem; border-radius: .65rem;
  border: 1px solid #9ca9b0; background: linear-gradient(145deg, #525960, #17242c);
  color: #d1d4d5; font: 1.55rem/1 system-ui; cursor: pointer; box-shadow: 0 3px 8px #0009;
}
.talent-node[data-unlocked=true] { color: #fff1a4; background: linear-gradient(145deg, #5c7e4e, #2a4940); border-color: #bbd48a; }
.talent-node[data-eligible=true] { border-style: dashed; border-color: #f3d788; }
.talent-node[aria-pressed=true] { outline: 2px solid #f3d788; outline-offset: 3px; }
.talent-detail { padding: .7rem .8rem; margin-top: .65rem; border: 1px solid var(--hud-line); border-radius: .7rem; }
.talent-detail h3, .talent-detail p { margin: 0 0 .38rem; }
.talent-detail h3 { font: 1.35rem Georgia, serif; color: #f6dda5; }
.talent-detail ul { padding-inline-start: 1.2rem; color: #d2dbd0; font-size: .83rem; }
@media (max-width: 620px) {
  .world-hud { inset-inline-start: max(.45rem, env(safe-area-inset-left)); gap: .22rem; max-width: calc(100% - .9rem); }
  #world-wallet { gap: .08rem; }
  #world-wallet div { gap: .17rem; padding-inline: .29rem; }
  #world-wallet dd { font-size: .72rem; }
  #world-wallet span { font-size: .94rem; }
  .world-tools { inset-inline-end: .42rem; }
  .world-tools button { width: 2.95rem; height: 2.95rem; }
  [data-living-evolution] #collection-panel, [data-living-evolution] #living-panel { width: 100% !important; }
  [data-living-evolution] .collection-panel { padding-inline: .85rem; }
  [data-living-evolution] .evolution-pillars { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .character-layout { display: flex; flex-direction: column; }
  .character-sheet { order: -1; align-self: center; display: grid; grid-template-columns: 66px auto; gap: 0 .65rem; align-items: center; text-align: start; }
  .character-sheet img { height: 92px; grid-row: 1 / 3; }
  .character-sheet h3 { align-self: end; }
  .character-sheet p { align-self: start; }
  .talent-graph { height: 340px; }
}

.talent-detail .primary { min-height: 2.6rem; border-radius: .46rem; padding-inline: .8rem; }
.talent-detail .primary:disabled { background: #263b42; border-color: #7e8c8b; color: #c8cecb; }
.talent-node img { width: 88%; height: 88%; object-fit: contain; pointer-events: none; }
.talent-node[data-unlocked=false] img { filter: grayscale(1) saturate(0) brightness(.88); }
