/* NapMap difficulty: hint bubble under the board, highlight of the row/column/bed a hint uses, star rating in the label.
   Theme tokens from style.css. The bubble's wrapper is the aria-live region, so it collapses to nothing while hidden. */
.hint-live{margin-top:-16px}
.hint-bubble{position:relative;margin-top:16px;display:flex;align-items:flex-start;gap:10px;
  background:var(--surface);color:var(--ink);border:2px solid var(--ink);border-radius:14px;padding:10px 8px 10px 12px;
  box-shadow:4px 4px 0 var(--ink);font-weight:700;font-size:.92rem;line-height:1.4;min-height:3.9em;animation:hint-in .22s ease-out}
/* little tail pointing up at the board */
.hint-bubble::before{content:"";position:absolute;top:-9px;left:28px;width:14px;height:14px;background:var(--surface);
  border-left:2px solid var(--ink);border-top:2px solid var(--ink);transform:rotate(45deg);border-top-left-radius:3px}
.hint-bubble p{margin:0;flex:1;min-width:0;overflow-wrap:anywhere;padding-top:1px}
.hint-ico{width:22px;height:22px;flex:none;color:var(--sun);margin-top:1px}
.hint-bubble[data-rule="error"] .hint-ico{color:var(--heart)}
.hint-close{font:inherit;flex:none;width:32px;height:32px;margin:-4px 0 -4px 0;border:0;border-radius:999px;background:transparent;
  color:var(--muted);display:grid;place-items:center;cursor:pointer;padding:0}
.hint-close svg{width:18px;height:18px}
.hint-close:hover{background:var(--soft);color:var(--ink)}
.hint-close:focus-visible{outline:3px solid var(--sun);outline-offset:1px}
@keyframes hint-in{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}

/* hint highlights in two colors: blue = what the reasoning starts from, gold = what it rules on */
:root{--why:#2F6FD0;--why-ink:#1E4F9E}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]){--why:#6FA8FF;--why-ink:#A9CBFF}}
:root[data-theme="dark"]{--why:#6FA8FF;--why-ink:#A9CBFF}
.cell.hint-why::after,.cell.hint-so::after,.cell.hint-zone::after{content:"";position:absolute;inset:0;z-index:3;pointer-events:none;
  animation:hint-zone 1.6s ease-in-out infinite alternate}
.cell.hint-why::after{background:color-mix(in srgb,var(--why) 26%,transparent);box-shadow:inset 0 0 0 2px color-mix(in srgb,var(--why) 85%,transparent)}
.cell.hint-so::after,.cell.hint-zone::after{background:color-mix(in srgb,var(--sun) 40%,transparent);box-shadow:inset 0 0 0 2.5px var(--sun)}
@keyframes hint-zone{from{opacity:1}to{opacity:.6}}
.hint-bubble .why,.hint-bubble .so{border-radius:5px;padding:0 3px;box-decoration-break:clone;-webkit-box-decoration-break:clone}
.hint-bubble .why{background:color-mix(in srgb,var(--why) 18%,transparent);color:var(--why-ink);box-shadow:inset 0 -2px 0 var(--why)}
.hint-bubble .so{background:color-mix(in srgb,var(--sun) 22%,transparent);box-shadow:inset 0 -2px 0 var(--sun)}
.cell.hint-keep,.cell.hint-keep[data-bed]{box-shadow:inset 0 0 0 4px var(--sun)}

.label .stars{color:var(--sun);letter-spacing:1px;white-space:nowrap;cursor:help;font-weight:800}
@media (prefers-reduced-motion:reduce){.hint-bubble{animation:none}.cell.hint-why::after,.cell.hint-so::after,.cell.hint-zone::after{animation:none;opacity:.85}}

/* axis numbers around the board (rows on the left, columns on top) */
.board-frame{display:grid;grid-template-columns:20px minmax(0,1fr);grid-template-rows:20px auto;gap:2px 4px}
.board-frame .board-wrap{grid-column:2;grid-row:2}
.axis{display:grid;font-weight:800;font-size:.72rem;color:var(--muted);font-variant-numeric:tabular-nums;user-select:none}
.axis-cols{grid-column:2;grid-row:1;padding:0 3px;align-items:end}
.axis-rows{grid-column:1;grid-row:2;padding:3px 0;justify-items:end}
.axis span{display:grid;place-items:center;border-radius:6px;min-width:18px;min-height:18px;transition:background .15s,color .15s}
.axis span.why{background:var(--why);color:#fff}
.axis span.so{background:var(--sun);color:#1F2A44}

/* bed names in a hint wear their bed's color; the blue or gold underline still says why or so */
.hint-bubble .bed-name{background:var(--bedc);color:var(--ink);border-radius:5px;padding:0 3px;box-decoration-break:clone;-webkit-box-decoration-break:clone;
  box-shadow:inset 0 0 0 1.5px color-mix(in srgb,var(--ink) 25%,transparent)}
.hint-bubble .why .bed-name{box-shadow:inset 0 -3px 0 var(--why),inset 0 0 0 1.5px color-mix(in srgb,var(--ink) 25%,transparent)}
.hint-bubble .so .bed-name{box-shadow:inset 0 -3px 0 var(--sun),inset 0 0 0 1.5px color-mix(in srgb,var(--ink) 25%,transparent)}
.hint-bubble .why:has(.bed-name),.hint-bubble .so:has(.bed-name){background:none;box-shadow:none;padding:0}

/* size and level rows share the board style row's look; their labels line up, and they dim while the Daily is showing */
.styles-row .seg-label{min-width:3.1em}
.styles-row.idle .seg{opacity:.6}
