/* The teaching layer of the two washing games: the tool label, the goal, the pressure control, the pointer hint, the first-run guide,
   the dirt legend and the pickers. Pebble tokens only (paper, surface, ink, accent, line). The picture itself is a canvas; all of this is
   plain text over it or beside it, so it stays sharp and readable at any pixel ratio. */
.pb .washHud { position: absolute; inset: 0; z-index: 3; pointer-events: none; color: var(--ink); font-family: var(--font-text); }
.pb .washHud > * { position: absolute; pointer-events: none; background: color-mix(in srgb, var(--surface) 90%, transparent); border: var(--border) solid var(--line-strong); border-radius: var(--r); box-shadow: var(--shadow-1); }
.pb .hudTool { left: 10px; top: 10px; display: grid; gap: 2px; max-width: min(58%, 22rem); padding: 8px 12px; }
.pb .hudToolName { font: 700 1rem/1.15 var(--font-display); }
.pb .hudToolUse { font-size: 0.8125rem; line-height: 1.3; color: var(--ink-2); }
.pb .hudGoal { right: 10px; top: 10px; display: grid; justify-items: end; gap: 6px; padding: 8px 12px; }
.pb .hudPctRow { display: flex; align-items: baseline; gap: 6px; }
.pb .hudPct { font: 800 2rem/1 var(--font-display); font-variant-numeric: tabular-nums; }
.pb .hudWord { font-size: 0.9375rem; font-weight: 700; color: var(--ink-2); }
.pb .hudLeft { pointer-events: auto; min-height: 44px; padding: 0 12px; border: var(--border) solid var(--line-strong); border-radius: var(--r-pill); background: var(--surface); color: var(--ink); font: 700 0.8125rem/1 var(--font-text); cursor: pointer; }
.pb .hudLeft:hover { background: var(--surface-2); }
.pb .hudLeft[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pb .hudPressure { left: 10px; bottom: 10px; display: flex; align-items: center; gap: 8px; padding: 6px 12px; pointer-events: auto; }
.pb .hudPressure[hidden] { display: none; }
.pb .hudPressure label { font-size: 0.8125rem; font-weight: 700; }
.pb .hudPressure input { width: clamp(90px, 18vw, 150px); accent-color: var(--accent); min-height: 28px; }
.pb .hudPressure output { min-width: 3.2em; text-align: right; font: 700 0.8125rem/1 var(--font-mono); font-variant-numeric: tabular-nums; }
.pb .washTip { position: absolute; left: 0; top: 0; z-index: 4; pointer-events: none; padding: 5px 10px; border-radius: var(--r-pill); background: var(--ink); color: var(--paper); font: 700 0.8125rem/1.2 var(--font-text); white-space: nowrap; will-change: transform; }
.pb .washTip[hidden] { display: none; }
.pb .washCoach { position: absolute; left: 50%; top: 10px; z-index: 5; transform: translateX(-50%); pointer-events: none; width: min(92%, 25rem); display: grid; gap: var(--s3); padding: var(--s4); border-radius: var(--r); background: var(--surface); border: var(--border) solid var(--line-strong); box-shadow: var(--shadow-2); }
.pb .washCoach ol { margin: 0; padding-left: 1.25rem; display: grid; gap: var(--s1); font-size: 0.9375rem; line-height: 1.35; }
.pb .washCoach .btn { min-height: 44px; justify-self: end; padding: 0 var(--s5); pointer-events: auto; }
.pb .nextStep { margin: 0; padding: 6px 12px; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 var(--r-1) var(--r-1) 0; font-size: var(--t-small); line-height: 1.35; color: var(--ink); max-width: 62ch; }
.pb .nextStep:empty { display: none; }
.pb .dirtKey { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: var(--t-small); }
.pb .dirtKey li { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; grid-template-areas: "d n p" "d f f"; column-gap: 8px; align-items: baseline; }
.pb .dirtKey i { grid-area: d; width: 12px; height: 12px; border-radius: 50%; border: var(--border) solid var(--line-strong); align-self: center; }
.pb .dirtKey .dn { grid-area: n; font-weight: 700; }
.pb .dirtKey .df { grid-area: f; color: var(--ink-2); font-size: 0.8125rem; }
.pb .dirtKey .dp { grid-area: p; font: 700 0.8125rem/1 var(--font-mono); font-variant-numeric: tabular-nums; color: var(--ink-2); }
.pb .dirtKey li.gone .dn, .pb .dirtKey li.gone .df { opacity: 0.5; text-decoration: line-through; }
.pb .dirtKey li.gone .dp { color: var(--mint); }
.pb .pickLabel { margin: 0; font-size: var(--t-small); font-weight: 700; color: var(--ink-2); }
.pb .pickRow { gap: var(--s2); }
.pb .pickRow .btn { min-height: 44px; padding: 0 var(--s4); font-size: 0.9375rem; }
.pb .pickRow .lock { font-weight: 600; font-size: 0.75rem; }
.pb .pickRow .btn[aria-disabled="true"] { background: var(--surface-2); color: var(--ink-2); border-style: dashed; cursor: not-allowed; }   /* locked: dashed, same text contrast as the rest */
.pb .unlockMeter { margin-top: var(--s1); }
.pb .unlockMeter i { transition: width 200ms linear; }
.pb[data-low-motion] .unlockMeter i { transition: none; }
.pb.clean .washHud, .pb.clean .washTip, .pb.clean .washCoach, .pb.clean .nextStep { display: none; }   /* the hint under the picture is 32 px of page: left in, it scrolls the top of the picture away */
@media (max-width: 640px) {
  .pb .hudTool { max-width: calc(100% - 165px); padding: 6px 10px; }   /* the goal chip is up to 145 px wide: the tool name wraps in what is left and never runs under it */
  .pb .hudToolName { font-size: 0.9375rem; }
  .pb .hudPct { font-size: 1.5rem; }
  .pb .hudGoal { padding: 6px 10px; gap: 4px; }
  .pb .hudLeft { font-size: 0.75rem; padding: 0 10px; }
  .pb .hudPressure { padding: 4px 10px; }
  .pb .hudToolUse { display: none; }
  .pb .washCoach { top: 104px; width: min(94%, 25rem); padding: var(--s3); gap: var(--s2); }
  .pb .washCoach ol { font-size: 0.8125rem; gap: 2px; }
}
/* A short (under 300 px) or narrow (under 500 px) picture, so a phone: the guide shrinks to its one line about spraying and its button, in one row under the chips. wash-ui.js adds .compact. */
.pb .washCoach.compact { grid-template-columns: minmax(0, 1fr) auto; align-items: center; padding: var(--s2) var(--s3); }
.pb .washCoach.compact ol { list-style: none; padding: 0; }
.pb .washCoach.compact li:not(:nth-child(2)) { display: none; }
.pb .washCoach.compact .btn { justify-self: auto; padding: 0 var(--s4); }
/* On a phone held upright the dock never takes more than the lower 58% of the screen, so the picture keeps about 42% of it and the dock scrolls inside itself for the rest. */
@media (orientation: portrait) and (max-width: 640px) {
  html.phone .op-dock { max-height: calc(58dvh - 52px); overflow-y: auto; overscroll-behavior: contain; }
}
@media (orientation: portrait) and (max-height: 700px) {
  html.phone .op-dock .nextStep { padding: 3px 10px; font-size: 0.8125rem; }
}
@media (max-height: 520px) {   /* a phone held sideways: the picture is short, so the chips shrink and sit in one row */
  .pb .hudToolUse { display: none; }
  .pb .hudTool { padding: 4px 10px; max-width: calc(100% - 255px); }   /* the goal chip takes the right 245 px (its button is 44 px high), the tool name wraps in what is left */
  .pb .hudToolName { font-size: 0.875rem; }
  .pb .hudGoal { display: flex; align-items: center; gap: 8px; padding: 4px 8px; }
  .pb .hudPct { font-size: 1.25rem; }
  .pb .hudPressure { padding: 2px 10px; }
  .pb .washCoach { top: 68px; padding: var(--s2) var(--s3); }
}
