.cc-demo[hidden] { display: none; }
.cc-demo { box-sizing: border-box; max-width: 560px; margin: 24px auto 0; padding: 20px; background: #14263b; border: 1px solid #36516c; border-radius: 16px; }
.cc-demo-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.cc-demo-head h2 { margin: 0; font-size: 19px; }
.cc-demo button {
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  color: #e8f9f3;
  background: #23443f;
  border: 1px solid #527c73;
  border-radius: 9px;
  padding: 8px 12px;
  text-decoration: none;
  cursor: pointer;
}
.cc-demo-board {
  display: grid;
  grid-template: repeat(8, minmax(0, 1fr)) / repeat(8, minmax(0, 1fr));
  width: min(100%, clamp(220px, 44vh, 400px));
  aspect-ratio: 1;
  margin: auto;
  border-radius: 8px;
  overflow: hidden;
}
.cc-demo-square { display: grid; place-items: center; min-width: 0; min-height: 0; background: #e3eaf0; }
.cc-demo-square.dark { background: #58758e; }
.cc-demo-square.last { box-shadow: inset 0 0 0 3px #edc875; }
.cc-demo-square img { display: block; width: 91%; height: 91%; object-fit: contain; }
#cc-demo-match { margin: 10px 0 3px; font-weight: 750; }
#cc-demo-move { min-height: 1.4em; margin: 0 0 8px; color: #bfd2e4; font-size: 14px; }
.cc-demo summary { cursor: pointer; width: fit-content; color: #c8e6da; font-size: 14px; }
#cc-demo-score { padding-inline-start: 26px; font-variant-numeric: tabular-nums; }
.cc-demo-link { color: #b7e6cf; font-weight: 700; }
.cc-demo :focus-visible, .cc-demo-link:focus-visible { outline: 2px solid #edc875; outline-offset: 3px; }
