  /* Shared styles for every coin-flip game embed (levels 1-4).
     The union of what the per-post <style> blocks used to carry:
     single-coin games use .gamble-actions, multi-coin games use
     .coin-bet/.flip-button/.correlations/.helpers, everything else
     is common. Posts link this file instead of inlining styles. */
  #coin-flip-game {
    border: 2px solid #196019;
    border-radius: 6px;
    overflow: hidden;
    max-width: 34em;
    margin: 1.5em auto;
    padding: 0 1em 1em;
    font-family: "Inconsolata", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", monospace;
    background: rgba(255, 255, 255, 0.85);
  }
  #coin-flip-game h3 {
    background: #196019;
    color: white;
    margin: 0 -1em 1em;
    padding: 0.4em 1em;
    font-size: 1.1em;
  }
  #coin-flip-game .stats { display: flex; justify-content: space-between; font-weight: bold; }
  #coin-flip-game .progress-track {
    background: #d3d7cf;
    height: 12px;
    margin: 0.5em 0;
    border-radius: 6px;
    overflow: hidden;
  }
  #coin-flip-game .progress-fill { background: #30bb30; height: 100%; transition: width 0.3s; }
  #coin-flip-game .balance { font-size: 2.2em; font-weight: bold; text-align: center; margin: 0.3em 0; }
  #coin-flip-game .controls { text-align: center; }
  #coin-flip-game .controls > div { margin: 0.6em 0; }
  #coin-flip-game button {
    touch-action: manipulation;
    font-family: inherit;
    background: #196019;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.25em 0.7em;
    cursor: pointer;
  }
  #coin-flip-game button:hover { background: #259025; }
  #coin-flip-game button:active { transform: scale(0.97); }
  #coin-flip-game .gamble-actions { display: flex; gap: 0.6em; }
  #coin-flip-game .gamble-actions button { flex: 1; padding: 0.6em; font-weight: bold; }
  #coin-flip-game .coin-bet {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1em;
  }
  #coin-flip-game .coin-bet label { font-weight: bold; }
  #coin-flip-game .flip-button { width: 100%; padding: 0.6em; font-weight: bold; }
  #coin-flip-game .tally { font-weight: bold; }
  #coin-flip-game .glasses { font-weight: bold; }
  #coin-flip-game .correlations { font-weight: bold; }
  #coin-flip-game .shop {
    border-top: 1px dashed #196019;
    padding-top: 0.6em;
    display: grid;
    gap: 0.4em;
    text-align: left;
  }
  #coin-flip-game .shop-toggle { width: 100%; text-align: left; font-weight: bold; }
  #coin-flip-game .shop-group-heading { font-weight: bold; }
  #coin-flip-game .helpers { font-weight: bold; }
  #coin-flip-game .helper-bird {
    display: inline-block;
    animation: helper-backflip 0.5s ease-in-out;
  }
  @keyframes helper-backflip {
    from { transform: rotate(0deg); }
    to { transform: rotate(-360deg); }
  }
  #coin-flip-game .helper-pause { font-size: 0.85em; padding: 0.1em 0.5em; }
  #coin-flip-game .shop-item {
    display: flex;
    justify-content: space-between;
    gap: 1em;
    margin-left: 1.2em;
  }
  #coin-flip-game .purchase-dialog {
    position: fixed;
    z-index: 10;
    width: 20em;
    border: 1px solid #196019;
    border-radius: 4px;
    padding: 0.6em;
    text-align: left;
    background: #eafbea;
  }
  #coin-flip-game .dialog-actions { display: flex; gap: 0.6em; margin-bottom: 0.5em; }
  #coin-flip-game input[type="number"] {
    font-family: inherit;
    border: 1px solid #196019;
    border-radius: 4px;
    padding: 0.3em 0.5em;
    width: 7em;
    background: transparent;
    color: inherit;
  }
  #coin-flip-game .log {
    height: 8em;
    overflow-y: auto;
    font-size: 0.85em;
    text-align: left;
    border-top: 1px dashed #196019;
    padding-top: 0.5em;
    margin-top: 0.8em;
  }
  #coin-flip-game .log-divider { border-top: 1px solid #333; margin: 0.25em 0; }
  #coin-flip-game .win-text { color: #1e7d1e; }
  #coin-flip-game .lose-text { color: #b03030; }
  #coin-flip-game .game-over { font-weight: bold; text-align: center; font-size: 1.1em; margin: 0.5em 0; }
  #coin-flip-game .game-over a { color: inherit; text-decoration: underline; }
  @media (prefers-color-scheme: dark) {
    #coin-flip-game { background: rgba(0, 0, 0, 0.85); }
    #coin-flip-game .progress-track { background: #134013; }
    #coin-flip-game .log-divider { border-color: #888; }
    #coin-flip-game .win-text { color: #7dff7d; }
    #coin-flip-game .lose-text { color: #ff6b6b; }
    #coin-flip-game .purchase-dialog { background: #062606; }
  }
