/* Banners page (banners/index.php). Moved out of the page 2026-11-07 and extended. */
.bn-top { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.bn-top p { margin: 0; max-width: 680px; color: var(--muted); }
.bn-intro { margin: -4px 0 16px; color: var(--muted); max-width: 760px; }
.bn-card { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.bn-card .asset-img { min-height: 300px; }
.bn-card .asset-img img { max-width: 100%; max-height: 460px; height: auto; width: auto; }
.bn-card textarea { min-height: 118px; margin: 12px 0; font-size: 16px; }
.bn-card label { font-weight: 700; display: block; margin-bottom: 6px; }
.bn-meta { margin: 8px 0 0; color: var(--muted); font-size: 16px; }
.bn-sizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; margin-top: 16px; }
.bn-sizes button { display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 6px; padding: 10px 8px;
  background: #fff; border: 1px solid #d7e3ee; border-radius: 10px; cursor: pointer; font: inherit; font-size: 16px; color: inherit; min-height: 112px; }
.bn-sizes button:hover, .bn-sizes button[aria-pressed="true"] { border-color: var(--blue, #1e97d8); box-shadow: 0 0 0 2px rgba(30,151,216,.25); }
.bn-sizes .tb { height: 70px; display: grid; place-items: center; }
.bn-sizes img { max-height: 70px; max-width: 100%; width: auto; height: auto; }
.bn-sizes b { font-size: 16px; }
.soc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.soc-grid .asset-img { min-height: 0; padding: 12px; }
.soc-grid .asset-img img { max-height: 300px; max-width: 100%; height: auto; width: auto; }
.soc-grid .b p { margin: 0; color: var(--muted); font-size: 16px; }
@media (max-width: 960px) { .bn-card { grid-template-columns: 1fr; } .bn-card .asset-img { min-height: 0; } }
@media (max-width: 760px) { .soc-grid { grid-template-columns: 1fr; } .bn-sizes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Code boxes: wrap anywhere so long links never cut off mid-word; banners.js sizes them to their content. */
.bn-code, .bn-card textarea.bn-code, .asset textarea.bn-code { min-height: 0; resize: none; overflow: hidden;
  word-break: break-all; overflow-wrap: anywhere; font-size: 16px; line-height: 1.55; background: var(--tint, #eef6fd); }
.bn-sizes .tb { width: 100%; }
.bn-sizes img { display: block; margin: 0 auto; }
/* Social cards: the picture sits at its true shape on a soft frame, never stretched or cropped. */
.soc-grid .asset-img { height: 300px; min-height: 0; padding: 14px; }
.soc-grid .asset-img img { max-height: 272px; max-width: 100%; height: auto; width: auto;
  box-shadow: 0 6px 18px rgba(6, 36, 84, .14); border-radius: 4px; }
@media (max-width: 760px) { .soc-grid .asset-img { height: auto; } .soc-grid .asset-img img { max-height: 360px; } }
#classic .asset-img img { max-width: 100%; height: auto; }

/* Round 5 (judge round 2, items 3-6). */
/* 3: the four set buttons sit in one even row on desktop, a 2 x 2 grid of equal buttons on phones. */
@media (min-width: 961px) { .bn-card { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.bn-card .actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.bn-card .actions .btn-mini { justify-content: center; min-width: 0; padding: 9px 8px; gap: 6px; }
.bn-meta span { color: inherit; }
/* 6: ten sizes as two even rows of five. */
@media (min-width: 761px) { .bn-sizes { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
/* 5: social previews sit on a plain soft panel (no checkerboard); wide 1200 x 628 pictures fill their panel edge to edge. */
.soc-grid .asset-img { background: var(--tint, #eef6fd); }
.soc-grid.soc-wide .asset-img { height: auto; padding: 0; border-radius: 16px 16px 0 0; overflow: hidden; }
.soc-grid.soc-wide .asset-img img { display: block; width: 100%; max-width: none; max-height: none; height: auto;
  box-shadow: none; border-radius: 0; }
/* 4: the classic set sits quietly at the end: smaller, on a plain panel, same buttons as the sets above. */
#classic { margin-top: 56px; padding-top: 36px; border-top: 1px solid var(--line, #dbe7f3); }
#classic .group-h { font-size: 22px; color: var(--muted, #5d6b7e); }
#classic .group-h .ico { opacity: .7; }
.bn-classic { grid-template-columns: 260px 1fr; background: #fbfdff; box-shadow: none; }
.bn-classic .asset-img { min-height: 0; background: var(--tint, #eef6fd); padding: 14px; }
.bn-classic .asset-img img { max-height: 220px; width: auto; border-radius: 4px; }
.bn-classic h3 { font-size: 19px; color: var(--ink, #1b2a3d); }
.bn-classic textarea.bn-code { margin: 12px 0; }
.bn-classic .actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; max-width: 460px; }
.bn-classic .actions .btn-mini { justify-content: center; min-width: 0; }
@media (max-width: 760px) {
  .bn-card .actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bn-card .actions .btn-mini { padding: 10px 8px; }
  .bn-classic { grid-template-columns: 1fr; }
  .bn-classic .asset-img img { max-height: 200px; }
  .bn-classic .actions { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: none; }
  .bn-classic .actions .btn-mini:first-child { grid-column: 1 / -1; }
}

/* Round 6 (judge round 3, items 4, 5, 12). */
/* 4: every preview panel is a plain soft tint, no checkerboard. */
.asset-img, .bn-card .asset-img, .bn-classic .asset-img, .soc-grid .asset-img { background: #eef4fb; }
/* 5: social cards in two columns on phones, smaller and still readable. */
@media (max-width: 760px) {
  .soc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .soc-grid .asset-img { height: 190px; padding: 8px; }
  .soc-grid .asset-img img { max-height: 174px; }
  .soc-grid.soc-wide .asset-img { height: auto; padding: 0; }
  .soc-grid .b { padding: 12px; }
  .soc-grid .b h3 { font-size: 17px; margin: 0 0 6px; }
  .soc-grid .b p { font-size: 16px; line-height: 1.45; margin-bottom: 10px; }
  .soc-grid .actions { display: grid; grid-template-columns: 1fr; gap: 8px; }
  .soc-grid .actions .btn-mini { justify-content: center; min-height: 44px; }
}
