/* The embed has a content-based height so resizing its host never creates a loop. */
html { background: var(--paper); }
.embed-page { margin: 0; min-width: 280px; }
.embed-header { max-width: 1152px; margin: auto; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.embed-brand { font: 750 17px/1.1 var(--display); color: var(--ink); }
.embed-brand span { display: block; font-size: 14px; }
.embed-modes { margin-left: auto; display: flex; gap: 4px; }
.embed-modes button { min-height: 36px; padding: 6px 12px; font-size: 14px; border-radius: 4px; color: #54684b; }
.embed-modes button.active { background: #e7eddd; color: var(--ink); }
.embed-page #sound-toggle { display: inline-flex; width: 32px; height: 36px; }
.embed-shell { max-width: 1152px; margin: auto; padding: 8px 16px 0; }
.embed-page .game-card { height: auto; min-height: 0; }
.embed-page .game-body { min-height: 335px; }
.embed-page .field-container { display: block; height: 240px; min-height: 0; flex: none; }
.embed-page .field-container > svg { width: 100%; height: 100%; min-height: 0; }
.embed-page .game-links { flex-wrap: wrap; gap: 0 12px; }
.embed-page .game-links > div { flex-wrap: wrap; gap: 0 14px; }
.embed-footer { max-width: 1152px; margin: auto; padding: 10px 16px 14px; display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 12px; color: #5b6b51; }
.embed-footer > a { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.embed-footer small { flex-basis: 100%; font-size: 11px; }
.embed-footer small a { text-decoration: underline; }
.embed-continue { display: inline-flex; margin-top: 12px; padding: 12px 18px; }
.embed-page dialog .close-dialog { font-size: 25px; }
.continue-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.continue-actions button { padding: 11px 16px; min-height: 44px; border: 1px solid #c8d1bd; border-radius: 5px; font-size: 15px; }
.continue-actions .primary { background: var(--accent); color: white; border-color: var(--accent); }
@media (max-width: 760px) {
  .embed-header { padding: 10px 12px; gap: 6px; }
  .embed-shell { padding: 5px 10px 0; }
  .embed-page .game-body { min-height: 0; }
  .embed-page .field-container { display: block; height: 125px; }
  .embed-page .scoreboard { min-height: 62px; }
  .embed-page .game-links { padding-top: 2px; }
  .embed-page .game-links > span { line-height: 24px; }
  .embed-page .game-links button { min-height: 30px; }
  .embed-footer { padding: 7px 12px 12px; gap: 6px 14px; font-size: 11px; }
  .embed-footer > span { display: none; }
}
@media (max-width: 340px) { .embed-brand { font-size: 15px; } .embed-modes button { padding-inline: 7px; font-size: 13px; } }
