html, body { margin: 0; overflow-x: hidden; }
.cs-page {
  width: min(1080px, calc(100% - 32px));
  margin-inline: auto;
  padding-bottom: 28px;
}
.cs-title {
  margin: 8px 0 0;
  text-align: center;
  font-family: var(--ms-title);
  font-weight: 600;
  color: var(--ms-ink);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}
.cs-level,
.cs-status {
  margin: 4px 0 0;
  text-align: center;
  font-family: var(--ms-text);
  color: #5a3828;
}
.cs-level { font-weight: 600; }
.cs-status { min-height: 1.4em; color: #6e5646; }

.board {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(4px, 1vw, 14px);
  width: 100%;
  margin-top: 14px;
  direction: ltr;
}
.col {
  flex: 1 1 0;
  min-width: 0;
  max-width: 118px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.bowl,
.hook,
.piece {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  max-width: 100%;
  -webkit-tap-highlight-color: transparent;
}
.bowl img,
.hook img,
.piece img,
.link {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}
.bowl img { max-height: 92px; }
.hook {
  min-height: 44px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.hook img { max-height: 36px; opacity: 0.85; }
.piece img { max-height: 74px; }
.link {
  max-height: 18px;
  max-width: 26px;
  margin: -2px auto;
}
.cap {
  display: block;
  margin-top: 2px;
  font-family: var(--ms-text);
  font-size: 0.72rem;
  font-weight: 600;
  color: #5a3828;
  text-align: center;
  line-height: 1.2;
}
.piece.picked img {
  filter: drop-shadow(0 0 6px rgba(196, 161, 90, 0.95));
}
.col.is-locked .piece,
.col.is-locked .bowl {
  cursor: default;
}
.col.is-locked .piece img,
.col.is-locked .bowl img {
  filter: drop-shadow(0 0 5px rgba(184, 146, 74, 0.95));
}
.col.shake { animation: cs-shake 0.28s ease; }
@keyframes cs-shake {
  0%, 100% { transform: translateX(0); }
  30% { transform: translateX(-5px); }
  70% { transform: translateX(5px); }
}

.win {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(90, 56, 40, 0.28);
  z-index: 5;
  padding: 20px;
}
.win[hidden] { display: none; }
.win-card {
  width: min(420px, 100%);
  padding: 22px 18px;
  text-align: center;
  border-radius: 22px;
  background: rgba(251, 246, 238, 0.96);
  border: 1px solid rgba(196, 161, 90, 0.55);
  box-shadow: 0 8px 16px rgba(74, 58, 42, 0.12);
}
.win-card h2 {
  margin: 0 0 14px;
  font-family: var(--ms-title);
  font-size: 1.8rem;
  font-weight: 600;
  color: #5a3828;
}
.win-card button {
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid rgba(196, 161, 90, 0.55);
  border-radius: 999px;
  background: rgba(251, 246, 238, 0.92);
  color: #5a3828;
  font-family: var(--ms-text);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

@media (max-width: 720px) {
  .cs-page { width: min(1080px, calc(100% - 12px)); }
  .bowl img { max-height: 62px; }
  .piece img { max-height: 50px; }
  .link { max-height: 12px; }
  .cap { font-size: 0.62rem; }
}
@media (max-height: 740px) {
  .bowl img { max-height: 54px; }
  .piece img { max-height: 44px; }
}
