.voicing-game {
  display: grid;
  gap: 12px;
  margin: 18px 0;
  border: 1px solid #cfc5b5;
  border-radius: 8px;
  padding: 14px;
  background: #f8f5ed;
}

.voicing-game__header,
.voicing-game__question-head,
.voicing-game__action-row,
.voicing-game__result,
.voicing-game__midi-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.voicing-game__header {
  justify-content: space-between;
  align-items: flex-start;
}

.voicing-game__eyebrow {
  margin: 0 0 3px;
  color: #9b7035;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.voicing-game h3 {
  margin: 0;
  color: #23352d;
  font-size: 1.05rem;
}

.voicing-game__intro {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.voicing-game__status,
.voicing-game__countdown,
.voicing-game__mode,
.voicing-game__degree,
.voicing-game__round,
.voicing-game__result strong {
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 0.76rem;
  font-weight: 900;
}

.voicing-game__status {
  background: #e9e2d4;
  color: #6d5a45;
}

.voicing-game__status.is-ready,
.voicing-game__result.is-correct strong {
  background: #dfead8;
  color: #35572d;
}

.voicing-game__status.is-warning,
.voicing-game__result.is-wrong strong {
  background: #f6dfd6;
  color: #8f392e;
}

.voicing-game__controls {
  display: grid;
  gap: 8px;
  padding-top: 2px;
}

.voicing-game__label {
  color: #5d635e;
  font-size: 0.78rem;
  font-weight: 900;
}

.voicing-game__levels,
.voicing-game__stages {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.voicing-game__levels button,
.voicing-game__stages button,
.voicing-game__action-row button,
.voicing-game__result button,
.voicing-game__midi-row button {
  min-height: 32px;
  border: 1px solid #cfc5b5;
  border-radius: 999px;
  padding: 6px 10px;
  background: #fffefa;
  color: #2d4137;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
}

.voicing-game__levels button.is-selected,
.voicing-game__stages button.is-selected,
.voicing-game__action-row button.is-primary {
  border-color: #4f6f3e;
  background: #4f6f3e;
  color: #fff;
}

.voicing-game__levels button:disabled,
.voicing-game__stages button:disabled,
.voicing-game__action-row button:disabled,
.voicing-game__result button:disabled,
.voicing-game__midi-row button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.voicing-game__midi-row select {
  min-height: 32px;
  min-width: min(260px, 100%);
  border: 1px solid #cfc5b5;
  border-radius: 6px;
  padding: 5px 8px;
  background: #fffefa;
  color: #2d4137;
  font: inherit;
  font-size: 0.78rem;
}

.voicing-game__question {
  display: grid;
  gap: 8px;
  border: 1px solid #ded5c5;
  border-radius: 7px;
  padding: 12px;
  background: #fffefa;
}

.voicing-game__mode {
  background: #e8e0cf;
  color: #765f3b;
}

.voicing-game__degree {
  background: #e3eadb;
  color: #426038;
}

.voicing-game__question h4 {
  margin: 0;
  color: #1f2f28;
  font-size: 1rem;
  line-height: 1.4;
}

.voicing-game__question p {
  margin: 0;
  color: #67716a;
  font-size: 0.78rem;
  line-height: 1.45;
}

.voicing-game__countdown {
  margin-left: auto;
  background: #263a31;
  color: #fff;
}

.voicing-game__countdown.is-preparing {
  min-width: 70px;
  background: #c78f3f;
  color: #fffdf8;
  text-align: center;
}

.voicing-game__round {
  background: #eee6d9;
  color: #685b4c;
}

.voicing-game__result {
  color: #5d635e;
  font-size: 0.82rem;
  line-height: 1.45;
}

.voicing-game__score {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 1px solid #e4dbce;
  padding-top: 10px;
  color: #536057;
  font-size: 0.82rem;
  font-weight: 900;
}

.voicing-game__score strong {
  color: #9b7035;
  font-size: 1.2rem;
}

.voicing-game__score b {
  color: #314a2d;
  font-size: 1rem;
}

.transfer-keyboard {
  display: grid;
  gap: 8px;
  border: 1px solid #ddd2c1;
  border-radius: 6px;
  padding: 10px;
  background: #faf7ef;
}

.transfer-keyboard__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 5px 10px;
}

.transfer-keyboard__head strong {
  color: #304b32;
  font-size: 0.82rem;
}

.transfer-keyboard__head span,
.transfer-keyboard p {
  color: #6a7068;
  font-size: 0.75rem;
  line-height: 1.45;
}

.transfer-keyboard p {
  margin: 0;
}

.transfer-keyboard p strong {
  color: #705a39;
}

.transfer-keyboard svg {
  display: block;
  width: 100%;
  max-height: 130px;
  overflow: visible;
}

.transfer-keyboard text {
  fill: #203027;
  font-family: "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 6px;
  font-weight: 800;
}

.image-modal__keyboard {
  display: none;
}

.image-modal.is-keyboard-preview .image-modal__panel {
  width: min(760px, 100%);
}

.image-modal.is-keyboard-preview .image-modal__panel img {
  display: none;
}

.image-modal.is-keyboard-preview .image-modal__keyboard {
  display: block;
}

.image-modal.is-keyboard-preview .transfer-keyboard {
  border: 0;
  padding: 4px;
  background: transparent;
}

.image-modal.is-keyboard-preview .transfer-keyboard svg {
  max-height: 260px;
}

.image-modal.is-voicing-preview .image-modal__panel {
  width: fit-content;
  max-width: min(340px, 100%);
}

.image-modal.is-voicing-preview .image-modal__panel img {
  width: auto;
  max-width: 100%;
  max-height: min(62vh, 260px);
}

