/* 「よく読んで」固有の盤面。共通UIは ../css/game-common.css。 */

.game-area { width: 100%; }

.game-area .rc-skeleton {
  --rc-panel-h: 236px;
  --rc-choice-h: 76px;
  --rc-lamp-h: 176px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.rc-label {
  margin: 0;
  min-height: 1.5em;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.5;
  text-align: center;
  color: var(--green);
}

.rc-label.is-wrong { color: #b42318; font-size: 18px; }

/* 説明・観察・回答は同じ枠の中身を入れ替える（高さのジャンプを避ける）。一時停止中は中身ごと見えなくする。 */
.rc-panel {
  width: 100%;
  max-width: 420px;
  min-height: var(--rc-panel-h);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.rc-panel.is-review { justify-content: flex-start; }
.rc-skeleton.is-concealed .rc-panel,
.rc-skeleton.is-concealed .rc-bottom { visibility: hidden; }
body.is-paused .rc-panel,
body.is-paused .rc-bottom,
body.is-utility-paused .rc-panel,
body.is-utility-paused .rc-bottom { visibility: hidden; }

/* ---- 説明 ---- */
.rc-read-card {
  padding: 16px 14px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: #fffef8;
  color: var(--ink);
  text-align: left;
  box-sizing: border-box;
}
.rc-line {
  margin: 0 0 4px;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.65;
  /* 文節の途中で折り返さない（対応ブラウザ）。対応外でも長い語ははみ出さない。 */
  word-break: auto-phrase;
  line-break: strict;
  overflow-wrap: anywhere;
}
.rc-line:last-child { margin-bottom: 0; }

.rc-bottom {
  display: grid;
  width: 100%;
  max-width: 420px;
  min-height: 52px;
  justify-items: center;
}
.rc-bottom [hidden] { display: none !important; }
.rc-understood.play,
.rc-next.play {
  width: min(100%, 240px);
  min-height: 48px;
  padding: 10px 24px;
  font-size: 17px;
  text-align: center;
}

/* ---- 観察 ---- */
.rc-observe {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
/* 中央のカード。表示中は大きな図形（図形自体に色・中央に色名）、消灯中は空の枠。 */
.rc-lamp {
  width: min(100%, 260px);
  height: var(--rc-lamp-h);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  box-sizing: border-box;
  background: #fff;
}
.rc-lamp[data-state="on"] { border: 3px solid #cdd5c4; }
.rc-lamp[data-state="off"] { border: 3px dashed #c9d0c3; }
.rc-lamp .rc-svg { width: calc(var(--rc-lamp-h) - 22px); height: calc(var(--rc-lamp-h) - 22px); }
.rc-svg { display: block; flex: none; }
.rc-svg-text { font-family: "Yu Gothic", "Meiryo", sans-serif; }
.rc-half {
  margin: 0;
  min-height: 1.5em;
  font-size: 15px;
  font-weight: 800;
  color: var(--muted);
}

/* ---- 回答 ---- */
.rc-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: var(--rc-choice-h);
  gap: 10px;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}
.rc-choice {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 44px;
  margin: 0;
  padding: 4px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  outline: none;
  box-sizing: border-box;
}
.rc-choice-num { font-size: 26px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.rc-choice-mark, .rc-colorchip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  max-width: 100%;
  padding: 8px 16px;
  border: 3px solid var(--rc-edge);
  border-radius: 10px;
  background: var(--rc-fill);
  color: var(--rc-ink);
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  box-sizing: border-box;
}
.rc-choice-shape { display: inline-flex; align-items: center; gap: 10px; max-width: 100%; }
.rc-choice-name { font-size: 20px; font-weight: 800; line-height: 1.1; white-space: nowrap; }
html.is-keyboard-nav .rc-choice:focus-visible { border-color: #d88635; outline: 3px solid #d88635; outline-offset: 2px; }
@media (hover: hover) {
  .rc-choice:not(:disabled):hover { border-color: rgba(50, 102, 77, 0.55); background: #fbfdf7; }
}

.rc-badge {
  position: absolute;
  top: -8px;
  right: -6px;
  width: 24px;
  height: 24px;
  border: 2px solid #fff;
  border-radius: 50%;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(52, 75, 64, 0.3);
}
.rc-choice:disabled { cursor: default; opacity: 1; }
.rc-choices.is-reveal .rc-choice:not(.is-correct):not(.is-wrong) { opacity: 0.55; }
.rc-choice.is-correct { border-color: var(--green); border-width: 3px; background: #e3f0e3; }
.rc-choice.is-correct .rc-badge { display: flex; background: var(--green); }
.rc-choice.is-correct .rc-badge::before { content: "○"; }
.rc-choice.is-wrong { border: 3px dashed #b42318; background: #fbe9e6; }
.rc-choice.is-wrong .rc-badge { display: flex; background: #b42318; }
.rc-choice.is-wrong .rc-badge::before { content: "×"; }

/* ---- 不正解の復習 ---- */
.rc-review {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border: 2px solid #e6b8b2;
  border-radius: 12px;
  background: #fff8f6;
  text-align: left;
  box-sizing: border-box;
}
.rc-review-block { display: flex; flex-direction: column; gap: 4px; }
.rc-review-title { margin: 0; font-size: 12px; font-weight: 800; color: var(--muted); }
.rc-review-prompt { padding: 6px 10px; border-left: 4px solid #d88635; background: #fffdf6; }
.rc-review-prompt .rc-line { font-size: 16px; line-height: 1.55; margin: 0 0 2px; }
.rc-key { background: linear-gradient(transparent 55%, #ffe08a 55%); font-weight: 900; }
.rc-review-seq { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.rc-review-divider { width: 2px; align-self: stretch; min-height: 24px; background: var(--muted); margin: 0 3px; }
.rc-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px 2px 3px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}
.rc-chip .rc-svg { width: 30px; height: 30px; }
.rc-colorchip { min-width: 0; padding: 4px 14px; font-size: 20px; }
.rc-review-answer { margin: 0; font-size: 22px; font-weight: 900; color: var(--ink); }
.rc-review-answer.is-shape { display: flex; align-items: center; gap: 4px; }
.rc-review-you { margin: 0; font-size: 13px; font-weight: 700; color: var(--muted); }
.rc-review-reason { margin: 0; font-size: 14px; font-weight: 700; line-height: 1.55; color: var(--ink); }

@media (max-width: 430px) {
  .game-area .rc-skeleton { --rc-panel-h: 220px; --rc-choice-h: 68px; --rc-lamp-h: 164px; gap: 6px; }
  .rc-line { font-size: 17px; }
  .rc-read-card { padding: 12px 10px; }
  .rc-choices { gap: 8px; }
  .rc-choice-mark { min-width: 80px; padding: 7px 12px; font-size: 20px; }
  .rc-choice-name { font-size: 18px; }
  .rc-choice-shape { gap: 6px; }
  .rc-choice-num { font-size: 24px; }
}
@media (max-height: 760px) {
  .game-area .rc-skeleton { --rc-panel-h: 200px; --rc-lamp-h: 150px; }
}
@media (min-width: 700px) {
  .game-area .rc-skeleton { --rc-panel-h: 260px; --rc-choice-h: 84px; --rc-lamp-h: 196px; }
  .rc-line { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) {
  .rc-choice { transition: none; }
}

