/* Night loom (beta 70): woven threads, warp, readable cards, vignette. Constellate only. */
body.is-theme-weaving .map-panel:before{content:'';position:absolute;inset:0;z-index:15;pointer-events:none;background:radial-gradient(ellipse 75% 70% at 48% 46%,transparent 55%,rgba(4,7,16,.55) 100%)}
body.is-theme-weaving .map-panel:after{opacity:.05;mix-blend-mode:screen;background-size:180px 180px}

#constellate-graph .loom-warp path{fill:none;stroke:#8fa4d6;stroke-opacity:.16;stroke-width:.8;vector-effect:non-scaling-stroke;pointer-events:none}

.weave-thread-halo{stroke:#070b16;stroke-width:6;stroke-opacity:.55;stroke-linecap:round;stroke-linejoin:round}
.weave-thread-glow{fill:none;stroke-width:7;stroke-opacity:.28;stroke-linecap:round;stroke-linejoin:round;filter:blur(3.2px);pointer-events:none}
.weave-thread-line{stroke-width:1.6;stroke-opacity:.96;vector-effect:non-scaling-stroke}
.weave-drawing{animation-duration:1.4s;animation-timing-function:ease-in-out}
.weave-thread-name{font:italic 400 15px/1 'Atlas Serif',Georgia,serif;letter-spacing:.01em;stroke:#070b16;stroke-width:4px;stroke-opacity:.85;paint-order:stroke;pointer-events:none}

/* Cards stay legible over land names: dark plate when not selected. */
:root[data-reading-theme] body.is-theme-weaving #constellate-graph .constellate-card rect{fill:#0c1426;fill-opacity:.88;stroke:#3a4a6e;stroke-opacity:.9}
:root[data-reading-theme] body.is-theme-weaving #constellate-graph .constellate-card text{fill:#efe6d2;stroke:none}
:root[data-reading-theme] body.is-theme-weaving #constellate-graph .constellate-card .weave-land-caption{fill:#9fb0d0}
:root[data-reading-theme] body.is-theme-weaving #constellate-graph .constellate-card:is(:hover,:focus-within,.selected) rect{fill:var(--reading-paper);fill-opacity:.98}
:root[data-reading-theme] body.is-theme-weaving #constellate-graph .constellate-card:is(:hover,:focus-within,.selected) text{fill:var(--reading-ink)}
.weave-film-star{fill:#f6e7b8;filter:drop-shadow(0 0 3px rgba(246,231,184,.8))}
.weave-knot circle{stroke-width:1.6;filter:drop-shadow(0 0 2px currentColor)}

/* Land names recede to engraved text while weaving. */
:root[data-reading-theme] body.is-theme-weaving #atlas :is(.land-word-label,.land-bubble-label){font-style:italic;opacity:.42}

/* Connections: sourced = solid dyed line; dream = dotted shimmer. */
:root[data-reading-theme] body.is-theme-weaving .constellate-edge.dream-thread{stroke-dasharray:1 7;stroke-linecap:round;stroke-width:1.6;animation:loom-shimmer 2.6s linear infinite}
@keyframes loom-shimmer{to{stroke-dashoffset:-16}}

@media(prefers-reduced-motion:reduce){.weave-thread-glow{filter:none}.constellate-edge.dream-thread{animation:none!important}}
.weave-dyes{border:0;padding:0;margin:8px 0 10px;display:flex;flex-wrap:wrap;gap:6px}
.weave-dyes legend{font:12px 'Atlas Sans',sans-serif;color:var(--reading-muted);margin-bottom:6px}
.weave-dyes label{position:relative;display:flex!important;align-items:center;gap:6px;margin:0!important;padding:5px 9px 5px 6px;border:1px solid var(--reading-line);border-radius:14px;cursor:pointer;font-size:12px}
.weave-dyes input{position:absolute;opacity:0;width:1px;height:1px}
.weave-dyes i{width:14px;height:14px;border-radius:50%;box-shadow:0 0 6px currentColor}
.weave-dyes label:has(input:checked){border-color:var(--reading-ink);background:var(--reading-wash)}
.weave-dyes label:has(input:focus-visible){outline:2px solid var(--reading-accent)}
