/* Full 2:3 cards; all actions remain semantic game buttons. */
.board-card-panel[hidden], .board-card-actual[hidden] { display:none!important; }
.board-card-panel { min-width:0; margin:0 0 18px; text-align:left; }
.board-card-panel figure { margin:0; }
.board-card-image { display:block; width:100%; height:auto; aspect-ratio:2/3; object-fit:contain; border-radius:16px; }
.board-card-caption { margin:8px 0; color:var(--gold-bright,#f3d790); font-weight:800; font-size:1rem; }
.board-card-note { margin:10px 0; font-size:.95rem; line-height:1.7; color:#e4d8cc; }
.board-card-enlarge { width:100%; min-height:44px; border:1px solid #ae8c4e; border-radius:10px; background:#292016; color:#fff0bd; padding:10px; font:inherit; cursor:pointer; }
.board-card-rules { margin:10px 0; font-size:.95rem; line-height:1.7; }
.board-card-rules ul { padding-left:22px; }
.board-card-actual { padding:14px; margin:14px 0; border:1px solid #45865e; border-radius:12px; background:#163328; color:#f2fff6; font-size:.98rem; line-height:1.8; text-align:left; }
#event-dialog.has-board-card { width:min(920px,calc(100vw - 24px)); max-width:none; max-height:calc(100dvh - 24px); overflow:auto; overscroll-behavior:contain; }
#event-dialog.has-board-card .dialog-card { max-width:none; max-height:none; overflow:visible; display:grid; grid-template-columns:minmax(0,360px) minmax(0,1fr); grid-template-rows:auto auto auto auto auto 1fr; gap:0 26px; padding:24px; }
#event-dialog.has-board-card .board-card-panel { grid-column:1; grid-row:1 / span 6; }
#event-dialog.has-board-card .dialog-card > :not(.board-card-panel) { grid-column:2; min-width:0; }
#event-dialog.has-board-card #dialog-accent, #event-dialog.has-board-card #dialog-origin { display:none; }
#event-dialog.has-board-card #dialog-type { grid-row:1; }
#event-dialog.has-board-card #dialog-title { grid-row:2; }
#event-dialog.has-board-card #dialog-copy { grid-row:3; }
#event-dialog.has-board-card #dialog-impact { grid-row:4; }
#event-dialog.has-board-card #board-card-actual { grid-row:5; }
#event-dialog.has-board-card #dialog-actions { grid-row:6; align-self:end; position:sticky; bottom:0; background:#1a1017; padding:12px 0; z-index:1; }
#event-dialog.has-board-card .dialog-card .board-card-note { margin:10px 0; font-size:.95rem; line-height:1.7; color:#e4d8cc; }
#event-dialog.has-board-card .dialog-card .board-card-actual { margin:14px 0; color:#f2fff6; font-size:.98rem; line-height:1.8; }
#event-dialog.has-board-card .choice-button { min-height:48px; }
#event-dialog.has-board-card .choice-button small { font-size:.84rem; line-height:1.65; }
.board-card-viewer { width:min(1060px,calc(100vw - 16px)); max-width:none; max-height:calc(100dvh - 16px); padding:0; overflow:auto; border:1px solid #b39451; border-radius:14px; background:#0e1410; color:#fff0bd; overscroll-behavior:contain; }
.board-card-viewer::backdrop { background:rgba(0,0,0,.88); }
.board-card-viewer-head { position:sticky; top:0; display:flex; justify-content:space-between; align-items:center; gap:10px; padding:12px; background:#121b16; z-index:1; }
.board-card-viewer-head button { min-width:70px; min-height:44px; font:inherit; color:#fff0bd; background:#302614; border:1px solid #b39451; border-radius:8px; }
.board-card-viewer-image { display:block; width:100%; height:auto; object-fit:contain; }
@media(max-width:700px) {
  #event-dialog.has-board-card .dialog-card { display:block; padding:14px; }
  #event-dialog.has-board-card .board-card-image { max-width:410px; margin:auto; }
  #event-dialog.has-board-card #dialog-actions { padding:10px 0 calc(10px + env(safe-area-inset-bottom)); }
}

/* Economy v2: show only the art/name (top ~56%) of the v1 card image; the old
   rule box baked into the lower part is replaced by live HTML rules. */
.board-card-art { position:relative; width:100%; aspect-ratio:1024 / 860; overflow:hidden; border-radius:16px 16px 0 0; }
.board-card-art .board-card-image { position:absolute; inset:0; width:100%; height:100%; aspect-ratio:auto; object-fit:cover; object-position:50% 0; border-radius:0; }
.board-card-live { margin:0; padding:14px 16px 16px; border:2px solid #c9a24f; border-top-width:1px; border-radius:0 0 16px 16px; background:linear-gradient(180deg,#0f2a1f 0%,#0a1f17 100%); box-shadow:inset 0 0 0 1px rgba(243,215,144,.18); color:#f3ead2; }
.board-card-live ul { margin:0; padding-left:20px; font-size:.92rem; line-height:1.6; }
.board-card-live li::marker { color:#e6bd69; }
.board-card-owner { margin:0 0 8px; padding:4px 10px; display:inline-block; border-radius:999px; background:rgba(230,189,105,.16); color:#f3d790; font-weight:800; font-size:.85rem; }
.board-card-owner[hidden] { display:none; }
#event-dialog.has-board-card .board-card-art { max-width:410px; margin:auto; }
#event-dialog.has-board-card .board-card-live { max-width:410px; margin:0 auto; box-sizing:border-box; }

/* Phones: on a result, show the outcome (title, impact chips, actual result) above the
   card art so it is on screen next to the continue button, not below the fold. */
@media(max-width:700px) {
  #event-dialog.has-board-card:has(#dialog-impact:not(:empty)) .dialog-card { display:flex; flex-direction:column; }
  #event-dialog.has-board-card:has(#dialog-impact:not(:empty)) #dialog-type { order:1; }
  #event-dialog.has-board-card:has(#dialog-impact:not(:empty)) #dialog-title { order:2; margin-bottom:4px; }
  #event-dialog.has-board-card:has(#dialog-impact:not(:empty)) #dialog-impact { order:3; margin:8px 0 4px; }
  #event-dialog.has-board-card:has(#dialog-impact:not(:empty)) #dialog-impact .impact-chip { font-size:1rem; padding:7px 12px; }
  #event-dialog.has-board-card:has(#dialog-impact:not(:empty)) #board-card-actual { order:4; margin:8px 0; }
  #event-dialog.has-board-card:has(#dialog-impact:not(:empty)) #dialog-copy { order:5; }
  #event-dialog.has-board-card:has(#dialog-impact:not(:empty)) .board-card-panel { order:6; margin-top:10px; }
  #event-dialog.has-board-card:has(#dialog-impact:not(:empty)) #dialog-actions { order:7; }
}
