/* The Dream Loom (v1.169). */
.dlm { text-align: center; }
.dlm .dwx-row { justify-content: center; align-items: center; }
.dlm-threads { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; max-width: 560px; margin: 0 auto 22px; }
.dlm-thread { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px 10px; border-radius: 14px; border: 1px solid rgba(217, 185, 138, .25); background: rgba(255, 255, 255, .03); color: var(--dw-cream); font: inherit; cursor: pointer; transition: border-color .2s, transform .2s; }
.dlm-thread:hover { transform: translateY(-2px); border-color: var(--dw-gold); }
.dlm-thread.is-on { border-color: var(--dw-gold); background: rgba(217, 185, 138, .12); }
.dlm-thread.is-on::after { content: attr(data-order); position: absolute; top: 6px; right: 8px; width: 20px; height: 20px; border-radius: 50%; background: var(--dw-gold); color: #010F2A; font-size: .75rem; font-weight: 700; line-height: 20px; }
.dlm-thread__yarn { width: 18px; height: 54px; border-radius: 9px; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 60%, #000) 0%, var(--c) 35%, color-mix(in srgb, var(--c) 70%, #fff) 50%, var(--c) 65%, color-mix(in srgb, var(--c) 60%, #000) 100%); box-shadow: 0 4px 8px rgba(0, 0, 0, .5); background-size: 100% 12px; }
.dlm-thread__name { font-family: var(--dw-serif, Georgia, serif); font-size: 1rem; }
.dlm-thread__f { font-size: .78rem; color: var(--dw-muted); }
.dlm-tex { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); max-width: 560px; margin: 0 auto 18px; }
.dlm-tex .dwk-pick { flex-direction: column; gap: 2px; border-radius: 14px; }
.dlm-frame { position: relative; width: min(360px, 90%); margin: 0 auto 12px; padding: 12px; background: linear-gradient(135deg, #5a3a1c, #2c1a0c); border-radius: 8px; box-shadow: 0 18px 40px rgba(0, 0, 0, .6), inset 0 0 0 2px rgba(255, 220, 160, .18); }
.dlm-frame--small { width: min(240px, 70%); }
.dlm-cv { display: block; width: 100%; height: auto; }
.dlm-shuttle { position: absolute; left: 12px; right: 12px; top: 12px; height: 6px; background: linear-gradient(90deg, transparent, #e8c77a, transparent); opacity: 0; }
.dlm-frame.is-weaving .dlm-shuttle { opacity: .9; animation: dlm-shuttle 1.1s ease-in-out infinite alternate, dlm-down 5s linear forwards; }
@keyframes dlm-shuttle { from { transform: translateX(-30%); } to { transform: translateX(30%); } }
@keyframes dlm-down { from { top: 12px; } to { top: calc(100% - 18px); } }
.dlm-state { min-height: 1.4em; }
@media (max-width: 520px) { .dlm-threads { grid-template-columns: repeat(2, 1fr); } }
@media (prefers-reduced-motion: reduce) { .dlm-frame.is-weaving .dlm-shuttle { animation: none; opacity: 0; } .dlm-thread { transition: none; } }
