/* Тактическая доска на сайте. Фишки и подносы — те же, что у «Плана игры» в портале (.gp-* в portal.css). */
.tcb { --tcb-line: #c8d3de; --tcb-ink: #0a1c2b; --tcb-soft: #5a6b7b; --tcb-accent: #e59f00; color: var(--tcb-ink); }
.tcb * { box-sizing: border-box; }

.tcb-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.tcb-group { display: flex; gap: 6px; flex-wrap: wrap; }
.tcb-spacer { flex: 1 1 auto; min-width: 8px; }
.tcb-sep { width: 1px; align-self: stretch; background: var(--tcb-line); margin: 2px 4px; }
.tcb-btn {
  width: 38px; height: 38px; padding: 0; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--tcb-accent); border-radius: 10px; background: #fff; color: var(--tcb-ink); cursor: pointer;
}
.tcb-btn:hover { background: #fff6e0; }
.tcb-btn.active { background: var(--tcb-accent); color: #0a1c2b; }
.tcb-btn svg { display: block; }
.tcb-colors { display: flex; align-items: center; gap: 6px; padding: 2px 4px; }
.tcb-color { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--tcb-line); padding: 0; cursor: pointer; transition: transform .08s ease; }
.tcb-color.active { outline: 2px solid var(--tcb-accent); outline-offset: 1px; box-shadow: 0 0 0 2px #fff; }
.tcb-color:active { transform: scale(.92); }
.tcb-save {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px;
  border: 0; border-radius: 10px; background: var(--tcb-accent); color: #0a1c2b; font: inherit; font-weight: 800; font-size: 14px; cursor: pointer;
}
.tcb-save:hover { filter: brightness(1.05); }

.tcb-board { display: flex; gap: 24px; align-items: flex-start; justify-content: center; flex-wrap: wrap; }
.tcb-rink-wrap {
  position: relative; flex: 1 1 560px; min-width: 0; max-width: 940px; width: 100%;
  aspect-ratio: 2.35 / 1; border-radius: 16px; overflow: hidden;
  background: #eef4fa; border: 1px solid var(--tcb-line);
  touch-action: pan-y pinch-zoom; -webkit-user-select: none; user-select: none;
}
.tcb-rink-wrap.tcb-drawing { touch-action: none; cursor: crosshair; }
.tcb-rink-wrap.tcb-eraser { cursor: cell; }
.tcb-canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.tcb-vertical .tcb-rink-wrap { aspect-ratio: 1 / 2; max-width: 420px; flex: 1 1 100%; margin: 0 auto; }

.tcb-trays { flex: 0 0 270px; min-width: 220px; display: flex; flex-direction: column; gap: 16px; }
.tcb-tray-block h3 { font-size: 14px; margin: 0 0 6px; color: var(--tcb-ink); font-weight: 700; }
.tcb-tray-block h3 span { font-weight: 400; font-size: 11px; color: var(--tcb-soft); margin-left: 6px; }
.tcb-tray { display: grid; grid-template-columns: repeat(3, 1fr); justify-items: center; gap: 8px; padding: 10px; border: 1px solid var(--tcb-line); border-radius: 12px; background: #fff; }
.tcb-tray-small { grid-template-columns: repeat(5, 1fr); }
.tcb-hint { margin: 0; font-size: 12.5px; color: var(--tcb-soft); }
@media (max-width: 940px) {
  .tcb-trays { flex: 1 1 100%; flex-direction: row; flex-wrap: wrap; }
  .tcb-tray-block { flex: 1 1 220px; }
  .tcb-hint { flex: 1 1 100%; }
}

.tcb-chip {
  position: relative; width: 36px; height: 36px; border-radius: 50%; border: 2px solid #1c1c1f;
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #fff;
  cursor: grab; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); touch-action: none; -webkit-user-select: none; user-select: none;
}
.tcb-blue { background: #3576b5; }
.tcb-black { background: #1c1c1f; }
.tcb-red { background: #d13a4f; }
.tcb-goalie { font-size: 20px; }
.tcb-sm { width: 26px; height: 26px; font-size: 11px; }
.tcb-label { pointer-events: none; max-width: 30px; overflow: hidden; line-height: 1; }
.tcb-cone {
  width: calc(36px * .9); height: calc(36px * .9); border: none; border-radius: 0;
  background: linear-gradient(to bottom, #f5821f 0%, #f5821f 62%, #fff 62%, #fff 78%, #f5821f 78%, #f5821f 100%);
  clip-path: polygon(50% 0%, 12% 100%, 88% 100%); box-shadow: none;
}
.tcb-onice { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2; }
.tcb-onice.tcb-cone { filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .35)); }
.tcb-onice.tcb-drag { opacity: .85; cursor: grabbing; z-index: 5; box-shadow: 0 4px 10px rgba(0, 0, 0, .35); }
.tcb-ghost { position: fixed; left: 0; top: 0; pointer-events: none; z-index: 3000; transform: translate(-50%, -50%); opacity: .9; }
@media (max-width: 480px) {
  .tcb-chip { width: 32px; height: 32px; font-size: 11px; }
  .tcb-goalie { font-size: 17px; }
  .tcb-sm { width: 24px; height: 24px; }
  .tcb-cone { width: calc(32px * .9); height: calc(32px * .9); }
}

.tcb-popup {
  position: fixed; z-index: 3000; display: flex; align-items: center; gap: 6px; padding: 6px 8px;
  background: #fff; border: 1px solid var(--tcb-line, #c8d3de); border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, .15);
}
.tcb-popup-input { width: 44px; padding: 5px 6px; border-radius: 6px; border: 1px solid #e59f00; background: #fff; color: #0a1c2b; font: inherit; font-size: 16px; text-align: center; }
.tcb-popup-ok { width: 28px; height: 28px; flex-shrink: 0; border-radius: 50%; border: none; background: #e59f00; color: #0a1c2b; display: flex; align-items: center; justify-content: center; cursor: pointer; }

/* Телефон: площадка вертикально, справа узкая колонка фишек — чтобы доска и фишки были на одном экране (как в портале). */
.tcb-vertical .tcb-board { flex-wrap: nowrap; gap: 8px; align-items: flex-start; justify-content: flex-start; }
.tcb-vertical .tcb-rink-wrap { flex: 1 1 auto; width: auto; max-width: none; margin: 0; }
.tcb-vertical .tcb-trays { flex: 0 0 98px; min-width: 0; flex-direction: column; flex-wrap: nowrap; gap: 8px; }
.tcb-vertical .tcb-tray-block { flex: none; }
.tcb-vertical .tcb-tray-block h3 { font-size: 12px; margin-bottom: 4px; }
.tcb-vertical .tcb-tray-block h3 span, .tcb-vertical .tcb-hint { display: none; }
.tcb-vertical .tcb-tray, .tcb-vertical .tcb-tray-small { grid-template-columns: repeat(2, 1fr); padding: 6px; gap: 6px; }
.tcb-vertical .tcb-toolbar { gap: 6px; }
.tcb-vertical .tcb-group { gap: 4px; flex-wrap: nowrap; }
.tcb-vertical .tcb-btn { width: 34px; height: 34px; }
.tcb-vertical .tcb-sep { display: none; }
