html, body { background: #2e261f; }

.card.t0 .dot { background: radial-gradient(circle at 35% 30%, #f0705f, #c22d22 70%); }
.card.t1 .dot { background: radial-gradient(circle at 35% 30%, #6b9bf0, #2255b5 70%); }
#toast.t0 { color: #ffa093; }
#toast.t1 { color: #9fc2ff; }
/* 방 이름이 길어도 한 줄에 둔다. 줄이 늘어 창 크기가 변하지 않게 한다. */
.panel .sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 온라인에서 상대 지우개는 상대가 고른다. 만나기 전에는 흐리게 둔다. */
.opt.dim { opacity: 0.35; pointer-events: none; }

/* 내 차례에는 화살표 대신 손이 마우스를 따라다닌다. */
#stage.finger { cursor: none; }

/* 지우개 여덟 가지가 한 줄에 들어가도록 창과 고르는 칸을 다른 놀이보다 조금 넓게 잡는다. */
.panel { width: min(96vw, 1480px); grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr); }

/* 왼쪽 칸: 고른 지우개(위)와 놀이 방법(아래) */
.side { grid-column: 1; min-width: 0; margin-top: 2.4vh; }
.side .rules { margin-top: 1.6vh; }
#peek {
  position: relative;
  margin: 0;
  border-radius: 16px;
  background: radial-gradient(ellipse at 50% 58%, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.06) 72%);
  overflow: hidden;
}
#peek canvas { display: block; width: 100%; height: clamp(110px, 20vh, 250px); }
/* 어떤 지우개를 골라도 한 줄이라 창 크기가 변하지 않는다. */
#peek figcaption {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.8em;
  padding: 0 1vw 1.2vh;
  white-space: nowrap;
  font-size: clamp(13px, 1.15vw, 20px);
}
#peek strong { font-size: clamp(16px, 1.5vw, 26px); font-weight: 700; }
#peek figcaption span { min-width: 0; overflow: hidden; text-overflow: ellipsis; opacity: 0.8; }
/* 누구의 지우개인지 */
#peekWho {
  position: absolute;
  top: 1.2vh;
  left: 0.9vw;
  padding: 0.3vh 0.7vw;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-size: clamp(12px, 1.05vw, 18px);
}

/* 지우개 고르기: 위에서 본 그림과 이름 */
.kinds button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5vh;
  min-width: 0;
  padding: 0.8vh 0.1vw 0.6vh;
  font-size: clamp(13px, 1.15vw, 19px);
  white-space: nowrap;
}
.kinds .pic { display: grid; place-items: center; width: 84%; aspect-ratio: 1.6; }
.kinds canvas { display: block; height: auto; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5)); }

/* 누르는 세기를 알려 주는 고리 */
#gauge {
  position: fixed;
  width: clamp(64px, 11vh, 132px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
#gauge svg { display: block; width: 100%; height: 100%; transform: rotate(-90deg); }
#gauge circle { fill: none; stroke-width: 14; }
#gauge .back { fill: rgba(var(--ink), 0.62); stroke: rgba(255, 255, 255, 0.26); }
#gauge span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: clamp(13px, 2.1vh, 24px);
  font-weight: 700;
}

/* 낮고 좁은 화면(960×540 같은): 놀이 방법이 여러 줄로 접혀도 창이 넘치지 않게 지우개 그림 칸을 낮춘다. */
@media (max-width: 1000px) {
  #peek canvas { height: clamp(72px, 14vh, 150px); }
}
@media (max-width: 860px), (orientation: portrait) {
  .panel { grid-template-columns: minmax(0, 1fr); }
  #peek canvas { height: clamp(96px, 14vh, 150px); }
  .kinds { flex-wrap: wrap; }
  .kinds button { flex: 1 0 22%; }
}

/* 휴대폰처럼 좁은 화면: 이름이 긴 점수판이 놀이 고르기 단추와 겹치지 않게 그 아래에 둔다. */
@media (max-width: 600px) {
  #hud { top: calc(3.2vh + 40px); }
}
