/* Tap-to-define (site r52b, Sitewalk QA, 2026-11-27). Uses the site's own color tokens from site.css, so light and dark
   both follow the visitor's theme. The popup width is set by js/define.js (at most 320 px, and 32 px less than the
   screen), so it never runs off-screen at 375 px. */
.dw {
  font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; display: inline;
  text-transform: inherit; letter-spacing: inherit; /* r53a: a defined word inside an all-caps label stays all caps */
  cursor: help; text-decoration: underline dotted; text-decoration-thickness: 1.5px; text-underline-offset: .18em;
}
/* r52f (gate 2, probe tap_targets): a 24 px+ tap box. The padding grows the box and the equal negative margin cancels it, so
   no text moves. The demo player names are small type, so they get more. */
button.dw { padding-block: 2px; margin-block: -2px; position: relative; z-index: 0; }
.pn button.dw { padding-block: 6px; margin-block: -6px; }
/* r52g (REVIEW-r52f.md MEDIUM): the open highlight and the focus ring are drawn on a box set back to the old text box, with
   r52d's radius and outline offset, so open and focused words look exactly as before the tap box grew. */
button.dw::before { content: ""; position: absolute; left: 0; right: 0; top: 2px; bottom: 2px; border-radius: 2px; z-index: -1; pointer-events: none; }
.pn button.dw::before { top: 6px; bottom: 6px; }
button.dw[aria-expanded="true"] { background: none; }
button.dw[aria-expanded="true"]::before { background: var(--scrap); }
button.dw:focus-visible { outline: none; }
button.dw:focus-visible::before { outline: 2px solid var(--accent); outline-offset: 2px; }
.dw:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
.dw[aria-expanded="true"] { background: var(--scrap); color: var(--scrap-ink); border-radius: 2px; }
.dw-pop {
  position: fixed; z-index: 60; box-sizing: border-box; max-width: calc(100vw - 16px); max-height: calc(100vh - 16px); overflow: auto;
  background: var(--panel); color: var(--ink); border: 2px solid var(--accent); border-radius: 6px;
  padding: 10px 14px 12px; box-shadow: 0 6px 18px var(--shadow); font-size: 1rem; line-height: 1.45; text-align: left;
}
.dw-pop[hidden] { display: none; }
.dw-pop:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.dw-pop-t { margin: 0 0 4px; font-weight: bold; }
.dw-pop-x { margin: 0 0 10px; }
.dw-close {
  font: inherit; font-size: .95rem; min-height: 44px; padding: 6px 14px; cursor: pointer;
  background: var(--btn); color: var(--btn-ink); border: 0; border-radius: 4px;
}
.dw-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* r52d: the longer desktop side board on the Game section (index.html, #game .margin). The notes are the site's .scrap
   paper notes; these rules only shape the turn list and the key-word buttons inside them. */
.margin .pin-list { margin: 0; padding-left: 1.2em; }
.margin .pin-list li { margin: 0 0 6px; }
.margin .pin-words { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; }
