.cards-question { display: flex; align-items: center; justify-content: center; gap: 12px; text-align: center; }
.cards-question .game-mascot { width: 92px; height: auto; flex: none; }
.cards-name { margin: 0 0 14px; color: #12364b; font-size: clamp(1.6rem, 6vw, 2.4rem); font-weight: 900; line-height: 1.3; }
.cards-answer { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; min-height: 76px; border: 2px dashed #9cc7cd; border-radius: 16px; background: #f4f9fa; padding: 10px; transition: background .15s, border-color .15s; }
.cards-answer.is-over { border-color: #087c86; background: #e3f5f6; }
.cards-answer.is-miss { animation: typing-shake .22s ease; }
.cards-empty { color: #8aa3ab; font-weight: 700; }
.cards-preview { min-height: 1.5em; margin: 10px 0 0; text-align: center; color: #087c86; font-family: "Helvetica Neue", Arial, sans-serif; font-size: clamp(1.8rem, 6vw, 2.4rem); font-weight: 900; }
.cards-game .typing-feedback { margin: 6px 0 12px; min-height: 1.6em; line-height: 1.5; }

.cards-palette { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.formula-card, .formula-chip { font-family: "Helvetica Neue", Arial, sans-serif; font-weight: 800; color: #12364b; cursor: pointer; }
.formula-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: 58px; border: 2px solid #c6d9de; border-bottom-width: 4px; border-radius: 12px; background: #fff; font-size: 1.5rem; touch-action: none; user-select: none; -webkit-tap-highlight-color: transparent; -webkit-user-select: none; }
.formula-card:hover { border-color: #087c86; }
.formula-card:active { transform: translateY(2px); border-bottom-width: 2px; }
.formula-symbol { line-height: 1.05; }
.formula-card.is-metal { background: linear-gradient(#fff, #fff3ea); border-color: #ebc3a6; }
.formula-card.is-nonmetal { background: linear-gradient(#fff, #eaf6fb); border-color: #a9d2e3; }
.formula-card.is-number { background: #fff8e8; border-color: #ecd193; }
.formula-card.is-sign { background: #f3efff; border-color: #cfc3f3; }
.formula-chip.is-metal { border-color: #d98a52; }
.formula-chip.is-nonmetal { border-color: #3f9cc1; }
.formula-card.is-ghost { position: fixed; z-index: 50; width: 64px; min-height: 58px; transform: translate(-50%, -60%); pointer-events: none; box-shadow: 0 10px 22px rgba(18, 54, 75, .25); }
.formula-chip { -webkit-tap-highlight-color: transparent; min-width: 44px; min-height: 48px; border: 2px solid #087c86; border-radius: 10px; background: #fff; font-size: 1.35rem; padding: 0 8px; }
.formula-chip.is-number { border-color: #d9a93c; font-size: 1.05rem; min-width: 34px; }
.formula-chip.is-sign { border-color: #8f7ad9; font-size: 1.05rem; min-width: 34px; }
.formula-card:focus-visible, .formula-chip:focus-visible, .cards-action:focus-visible, .cards-quit:focus-visible { outline: 3px solid #f2b84b; outline-offset: 2px; }

.cards-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.cards-action { min-height: 50px; border: 1px solid #91b9c2; border-radius: 12px; background: #fff; color: #173b52; font: inherit; font-weight: 800; cursor: pointer; }
.cards-action:hover { background: #f1f8f9; }
.cards-submit { border: 0; background: #087c86; color: #fff; }
.cards-submit:hover { background: #066b74; }
.cards-bottom { display: flex; justify-content: center; align-items: center; gap: 18px; margin-top: 14px; }
.cards-quit { display: block; border: 0; background: none; color: #5d7480; font: inherit; text-decoration: underline; cursor: pointer; }
.cards-other { margin-top: 20px; color: #496373; }
.cards-other a { color: #087c86; font-weight: 700; text-decoration: underline; }

@media (max-width: 640px) {
  .cards-game { padding: 16px 12px; }
  .cards-game .typing-timebar { margin: 8px 0 14px; }
  .cards-palette { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .formula-card { min-height: 52px; font-size: 1.35rem; }
  .cards-question .game-mascot { width: 72px; }
  .cards-name { margin-bottom: 8px; }
}
