/* Artwork browsing and explicit revealed-card Binder Guide entrypoints. */
html.official-gallery-open { overflow: hidden; }
.official-gallery-entry { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; }
.official-binder-shortcuts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; flex: none; }
.official-binder-shortcuts .btn { min-width: 0; min-height: 44px; white-space: normal; line-height: 1.35; font-size: 14px; padding: 8px; }
.official-gallery-entry .btn, #panel-guide #setSearchPanel > .official-gallery-launch { min-height: 44px; white-space: normal; line-height: 1.35; }
#panel-guide #setSearchPanel > .official-gallery-launch { flex: none; align-self: stretch; font-size: 14px; }
.official-gallery { width: min(1080px, calc(100vw - 24px)); max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); margin: auto; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-2); color: var(--ink); overflow: auto; overscroll-behavior: contain; }
.official-gallery::backdrop { background: #030812b8; }
.official-gallery, .official-gallery * { box-sizing: border-box; }
.official-gallery [hidden] { display: none !important; }
.official-gallery-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.official-gallery-head > div { min-width: 0; }
.official-gallery-head h2 { margin: 0; font-size: clamp(22px, 3vw, 30px); line-height: 1.2; }
.official-gallery-head p { color: var(--warn); font-size: 13px; line-height: 1.5; margin: 6px 0 0; }
.official-gallery-head > button { flex: none; }
.official-gallery .btn, .official-gallery select { min-height: 44px; font-size: 14px; line-height: 1.35; }
.official-gallery-explainer, .official-gallery-status { font-size: 14px; line-height: 1.4; color: var(--ink-2); margin: 8px 0; }
.official-gallery-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 10px 0; }
.official-gallery-filters label { display: grid; gap: 5px; min-width: 0; font-size: 14px; }
.official-gallery-filters select { width: 100%; min-width: 0; font-size: 16px; padding: 8px 10px; }
.official-gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 145px), 1fr)); align-items: stretch; gap: 12px; }
.official-gallery-card { display: flex; flex-direction: column; gap: 8px; min-width: 0; min-height: 44px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.official-gallery-card:hover { border-color: var(--accent); }
.official-gallery-card img { display: block; width: 100%; height: auto; aspect-ratio: 245 / 342; object-fit: contain; border-radius: 6px; background: var(--bg-3); }
.official-gallery-card > span { display: grid; gap: 3px; min-width: 0; }
.official-gallery-card strong { font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.official-gallery-card small { font-size: 12px; line-height: 1.4; color: var(--ink-2); }
.official-gallery .official-gallery-image-error { color: var(--warn); }
.official-gallery-pagination { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 16px 0 0; font-variant-numeric: tabular-nums; }
.official-gallery-pagination > span { min-width: 48px; text-align: center; }
.official-gallery-detail { display: grid; justify-items: center; gap: 12px; margin-top: 12px; }
.official-gallery-detail > button { justify-self: start; }
.official-gallery-detail h3 { font-size: 17px; text-align: center; }
.official-gallery-detail img { display: block; width: min(100%, 440px); max-height: 68dvh; object-fit: contain; border-radius: 10px; }
.official-gallery-detail p { color: var(--warn); font-size: 14px; text-align: center; }
.official-gallery footer { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 8px; }
.official-gallery footer p { font-size: 12px; line-height: 1.5; color: var(--ink-2); margin: 4px 0; }
.official-gallery footer a { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); font-size: 14px; overflow-wrap: anywhere; }
.official-gallery :is(button, select, a):focus-visible { outline: 3px solid var(--focus, var(--accent)); outline-offset: 2px; }
@media (max-width: 600px) {
  .official-gallery-entry .btn { width: 100%; }
  .official-gallery { width: calc(100vw - 16px); max-width: calc(100vw - 16px); padding: 12px; }
  .official-gallery-filters { gap: 8px; }
  .official-gallery-filters select { padding-inline: 6px; font-size: 16px; }
  .official-gallery-head { gap: 6px; }
  .official-gallery-head h2 { font-size: 21px; }
  .official-gallery-head > .btn { padding-inline: 10px; }
  .official-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .official-gallery-card { padding: 6px; }
  .official-gallery-card strong { font-size: 13px; }
  .official-gallery-card small { font-size: 12px; }
  .official-gallery-head p { font-size: 12px; }
  .official-gallery-pagination { gap: 8px; }
  .official-gallery-pagination > .btn { padding-inline: 12px; }
}
@media print { .official-gallery, .official-gallery-entry, .official-gallery-launch { display: none !important; } }
.official-gallery-track { display:flex; align-items:center; flex-wrap:wrap; gap:6px; margin:0 0 8px; font-size:.85rem; }
.official-gallery-track[hidden] { display:none; }
.official-gallery-track .btn { min-height:44px; padding:6px 10px; }
