.is-variable-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: .12em; max-width: 90%; line-height: 1.2; }
.score-number.is-variable-symbols {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  align-content: center;
  inline-size: var(--variable-area-width, max-content);
  block-size: var(--variable-area-height, auto);
  max-inline-size: none;
  column-gap: var(--symbol-gap, 0px);
  row-gap: var(--symbol-row-gap, 0px);
  line-height: 1.2;
}
.score-number.is-variable-symbols[data-symbol-wrap="nowrap"] { flex-wrap: nowrap; justify-content: safe center; }
/* 「指定個数ごとに改行」：1行ずつ（.variable-row）縦に積む。行のそろえ方は data-symbol-align（中央・左・右）。 */
.score-number.is-variable-symbols[data-symbol-wrap="columns"] {
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
}
.score-number.is-variable-symbols .variable-row { display: flex; flex-wrap: nowrap; column-gap: var(--symbol-gap, 0px); }
/* 折り返した時の行のそろえ方 */
.score-number.is-variable-symbols[data-symbol-align="left"] { justify-content: flex-start; }
.score-number.is-variable-symbols[data-symbol-align="right"] { justify-content: flex-end; }
.score-number.is-variable-symbols[data-symbol-wrap="columns"][data-symbol-align="left"] { align-items: flex-start; justify-content: center; }
.score-number.is-variable-symbols[data-symbol-wrap="columns"][data-symbol-align="right"] { align-items: flex-end; justify-content: center; }
.score-number.has-variable-area {
  inline-size: var(--variable-area-width, max-content);
  block-size: var(--variable-area-height, auto);
  max-inline-size: none;
  overflow: clip;
}
.variable-dot { flex: 0 0 auto; white-space: pre; color: var(--variable-empty, #999); }
/* マイナスの横・縦の間隔：記号の外側余白を半分ずつ負にして重ねる（scores.js）。 */
.score-number.is-variable-symbols .variable-dot { margin: var(--symbol-overlap-y, 0px) var(--symbol-overlap-x, 0px); }
.variable-dot.is-filled { color: var(--variable-color, currentColor); }
/* 次の誤答で増える分（予告）。既定は白。 */
.variable-dot.is-next-wrong { color: var(--variable-next, #fff); }
.is-variable-bar { display: grid; gap: .1em; justify-items: stretch; width: 4em; max-width: 90%; }
.variable-bar-track { display: block; height: .35em; background: var(--variable-empty, #999); border-radius: 999px; overflow: hidden; }
.variable-bar-fill { display: block; height: 100%; width: 100%; background: var(--variable-color, currentColor); transform-origin: left; }
.variable-bar-caption { font-size: .5em; text-align: center; }

.score-number[hidden] { display: none !important; }
/* 勝ち抜け・失格・Lock の文字をメインの数字の場所に出す時は、その数字だけ隠す（見本・本番共通）。 */
.score-number.is-status-replaced { visibility: hidden; }

/* 勝ち抜けリーチ：メインの数字の下に下線（色・太さ・間隔・種類は表示編集で決める。太さ・間隔は0で文字の大きさに合わせる）。 */
.score-number.is-reach-underline {
  text-decoration-line: underline;
  text-decoration-color: var(--reach-underline-color, #ff2020);
  text-decoration-style: var(--reach-underline-style, solid);
  text-decoration-thickness: var(--reach-underline-thickness, max(3px, 0.09em));
  text-underline-offset: var(--reach-underline-offset, 0.12em);
  text-decoration-skip-ink: none;
}

/* 誤答マーク */
.wrong-marks {
  position: relative;
  z-index: 3;
  width: 100%;
  min-height: 18px;
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--wrong-color, currentColor);
  font-weight: 800;
  /* 表示編集の見本と同じく基準幅200pxで16px。カードが狭いときは比例して小さく。 */
  font-size: clamp(9px, calc(var(--player-card-base-width, 200px) * 0.08), 16px);
  line-height: 1;
}

.wrong-dot {
  width: 1.05em;
  height: 1.05em;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--wrong-color, currentColor) 18%, transparent);
  font-size: 0.85em;
}

/* 文字色は単色の --effective-card-color（グラデーション背景でも色になる）。 */
.wrong-dot.is-filled {
  color: var(--effective-card-color, var(--effective-card-bg, #fff));
  background: var(--wrong-color, currentColor);
}

.wrong-marks.is-bar {
  height: 10px;
  min-height: 0;
  margin: 10px auto 0;
  width: 72%;
  justify-content: flex-start;
  border-radius: 999px;
  background: color-mix(in srgb, var(--wrong-color, currentColor) 20%, transparent);
  overflow: hidden;
}

.wrong-bar-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--wrong-color, currentColor);
  transition: width 0.3s ease;
}

/* スコアバー
   片側だけのバーでは、バー横の余白を反対側の余白と同じにする。得点グリッドの中央列（7列目）や
   名前が「バーを除いた空き領域」のちょうど中央に来る。バーは box-sizing: border-box で、設定幅がそのまま実幅（表示編集と本番で一致）。 */
:is(.player-card, .card).has-score-bar {
  padding-left: calc(var(--score-bar-width, 12px) + clamp(4px, 9%, 18px));
  padding-right: clamp(4px, 9%, 18px);
}

:is(.player-card, .card).has-score-bar.is-bar-right {
  padding-left: clamp(4px, 9%, 18px);
  padding-right: calc(var(--score-bar-width, 12px) + clamp(4px, 9%, 18px));
}

:is(.player-card, .card).has-score-bar.is-bar-both {
  padding-left: calc(var(--score-bar-width, 12px) + 8px);
  padding-right: calc(var(--score-bar-width, 12px) + 8px);
}

.score-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  width: var(--score-bar-width, 12px);
  box-sizing: border-box;
  display: flex;
  flex-direction: column-reverse;
  gap: min(2px, calc(25% / var(--score-bar-segments, 10)));
  padding: 2px;
  background: rgba(127, 127, 127, 0.12);
}

:is(.player-card, .card).has-rank-band .score-bar {
  top: var(--rank-band-height, 34px);
}

.score-bar[data-side="right"] {
  left: auto;
  right: 0;
}

.score-bar-seg {
  flex: 1 1 0;
  min-height: 0;
  border-radius: 2px;
  background: color-mix(in srgb, var(--score-bar-color, #4fc3f7) 14%, transparent);
}

.score-bar-seg.is-on {
  background: var(--score-bar-color, #4fc3f7);
}


.card.is-score-high .score-number { color:var(--score-high-color, #ffb300) !important; }

/* 状態の文字は1行ずつ改行させず、幅に収まらない分は TaquScores.fitStatusLabel が縮める。 */
.score-status-label span, .editor-status-label span { white-space: nowrap; }
