/* Galleries: the game page's media strips, the media page's tabs and
   grids, the lightbox, review strips and the review form's uploads. Takes
   its colours from the site's tokens. */

.gm-media { margin: 34px 0 8px; }
.gm-section { margin: 0 0 22px; }
.gm-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 10px; }
.gm-head h2 { margin: 0; font-size: 1.3rem; }
.gm-all { color: var(--cyan, #29aae1); font-weight: 600; text-decoration: none; white-space: nowrap; font-size: .92rem; }
.gm-all:hover { text-decoration: underline; }
.gm-credit { margin: -10px 0 22px; font-size: .8rem; color: var(--text-faint, #66728c); }
.gm-credit a { color: inherit; }

/* a strip scrolls sideways on narrow screens and wraps into a row of
   cards on wide ones */
.gm-strip { list-style: none; margin: 0; padding: 0 0 6px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr);
  gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; }
.gm-strip > li { scroll-snap-align: start; }
@media (min-width: 900px) {
  .gm-strip { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); overflow: visible; }
  .gm-strip--video { grid-template-columns: repeat(2, 1fr); }
}
.gm-grid { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.gm-grid--video { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

.gm-tile { position: relative; margin: 0; min-width: 0; }
/* the article's list markers and link underlines don't apply to tiles */
.content .gm-tile, .content .gm-up__item { padding-left: 0; margin-bottom: 0; }
.content .gm-tile::before, .content .gm-tile::after, .content .gm-up__item::before, .content .gm-up__item::after { display: none; }
.content .gm-tile a { text-decoration: none; }
.gm-tile figure { margin: 0; }
.gm-still, .gm-tile .gm-play, .gm-tile .gm-frame { display: block; position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: 8px; background: var(--panel-2, #111a30); border: 1px solid var(--line, rgba(76,132,230,.16)); }
.gm-tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s ease; }
.gm-still:hover img, .gm-tile .gm-play:hover img { transform: scale(1.03); }
.gm-still:focus-visible, .gm-play:focus-visible { outline: 2px solid var(--cyan, #29aae1); outline-offset: 2px; }
.gm-tile figcaption { margin: 6px 2px 0; font-size: .85rem; color: var(--text-dim, #9aa6bf); display: flex; flex-direction: column; gap: 2px; }
.gm-cap { color: var(--text-body, #c9d2e4); }
.gm-by a { color: inherit; }
.gm-helpful:empty { display: none; }
.gm-frame { border: 0; }

/* the play mark on a click-to-load player and on an uploaded clip */
.gm-play { padding: 0; cursor: pointer; color: inherit; font: inherit; }
.gm-play__panel { display: grid; place-items: center; width: 100%; height: 100%; font-weight: 700; color: var(--text-dim, #9aa6bf); }
.gm-play__mark { position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 50%;
  background: rgba(4, 6, 13, .72); box-shadow: 0 0 0 2px rgba(255,255,255,.85); pointer-events: none; }
.gm-play__mark::after { content: ""; position: absolute; left: 23px; top: 17px; border-style: solid; border-width: 12px 0 12px 19px;
  border-color: transparent transparent transparent #fff; }
.gm-play:hover .gm-play__mark, .gm-clip:hover .gm-play__mark { background: var(--cyan-hot, #00aeef); }
.gm-dur { position: absolute; right: 6px; bottom: 6px; padding: 1px 6px; border-radius: 4px; font-size: .75rem; background: rgba(0,0,0,.72); color: #fff; }
.gm-dur:empty { display: none; }

/* spoilers stay blurred until revealed */
.gm-spoiler:not(.is-revealed) img { filter: blur(22px) saturate(.6); transform: scale(1.1); }
.gm-spoiler:not(.is-revealed) .gm-play__mark { display: none; }
.gm-spoiler__show { position: absolute; left: 50%; top: 0; transform: translate(-50%, 0); margin-top: calc(28.125% - 16px);
  padding: 6px 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.6); background: rgba(4,6,13,.8); color: #fff; font-weight: 600; cursor: pointer; z-index: 1; }
.gm-review-strip .gm-spoiler__show { margin-top: 18px; padding: 3px 9px; font-size: .75rem; }

.gm-new::before { content: "New"; position: absolute; z-index: 1; top: 6px; left: 6px; padding: 1px 7px; border-radius: 4px; font-size: .72rem; font-weight: 700;
  background: var(--cyan, #29aae1); color: #04060d; }
.gm-acts { display: flex; gap: 8px; margin-top: 2px; }
.gm-act { font: inherit; font-size: .8rem; padding: 2px 10px; border-radius: 999px; cursor: pointer; border: 1px solid var(--line-strong, rgba(41,170,225,.42));
  background: transparent; color: var(--text-body, #c9d2e4); }
.gm-act[aria-pressed="true"] { background: var(--cyan, #29aae1); color: #04060d; border-color: transparent; }
.gm-act--quiet { border-color: transparent; color: var(--text-faint, #66728c); padding-left: 0; }
.gm-report { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.gm-badge { position: absolute; left: 4px; bottom: 4px; padding: 0 5px; border-radius: 3px; font-size: .68rem; background: rgba(0,0,0,.75); color: #ffd27a; }

/* a review's own strip: small thumbnails under its text */
.gm-review-strip { list-style: none; margin: 10px 0 4px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.gm-review-strip > li { width: 132px; }
.gm-review-strip .gm-play__mark { width: 34px; height: 34px; margin: -17px 0 0 -17px; }
.gm-review-strip .gm-play__mark::after { left: 13px; top: 9px; border-width: 8px 0 8px 12px; }

/* the media page */
.gm-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0 18px; border-bottom: 1px solid var(--line, rgba(76,132,230,.16)); }
.gm-tabs a { padding: 9px 14px; border-radius: 8px 8px 0 0; color: var(--text-dim, #9aa6bf); text-decoration: none; font-weight: 600; border: 1px solid transparent; border-bottom: 0; }
.gm-tabs a span { font-weight: 400; color: var(--text-faint, #66728c); margin-left: 4px; }
.gm-tabs a[aria-selected="true"] { color: var(--text, #e9eef8); background: var(--panel, #0c1222); border-color: var(--line, rgba(76,132,230,.16)); }
.gm-panel > h2 { font-size: 1.2rem; margin: 6px 0 12px; }
.gm-empty { color: var(--text-dim, #9aa6bf); }
.gm-more { margin: 4px 0 18px; }

/* the lightbox */
.gm-locked, .gm-locked body { overflow: hidden; }
.gm-lightbox { position: fixed; inset: 0; z-index: 1000; background: rgba(2, 3, 8, .97); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; touch-action: pan-y; }
.gm-lightbox[hidden] { display: none; }
.gm-lightbox__bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px 0 18px; min-height: 58px; }
.gm-lightbox__count { font-family: var(--display, inherit); font-weight: 700; letter-spacing: .12em; color: var(--cyan, #29aae1); font-size: .95rem; }
.gm-lightbox__stage { display: grid; place-items: center; padding: 4px 72px; min-height: 0; }
.gm-lightbox__stage > img, .gm-lightbox__stage > video { max-width: 100%; max-height: calc(100vh - 170px); object-fit: contain; background: #000;
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px); transition: filter .2s ease; }
.gm-lightbox__stage > img.is-loading { filter: blur(2px); }
.gm-lightbox__stage > .gm-play, .gm-lightbox__stage > .gm-frame { position: relative; display: block; width: min(100%, calc((100vh - 170px) * 16 / 9)); aspect-ratio: 16 / 9;
  border: 0; padding: 0; overflow: hidden; background: #000; clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px); }
.gm-lightbox__stage > .gm-play img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gm-lightbox__foot { padding: 10px 16px 18px; text-align: center; }
.gm-lightbox__cap { margin: 0; color: #dfe6f3; font-size: .95rem; }
.gm-lightbox__credit { margin: 2px 0 0; color: var(--text-faint, #66728c); font-size: .78rem; }
.gm-lightbox__credit:empty { display: none; }
.gm-lightbox button.gm-lightbox__nav, .gm-lightbox button.gm-lightbox__close { position: absolute; border: 1px solid var(--line-strong, rgba(41,170,225,.42)); cursor: pointer; color: #fff;
  background: rgba(12, 18, 34, .8); font-size: 2rem; line-height: 1; width: 48px; height: 48px; border-radius: 0;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); }
.gm-lightbox button.gm-lightbox__nav:hover, .gm-lightbox button.gm-lightbox__nav:focus-visible,
.gm-lightbox button.gm-lightbox__close:hover, .gm-lightbox button.gm-lightbox__close:focus-visible { background: var(--cyan, #29aae1); color: #04060d; outline: none; }
.gm-lightbox__close { top: 10px; right: 12px; }
.gm-lightbox__prev { left: 12px; top: 50%; margin-top: -24px; }
.gm-lightbox__next { right: 12px; top: 50%; margin-top: -24px; }
.gm-lightbox__nav[hidden] { display: none; }
@media (max-width: 600px) {
  .gm-lightbox__stage { padding: 4px 6px; }
  .gm-lightbox__stage > img, .gm-lightbox__stage > video { max-height: calc(100vh - 210px); }
  .gm-lightbox__foot { padding: 10px 68px 18px; }
  .gm-lightbox__prev, .gm-lightbox__next { top: auto; bottom: 14px; margin: 0; }
}

/* uploads in the review form */
.gm-up { border: 1px dashed var(--line-strong, rgba(41,170,225,.42)); border-radius: 10px; padding: 12px 14px; margin: 14px 0; }
.gm-up legend { font-weight: 700; padding: 0 6px; }
.gm-up__drop { display: block; text-align: center; padding: 18px 10px; border-radius: 8px; background: var(--panel, #0c1222); cursor: pointer; }
.gm-up__drop.is-over { background: var(--panel-2, #111a30); outline: 2px solid var(--cyan, #29aae1); }
.gm-up__pick { color: var(--cyan, #29aae1); text-decoration: underline; }
.gm-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.gm-up__linkrow { display: flex; gap: 8px; margin: 10px 0; }
.gm-up__link { flex: 1; min-width: 0; }
.gm-up__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.gm-up__item { display: grid; grid-template-columns: 96px 1fr auto; gap: 10px; align-items: start; padding: 8px; border-radius: 8px; background: var(--panel, #0c1222); }
.gm-up__item.is-error { outline: 1px solid #e0605b; }
.gm-up__thumb { width: 96px; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; display: grid; place-items: center; background: var(--panel-2, #111a30); font-size: .8rem; }
.gm-up__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gm-up__body { display: grid; gap: 4px; min-width: 0; }
.gm-up__body progress { width: 100%; height: 6px; }
.gm-up__body input[type="text"] { width: 100%; }
.gm-up__spoiler { font-size: .85rem; }
.gm-up__status:empty { display: none; }
