.board-b72b1, .cg-board, #cw-board, .cw-board { position: relative; }

.cw-hint-canvas{
  position:absolute !important;
  inset:0 !important;
  pointer-events:none !important;
  z-index:99999 !important;
}


.cw-hint-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  vertical-align: middle;
  max-width: 100%;
  position: relative;
  isolation: isolate;
}

.cw-hint-wrap .cw-hint-btn {
  margin-left: 0;
}

.cw-hint-wrap.floating {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 99;
  box-shadow: 0 6px 18px rgba(0,0,0,.2);
}

.cw-hint-counter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  padding: 5px 8px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.12);
  background: rgba(255,255,255,.92);
  color: #222;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
  position: relative;
  z-index: 60;
}

.cw-hint-wrap.is-empty .cw-hint-counter {
  opacity: .85;
}

.cw-hint-wrap.is-empty .cw-hint-btn {
  opacity: .7;
}

.cw-hint-btn {
  margin-left: 8px;
  padding: 6px 10px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.15);
  background: #f3f3f3;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  position: relative;
  z-index: 62;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  width: auto;
  max-width: 100%;
  min-width: 40px;
  min-height: 28px;
  flex: 0 0 auto;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.cw-hint-btn__ico {
  display: block;
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.cw-hint-btn.floating {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 99;
  box-shadow: 0 6px 18px rgba(0,0,0,.2);
}

.cw-hint-btn:focus {
  outline: 2px solid rgba(0,150,255,.6);
  outline-offset: 2px;
}

/* Hint placement anchors (admin -> Grafika) */
.cw-hint-slot {
  display: flex;
  align-items: center;
  position: relative;
  z-index: 60;
  flex: 0 0 auto;
  min-width: 0;
}

/* Hint slot: above buttons bar (full width, centered) */
.cw-hint-slot--above-buttons{
  width: 100%;
  justify-content: center;
  margin-bottom: 8px;
  flex: 1 1 100%;
}

/* IMPORTANT: #cw-controls-slot is display:flex (row) by default.
   When we add the "above buttons" slot as a sibling of .cw-controls,
   we must stack it vertically, otherwise hint/chat and buttons end up left/right. */
#cw-controls-slot.cw-hint-above-buttons{
  flex-direction: column !important;
  align-items: center !important;
}

#cw-controls-slot.cw-hint-above-buttons .cw-controls{
  width: 100%;
  justify-content: center;
}

.cw-hint-slot:empty {
  display: none;
}

.cw-hint-bottom {
  display: flex;
  justify-content: center;
  margin-top: 10px;
  position: relative;
  z-index: 60;
}

.cw-hint-bottom:empty {
  display: none;
}

.cw-hint-toast-layer {
  position: absolute;
  inset: 0;
  z-index: 100050;
  pointer-events: none;
  overflow: visible;
}

.cw-toast {
  position: absolute;
  left: 50%;
  width: min(520px, calc(100% - 28px));
  max-width: calc(100% - 28px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

.cw-toast--top {
  top: 325px;
  transform: translate(-50%, -8px) scale(.98);
}

.cw-toast--center {
  top: 50%;
  width: min(560px, calc(100% - 28px));
  transform: translate(-50%, -50%) scale(.98);
}

.cw-toast.show {
  opacity: 1;
}

.cw-toast.show.cw-toast--top {
  transform: translate(-50%, 0) scale(1);
}

.cw-toast.show.cw-toast--center {
  transform: translate(-50%, -50%) scale(1);
}

.cw-toast__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  padding: 22px 24px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,.62);
  background: rgba(255,255,255,.88);
  box-shadow: 0 18px 48px rgba(0,0,0,.18);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.cw-toast__title {
  margin: 0;
  color: #6b4322;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: .2px;
}

.cw-toast__msg {
  margin: 0;
  color: #5b5249;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.42;
}

.cw-toast[data-kind="success"] .cw-toast__title,
.cw-toast[data-kind="success"] .cw-toast__msg {
  color: #5a3b1e;
}

.cw-toast[data-kind="limit"] .cw-toast__inner {
  background: rgba(255,255,255,.92);
  box-shadow: 0 22px 56px rgba(0,0,0,.22);
}

.cw-toast[data-kind="limit"] .cw-toast__title {
  font-size: 24px;
}

@media (max-width: 768px) {
  .cw-toast--top {
    top: 150px;
  }

  .cw-toast__inner {
    gap: 6px;
    padding: 18px 16px;
    border-radius: 18px;
  }

  .cw-toast__title {
    font-size: 18px;
  }

  .cw-toast__msg {
    font-size: 14px;
    line-height: 1.38;
  }
}

/* basic square marks (absolute dots) */
.cw-hint-mark {
  position: absolute;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  margin-top: -7px;
  border-radius: 50%;
  background: rgba(176,132,73,.75);
}
/* === ZMNIEJSZ ODSTĘP (niebieski obszar) przy controls === */
.cw-controls-anchor{
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-top: 6px !important;
  margin-bottom: 6px !important;
  min-height: 0 !important;
}

#cw-controls-slot{
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* tryb "Nad przyciskami" — zmniejsz przerwę między (czat+hint) a przyciskami */
#cw-controls-slot.cw-hint-above-buttons{
  row-gap: 6px !important; /* jak nadal za duże: 4px */
}


.cw-hint-wrap.floating .cw-hint-btn,
.cw-hint-wrap.floating .cw-hint-counter {
  box-shadow: none;
}
