/* Pourline v2: the icon toolbar under the board (Undo, End run in endless, Patterns+).
   Flat: paper fill, an opaque 2px border in a darker shade of the clay ground, no black. */
.pl-bar {
  position: absolute; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); z-index: 2;
  transform: translateX(-50%); display: flex; gap: 14px; align-items: center;
}
.pl-ibtn {
  appearance: none; position: relative; width: 52px; height: 52px; border-radius: 16px; cursor: pointer;
  display: grid; place-items: center; padding: 0; color: #56351C;
  background: #F6F3EC; border: 0; box-shadow: inset 0 0 0 2px #8A5430;
  transition: transform 120ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 160ms;
}
.pl-ibtn[hidden] { display: none; }
.pl-ibtn:active:not(:disabled) { transform: translateY(1px) scale(0.96); }
.pl-ibtn:focus-visible { outline: 2px solid #F6F3EC; outline-offset: 3px; }
/* Disabled: the look of 55% opacity over the clay ground, but the border stays opaque
   (fill and tag pre-blended with the ground, only the icon fades). */
.pl-ibtn:disabled { cursor: default; background: color-mix(in srgb, #F6F3EC 55%, #C0753F); }
.pl-ibtn:disabled > svg { color: #84715D; }
.pl-ibtn:disabled .pl-ibtn__tag { background: color-mix(in srgb, #56351C 55%, #C0753F); color: color-mix(in srgb, #F6F3EC 55%, #C0753F); }
.pl-ibtn__tag {
  position: absolute; right: -5px; top: -5px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  display: grid; place-items: center; font: 800 11px/1 var(--f-display); color: #F6F3EC; background: #56351C;
}
.pl-cb .pl-ibtn__tag { display: none; }
.pl-cb[data-on="true"] .pl-ibtn__tag { display: grid; }
/* Kept with data-chrome="off" (the portal iframe): these are the game's own controls, not corner chrome. */
@media (min-width: 900px) and (pointer: fine) {
  .pl-ibtn { width: 56px; height: 56px; }
}
@media (prefers-reduced-motion: reduce) {
  .pl-ibtn { transition: none; }
}
/* Safe-area probe (main.js reads its padding): the canvas HUD and board keep clear of notches. */
.pl-safe {
  position: absolute; left: 0; top: 0; width: 0; height: 0; visibility: hidden; pointer-events: none;
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
}
