/* みんなでカーリング（party/curling） 独自スタイル。共通は ../common/party.css。
   テーマは氷の白青（仕様§5）。盤面はCanvas 1枚で、DOMは上下の帯と結果パネルだけ。 */

:root {
  --party-accent: #5aa7d6;
  --party-accent-dark: #2f7fb0;
  --party-accent-soft: #e2f1fa;
  --party-bg: #eef7fc;
  --party-card: #ffffff;
  --party-text: #1d3a4d;
  --party-muted: #6b8a9c;
  --cur-ice: #f4fbff;
}

.cur-game {
  position: fixed;
  inset: 0;
  background: var(--cur-ice);
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.cur-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

/* ---- 上の帯 ---- */
.cur-hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: calc(env(safe-area-inset-top) + 8px) 14px 10px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.cur-hud__row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cur-end {
  font-size: 15px;
  font-weight: 800;
  color: var(--party-accent-dark);
  white-space: nowrap;
}

.cur-scores {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--party-text);
}

.cur-scores span {
  background: #fff;
  border-radius: 999px;
  padding: 1px 9px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}

.cur-turn {
  margin: 6px 0 0;
  font-size: 20px;
  font-weight: 800;
  text-align: center;
  color: var(--party-text);
  text-shadow: 0 1px 0 #fff, 0 0 8px #fff;
}

.cur-turn.is-me {
  color: #d2691e;
}

.cur-timebar {
  height: 8px;
  margin: 8px auto 0;
  max-width: 320px;
  border-radius: 999px;
  background: #d8e9f3;
  overflow: hidden;
}

.cur-timebar__fill {
  height: 100%;
  width: 100%;
  border-radius: 999px;
  background: var(--party-accent);
  transition: width 0.2s linear;
}

.cur-timebar__fill.is-hurry {
  background: #e8873a;
}

/* ---- 下の帯（ヒントと強さ） ---- */
.cur-foot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 16px calc(env(safe-area-inset-bottom) + 12px);
  pointer-events: none;
  text-align: center;
}

.cur-hint {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--party-muted);
  text-shadow: 0 1px 0 #fff;
}

.cur-power {
  height: 14px;
  margin: 8px auto 0;
  max-width: 260px;
  border-radius: 999px;
  background: #d8e9f3;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.12);
}

.cur-power__fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(to right, #7ec8ee, #e8873a);
}

/* ---- エンドの採点パネル ---- */
.cur-panel {
  position: absolute;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom) + 18px);
  transform: translateX(-50%);
  width: min(92vw, 420px);
  background: rgba(255, 255, 255, 0.96);
  border-radius: 20px;
  padding: 14px 16px;
  box-shadow: 0 8px 24px rgba(24, 70, 100, 0.22);
  animation: cur-pop 0.28s ease-out;
}

@keyframes cur-pop {
  from {
    transform: translateX(-50%) translateY(14px);
    opacity: 0;
  }
  to {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
}

.cur-panel__title {
  margin: 0 0 8px;
  font-size: 19px;
  font-weight: 800;
  text-align: center;
  color: var(--party-accent-dark);
}

.cur-panel__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cur-panel__list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 700;
  background: var(--party-accent-soft);
  border-radius: 12px;
  padding: 6px 12px;
}

.cur-panel__list li b {
  margin-left: auto;
  color: var(--party-accent-dark);
}

.cur-gain {
  color: #d2691e;
  font-size: 15px;
}

/* ---- さいしゅうけっか ---- */
.cur-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px 20px calc(env(safe-area-inset-bottom) + 20px);
  background: rgba(238, 247, 252, 0.96);
  overflow-y: auto;
}

.cur-final__title {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  color: var(--party-accent-dark);
}

.cur-podium {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: min(92vw, 380px);
}

.cur-podium__item {
  background: #fff;
  border-radius: 16px;
  padding: 10px 14px;
  font-size: 20px;
  font-weight: 800;
  text-align: center;
  box-shadow: var(--party-shadow);
}

.cur-podium__item.rank1 {
  outline: 3px solid #f2c14e;
}

.cur-final__list {
  list-style: none;
  margin: 4px 0 8px;
  padding: 0;
  width: min(92vw, 380px);
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 16px;
  font-weight: 700;
  color: var(--party-text);
}

.cur-final__list li {
  display: flex;
  gap: 8px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 12px;
  padding: 5px 12px;
}

.cur-final__list li b {
  margin-left: auto;
}

.cur-final__actions {
  width: min(92vw, 380px);
}

/* ゲストにはボタンが出ないので、代わりに「まってるよ」を1行だす（marbleの作法） */
.cur-wait {
  margin: 8px 0 0;
  text-align: center;
  font-weight: 700;
  color: var(--party-muted);
}
