.rl-work {
  color: var(--ink, #263b32);
  font-family: var(--body-font, Georgia, serif);
  container-type: inline-size;
}
.rl-work *, .rl-work *::before, .rl-work *::after { box-sizing: border-box; }
.rl-work [hidden] { display: none !important; }
.rl-invite { margin: 0 0 1.1rem; max-width: 64ch; line-height: 1.5; }
.rl-layout { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; align-items: start; }
.rl-work h3 { margin: 0 0 .55rem; font: 600 1rem/1.4 var(--body-font, Georgia, serif); }
.rl-mat, .rl-shelf { overflow: hidden; border-radius: 12px; border: 1px solid #c6b998; }
.rl-mat {
  position: relative;
  padding: 6px;
  background-color: #e7dfc9;
  background-image: repeating-linear-gradient(0deg, #7c725014 0 1px, transparent 1px 3px), repeating-linear-gradient(90deg,#fffffc32 0 1px,transparent 1px 3px);
}
.rl-mat::before { content:''; position:absolute; inset:5px; border:1px dashed #b6aa8b; border-radius:8px; pointer-events:none; }
.rl-mat.rl-dragover { outline: 2px solid #516b4b; outline-offset: 2px; }
.rl-board { display: block; width:100%; height:auto; }
.rl-wood { fill:#df3927; stroke:#a62e20; stroke-width:.9; filter:drop-shadow(0 1.4px 1px #642e2035); }
.rl-outline { fill:#71806117; stroke:#596b4e; stroke-width:1.8; stroke-dasharray:5 3; }
.rl-route path { stroke:#536b48; stroke-width:3; stroke-dasharray:4 5; stroke-linecap:round; stroke-linejoin:round; fill:none; }
.rl-route circle { fill:#536b48; }
.rl-shelf { background:#eee1c6 url('assets/maple.webp') center/460px auto; padding: 5px 6px; }
.rl-shelf button { display:flex; align-items:center; padding:0; width:100%; height:clamp(32px,4.5cqw,52px); border:0; border-radius:4px; background:transparent; touch-action: none; user-select:none; cursor:grab; }
.rl-shelf button:active { cursor:grabbing; }
.rl-shelf button:disabled { visibility:hidden; }
.rl-shelf button:focus-visible, .rl-actions button:focus-visible { outline: 3px solid #6a4a25; outline-offset: -2px; }
.rl-shelf svg { width:100%; height:auto; pointer-events:none; display:block; }
.rl-actions { display:flex; flex-wrap:wrap; gap:7px; margin-top:.65rem; }
.rl-actions button { appearance:none; font:inherit; color:#344b38; min-height:38px; padding:.35rem .85rem; border:1px solid #bdb49a; border-radius:20px; background:#fff9e9; cursor:pointer; }
.rl-actions button:disabled { opacity:.48; cursor:default; }
.rl-actions button[aria-pressed=true] { background:#465b40; color:white; }
.rl-feedback { display:flex; align-items:baseline; flex-wrap:wrap; gap:.35rem .95rem; margin-top:1rem; line-height:1.5; }
.rl-counter { color:#51644b; font-size:.9rem; font-weight:600; white-space:nowrap; }
.rl-ghost { position:fixed; pointer-events:none; transform:translate(-15%,-50%); background:#df3927; border:1px solid #a62e20; border-radius:1px; z-index:1000; }
@container (max-width: 520px) {
  .rl-layout { grid-template-columns: minmax(0,1fr); gap:1.1rem; }
  .rl-shelf button { height:36px; }
}

@media (pointer: coarse) { .rl-shelf button { touch-action: pan-y; } }
