/* INPUT-01: quick wheel and drag-to-assign states. Every class is prefixed rw- or da- so nothing in ui.css collides.
   Uses the theme variables of ui.css (--u, --panel, --accent ...) */
/* HUD-RESTYLE-02: a clean slim ring. Wedges are the see-through dark grey of the popups, no strokes; the chosen one turns cream.
   Names live only in the middle, so the ring itself is icons and counts. */
.rw-layer{position:fixed;inset:0;z-index:60;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:calc(var(--u) * 10);padding:calc(8px + var(--st)) calc(8px + var(--sr)) calc(10px + var(--sb)) calc(8px + var(--sl));background:radial-gradient(circle,rgba(8,11,17,.5),rgba(8,11,17,.22) 70%);pointer-events:auto;touch-action:none;animation:rwfade .12s;font-family:Kanit,'Noto Sans Thai Looped',sans-serif;color:var(--hd-cream,#f6e7c8)}
.rw-layer[hidden]{display:none}
@keyframes rwfade{from{opacity:0}}
.rw-wheel{--d:min(calc(var(--u) * 400),92vw,calc(100vh - var(--u) * 120));position:relative;width:var(--d);height:var(--d);filter:var(--hd-drop);animation:rwpop .16s cubic-bezier(.34,1.4,.64,1)}
@keyframes rwpop{from{transform:scale(.9)}}
.rw-wheel svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
.rw-wheel path{fill:var(--hd-panel,rgba(15,19,27,.84));stroke:none;transition:fill .1s}
.rw-wheel path.rw-on{fill:var(--hd-cream,#f6e7c8)}
.rw-item{position:absolute;left:calc(50% + var(--x) * var(--d));top:calc(50% + var(--y) * var(--d));width:calc(var(--d) * .17);height:calc(var(--d) * .17);transform:translate(-50%,-50%);display:grid;place-items:center;border-radius:50%;transition:transform .12s;pointer-events:none}
.rw-icon{display:grid;place-items:center;width:78%;aspect-ratio:1;font-size:calc(var(--d) * .07);line-height:1}
.rw-icon img{width:100%;height:100%;object-fit:contain}
.rw-item small{display:none}
.rw-item b{position:absolute;right:-4%;bottom:0;min-width:1.5em;text-align:center;font-weight:700;font-size:max(14px,calc(var(--d) * .04));line-height:1.35;padding:0 5px;border-radius:999px;background:var(--hd-cocoa,#33210f);color:var(--hd-cream,#f6e7c8)}
.rw-item.rw-on{transform:translate(-50%,-50%) scale(1.12)}
.rw-item.rw-off .rw-icon{filter:grayscale(1);opacity:.4}
.rw-item.rw-off b{background:var(--hd-plum,#6d4670)}
.rw-item.rw-empty .rw-icon{opacity:.3;font-size:calc(var(--d) * .06)}
.rw-hub{position:absolute;left:50%;top:50%;width:44%;height:44%;transform:translate(-50%,-50%);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:6%;border:0;border-radius:50%;background:transparent;color:inherit;text-align:center}
.rw-hub strong{font-family:Mitr,sans-serif;font-weight:500;font-size:max(18px,calc(var(--d) * .055));line-height:1.25;text-shadow:var(--hd-halo)}
.rw-hub span{color:var(--hd-cream2,#e9d3a8);font-size:max(15px,calc(var(--d) * .04));text-shadow:var(--hd-halo)}
.rw-tools{display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:center;max-width:min(96vw,760px);padding:6px 10px}
.rw-help{margin:0;width:100%;text-align:center;font-size:max(15px,calc(var(--u) * 16));text-shadow:var(--hd-halo)}
.rw-slots{display:flex;flex-wrap:wrap;gap:8px;justify-content:center}.rw-slots[hidden]{display:none}
.rw-slots button,.rw-assign{min-height:44px;padding:0 16px;border:0;border-radius:999px;background:var(--hd-panel,rgba(15,19,27,.84));color:var(--hd-cream,#f6e7c8);font-family:inherit;font-size:max(15px,calc(var(--u) * 16));filter:var(--hd-drop)}
.rw-assign[aria-pressed="true"]{background:var(--hd-cream,#f6e7c8);color:var(--hd-cocoa,#33210f)}
.rw-slots kbd{margin-left:8px;padding:0 7px;border-radius:999px;background:var(--hd-cream,#f6e7c8);color:var(--hd-cocoa,#33210f)}
body.calm .rw-item,body.calm .rw-layer,body.calm .rw-wheel{transition:none;animation:none}
@media (prefers-reduced-motion:reduce){.rw-item,.rw-layer,.rw-wheel{transition:none;animation:none}}

/* drag-to-assign */
[data-da-source]{cursor:grab;-webkit-touch-callout:none;user-select:none}
[data-da-source] img{pointer-events:none}
.da-ghost{position:fixed;left:0;top:0;z-index:90;pointer-events:none;width:56px;height:56px;margin:-28px 0 0 -28px;display:grid;place-items:center;border-radius:14px;background:rgba(29,36,49,.94);border:2px solid var(--accent);box-shadow:0 8px 24px rgba(0,0,0,.5);font-size:30px}
.da-ghost img{width:86%;height:86%;object-fit:contain}
.da-from{opacity:.4}
/* valid places are dashed, the one under the pointer is solid and lifted: shape as well as colour */
[data-da-slot].da-ok{outline:2px dashed var(--accent);outline-offset:3px}
[data-da-slot].da-over{outline:4px solid var(--accent);outline-offset:3px;transform:scale(1.08)}
.da-picked{box-shadow:0 0 0 3px #fff,0 0 0 6px var(--accent)}

/* the phone's quick-wheel button */
.rw-touch{width:58px;height:58px;border-radius:50%;display:grid;place-items:center;background:rgba(15,19,27,.8);border:2px solid rgba(255,255,255,.28);touch-action:none;font-size:26px}
