.cr-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  width: min(100%, 640px);
}

.cr-top {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 44px;
}

.cr-word {
  font-size: 1.05rem;
}

.cr-word b {
  color: var(--accent);
  font-size: 1.3rem;
}

.cr-mask {
  letter-spacing: 0.25em;
}

.cr-timer {
  display: grid;
  flex: none;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 4px solid var(--border);
  border-radius: 50%;
  font: 800 1.1rem / 1 var(--font);
  font-variant-numeric: tabular-nums;
}

.cr-timer.low {
  border-color: var(--danger);
  color: var(--danger);
}

.cr-canvas-wrap {
  position: relative;
  width: 100%;
}

.cr-canvas {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
  cursor: crosshair;
  touch-action: none;
}

.cr-pick {
  position: absolute;
  inset: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-content: center;
  justify-content: center;
  padding: 20px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  text-align: center;
}

.cr-pick[hidden] {
  display: none;
}

.cr-pick p {
  width: 100%;
  margin: 0 0 4px;
  font-weight: 700;
}

.cr-own {
  display: flex;
  gap: 8px;
  width: 100%;
  max-width: 380px;
}

.cr-own input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 2px solid var(--border, rgba(127, 127, 127, 0.35));
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

.cr-pick .cr-own-err {
  font-weight: 400;
  font-size: 0.85rem;
  color: #ef4444;
}

.cr-pick .cr-own-err[hidden] {
  display: none;
}

/* у гостя по сети режим слов только показан — меняет его хозяин */
.seg.cr-locked {
  pointer-events: none;
  opacity: 0.75;
}

.cr-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: center;
}

.cr-tools.off {
  opacity: 0.4;
  pointer-events: none;
}

.cr-color,
.cr-size {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 2px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
}

.cr-size {
  display: grid;
  place-items: center;
  background: var(--surface);
}

.cr-size i {
  border-radius: 50%;
  background: var(--text);
}

.cr-color.active,
.cr-size.active {
  outline: 3px solid var(--accent);
  outline-offset: 1px;
}

.cr-tools .btn {
  padding: 6px 12px;
  font-size: 0.85rem;
}

.cr-guess {
  display: flex;
  gap: 8px;
  width: 100%;
}

.cr-guess[hidden],
.cr-party[hidden] {
  display: none;
}

.cr-guess input {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

.cr-party {
  display: flex;
  gap: 8px;
}

.cr-chat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  max-height: 130px;
  margin: 0;
  padding: 0;
  overflow: auto;
  list-style: none;
  font-size: 0.9rem;
}

.cr-chat li {
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--surface);
}

.cr-chat li.mine {
  color: var(--muted);
}

.cr-chat li.ok {
  background: color-mix(in srgb, var(--success) 25%, var(--surface));
  font-weight: 700;
}
