/* Crystal silhouettes share one illustrated transparent sheet. */
.crystal-art{display:block;flex:none;width:96px;height:96px;background-image:url('items/upgrade-crystals.png');background-repeat:no-repeat;background-size:300% 100%;filter:drop-shadow(0 0 8px var(--rarity,#59cbb2));margin:8px auto}
.crystal-capacity{background-position:0 0}.crystal-assault{background-position:50% 0}.crystal-aegis{background-position:100% 0}
.rarity-uncommon{--rarity:#62d3ab}.rarity-rare{--rarity:#64b9ff}.rarity-epic{--rarity:#ce95ff}.rarity-text{color:var(--rarity)}
.crystal-sockets{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:10px}.crystal-socket{text-align:center;padding:12px}.crystal-socket label{display:grid;gap:8px;font:12px system-ui}.crystal-socket select{width:100%;min-height:48px}.empty-crystal{height:112px;display:grid;place-items:center;font-size:60px;color:#637686}.crystal-collection{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:10px}.crystal-item{display:flex;gap:14px;align-items:center;padding:10px;border:1px solid var(--rarity);border-radius:8px;background:#101d2c}.crystal-item .crystal-art{width:72px;height:72px;margin:0}.crystal-item p{margin:5px 0;font:12px system-ui}.crystal-item small{color:#a9bbcd}.crystal-reward{text-align:center;border:1px solid #719cae;border-radius:8px;padding:12px}
#world{touch-action:none}.move-marker{position:absolute;width:26px;height:12px;border:2px solid #9bfff1;border-radius:50%;box-shadow:0 0 10px #2fe7ce;transform:translate(-50%,-50%);z-index:9;pointer-events:none}
button,select{touch-action:manipulation}.modal{overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.touch-mode .modal button,.touch-mode select{min-height:44px}.touch-mode #battleOverlay{padding:0}.touch-mode #battleModal{width:min(960px,100vw);max-height:100dvh;padding:10px;border-radius:0;overscroll-behavior:contain}
.touch-mode #battleModal .toolbar{position:sticky;top:-10px;z-index:12;background:#0c1b2af5;margin:0 0 8px;padding:6px;gap:5px}.touch-mode #battleModal .badge{padding:7px;font:11px system-ui}.touch-mode #battleModal .battle-top{grid-template-columns:1fr 1fr;gap:8px}.touch-mode #battleModal .combatant{padding:9px;min-width:0}.touch-mode #battleModal .combatant h2{font-size:17px}.touch-mode #battleModal .combatant p{font:12px/1.35 system-ui;margin:6px 0}.touch-mode #battleModal .battle-monster{height:82px;margin:0}.touch-mode #battleModal .battle-monster .wildlife-sprite{width:60px;height:80px}.touch-mode #battleModal .intent{padding:8px;font:12px system-ui}.touch-mode #battleModal .combat-tools{padding:8px;margin:0 0 8px;font:12px/1.35 system-ui}.touch-mode #battleModal .combat-tools p{margin:4px 0}.touch-mode #battleModal .combat-tools .muted{display:none}
.touch-mode #hand{display:flex;flex-wrap:nowrap;justify-content:flex-start;overflow-x:auto;overscroll-behavior-x:contain;gap:10px;padding:8px 5px 12px;scroll-snap-type:x proximity;touch-action:pan-x pan-y}.touch-mode #hand .card-wrap{width:156px;min-width:156px;flex:0 0 156px;scroll-snap-align:start}.touch-mode #hand .card{width:156px;min-width:156px;min-height:248px;padding:32px 8px 8px}.touch-mode #hand .card .art{height:auto;aspect-ratio:1/1;font-size:34px}.touch-mode #hand .card-name{font-size:13px;min-height:32px}.touch-mode #hand .rules{min-height:68px;font-size:12px;padding:6px}.touch-mode #hand .mastery-label{margin-top:4px;font-size:8px}.touch-mode #hand .track{height:7px}.touch-mode #hand .track::after{height:2px}.touch-mode #hand .ownership{font-size:8px}.touch-mode .touch-selected{outline:3px solid #8df5e5;outline-offset:1px}.touch-mode .hand-title{margin-top:10px}.touch-mode .hand-title h2{font-size:18px}.touch-mode .hand-title .muted{font-size:11px}
.touch-mode #battleModal .battle-footer{position:sticky;bottom:-10px;z-index:15;display:grid;grid-template-columns:1fr auto;align-items:center;background:#0b1a2afa;border-top:1px solid #58909c;padding:10px 0 calc(10px + env(safe-area-inset-bottom));margin:4px 0 0}.touch-mode .battle-footer>.muted{display:none}.touch-card-action{display:grid;grid-template-columns:1fr;gap:4px}.touch-card-action span{font:11px system-ui;color:#b8d1dc}.touch-card-action button{font-size:13px}.touch-mode #endTurn{min-height:52px;min-width:90px}.touch-mode #combatLog{font-size:11px}.touch-mode button:hover:not(:disabled){transform:none}
@media(max-width:720px){.touch-mode #hud{left:6px;top:6px;width:195px;padding:8px}.touch-mode #hud .objective,.touch-mode #hud .joined-area-title{display:none}.touch-mode #nav{right:6px;top:6px;width:calc(100vw - 218px);max-width:200px;gap:4px}.touch-mode #nav button{min-height:40px;font:11px system-ui;padding:6px}.touch-mode #nav .art-credits{display:none}.touch-mode #touch{left:8px;bottom:calc(30px + env(safe-area-inset-bottom));grid-template-columns:repeat(3,44px);gap:4px}.touch-mode #touch button{min-width:44px;min-height:44px}.touch-mode .hint{font-size:10px;max-width:96vw;white-space:normal;text-align:center;bottom:env(safe-area-inset-bottom)}.touch-mode .crystal-sockets{grid-template-columns:repeat(2,minmax(0,1fr))}.touch-mode .crystal-art{width:80px;height:80px}.touch-mode .crystal-socket{padding:8px}}
.intent small{display:block;margin-top:6px;font:11px/1.4 system-ui;color:#c5d8e2}.encounter-status{font:11px/1.4 system-ui;color:#c7dddf;margin:5px 0 0}.enemy-node .bloom-tyrant{width:120px;height:160px;margin-left:-60px;top:-50px}.enemy-node:has(.bloom-tyrant):after{top:120px}
