/* WP Coder：CSS 欄位 */
.lp-element-game {
    --lp-bg: #f7fbff;
    --lp-card: #ffffff;
    --lp-text: #1f2937;
    --lp-muted: #64748b;
    --lp-border: #dbeafe;
    --lp-blue: #0ea5e9;
    --lp-blue-dark: #0369a1;
    --lp-green: #16a34a;
    --lp-red: #dc2626;
    --lp-yellow-cell: #fff3a3;
    --lp-cyan-cell: #bff4ff;
    --lp-green-cell: #c9ffc9;
    --lp-radius: 18px;
    color: var(--lp-text);
    background: linear-gradient(135deg, #f7fbff 0%, #eefdf7 100%);
    border: 1px solid var(--lp-border);
    border-radius: var(--lp-radius);
    padding: clamp(16px, 3vw, 28px);
    margin: 24px auto;
    box-shadow: 0 12px 32px rgba(15, 23, 42, .08);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", sans-serif;
  }
  .lp-element-game * { box-sizing: border-box; }
  .lp-element-game .lp-game-hero { text-align: center; max-width: 920px; margin: 0 auto 18px; }
  .lp-element-game .lp-eyebrow { margin: 0 0 6px; color: var(--lp-blue-dark); font-weight: 700; letter-spacing: .08em; }
  .lp-element-game h2 { margin: 0 0 8px; font-size: clamp(1.55rem, 3vw, 2.25rem); line-height: 1.25; }
  .lp-element-game h3 { margin: 20px 0 10px; font-size: 1.2rem; }
  .lp-element-game .lp-lead { margin: 0 auto; color: var(--lp-muted); line-height: 1.8; }
  .lp-element-game .lp-game-panel {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 20px 0;
  }
  .lp-element-game .lp-stat {
    background: var(--lp-card);
    border: 1px solid var(--lp-border);
    border-radius: 14px;
    padding: 12px;
    text-align: center;
  }
  .lp-element-game .lp-stat-label { display: block; color: var(--lp-muted); font-size: .9rem; }
  .lp-element-game .lp-stat-value { display: block; margin-top: 4px; font-size: 1.5rem; font-weight: 800; }
  .lp-element-game .lp-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 10px 0 18px; }
  .lp-element-game button {
    border: 0;
    border-radius: 999px;
    padding: 10px 18px;
    background: var(--lp-blue);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    transition: transform .15s ease, filter .15s ease;
  }
  .lp-element-game button:hover { filter: brightness(.96); transform: translateY(-1px); }
  .lp-element-game button.lp-secondary { background: #475569; }
  .lp-element-game button.lp-danger { background: #ef4444; }
  .lp-element-game button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
  .lp-element-game .lp-message {
    min-height: 28px;
    text-align: center;
    font-weight: 700;
    color: var(--lp-blue-dark);
    margin: 8px 0 12px;
  }
  .lp-element-game .lp-scroll-note { display: none; color: var(--lp-muted); text-align: center; font-size: .92rem; margin: 6px 0; }
  .lp-element-game .lp-table-wrap { overflow-x: auto; padding-bottom: 8px; }
  .lp-element-game .lp-periodic-grid {
    min-width: 980px;
    display: grid;
    grid-template-columns: repeat(18, minmax(46px, 1fr));
    grid-auto-rows: minmax(72px, auto);
    gap: 6px;
  }
  .lp-element-game .lp-element-card {
    position: relative;
    border: 1px solid rgba(15, 23, 42, .16);
    border-radius: 10px;
    padding: 6px;
    background: var(--lp-yellow-cell);
    min-height: 72px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
  }
  .lp-element-game .lp-element-card:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(15, 23, 42, .12); }
  .lp-element-game .lp-element-card.lp-nonmetal { background: var(--lp-cyan-cell); }
  .lp-element-game .lp-element-card.lp-metalloid { background: var(--lp-green-cell); }
  .lp-element-game .lp-element-name { font-weight: 800; line-height: 1; }
  .lp-element-game .lp-element-answer { font-size: .82rem; color: var(--lp-muted); min-height: 1em; }
  .lp-element-game .lp-element-card input {
    width: 42px;
    max-width: 100%;
    text-align: center;
    border: 1px solid rgba(15, 23, 42, .25);
    border-radius: 8px;
    padding: 5px 4px;
    font-weight: 800;
    background: rgba(255,255,255,.88);
  }
  .lp-element-game .lp-element-card input:focus { outline: 2px solid rgba(14, 165, 233, .45); border-color: var(--lp-blue); }
  .lp-element-game .lp-element-card.is-correct { border-color: var(--lp-green); box-shadow: 0 0 0 2px rgba(22, 163, 74, .16) inset; }
  .lp-element-game .lp-element-card.is-wrong { border-color: var(--lp-red); box-shadow: 0 0 0 2px rgba(220, 38, 38, .18) inset; }
  .lp-element-game .lp-element-card.is-empty { border-color: #f59e0b; }
  .lp-element-game .lp-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 16px; margin: 14px 0 4px; color: var(--lp-muted); font-size: .92rem; }
  .lp-element-game .lp-dot { display: inline-block; width: 14px; height: 14px; border-radius: 4px; margin-right: 5px; vertical-align: -2px; border: 1px solid rgba(15,23,42,.18); }
  .lp-element-game .lp-dot-metal { background: var(--lp-yellow-cell); }
  .lp-element-game .lp-dot-metalloid { background: var(--lp-green-cell); }
  .lp-element-game .lp-dot-nonmetal { background: var(--lp-cyan-cell); }
  .lp-element-game details { margin-top: 18px; background: rgba(255,255,255,.65); border: 1px solid var(--lp-border); border-radius: 14px; padding: 12px 14px; }
  .lp-element-game summary { cursor: pointer; font-weight: 800; color: var(--lp-blue-dark); }
  .lp-element-game .lp-answer-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 8px; margin-top: 12px; }
  .lp-element-game .lp-answer-pill { background: #fff; border: 1px solid var(--lp-border); border-radius: 999px; padding: 7px 10px; text-align: center; font-weight: 700; }
  @media (max-width: 780px) {
    .lp-element-game .lp-game-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lp-element-game .lp-scroll-note { display: block; }
  }
