/* ============================================================
   portfolio.css — portfolio.html 作品集
   「Pixel-Quest」游戏像素优化版
   ============================================================ */

/* ============================================================
   HERO
   ============================================================ */

.ph-hero {
  padding-top: var(--sp-4);
  padding-bottom: var(--sp-5);
  position: relative;
}

.ph-hero__main {
  display: grid;
  grid-template-columns: 1.8fr 1fr;
  gap: var(--sp-5);
  align-items: center;
}

@media (max-width: 900px) {
  .ph-hero__main {
    grid-template-columns: 1fr;
    gap: var(--sp-5);
  }
}

.ph-hero__left {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.ph-hero__title {
  font-family: var(--font-cn);
  font-size: clamp(48px, 7vw, 80px);
  font-weight: var(--fw-black);
  line-height: var(--lh-display);
  letter-spacing: var(--ls-display);
  color: var(--ink);
  margin: 0;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--sp-3);
}

.ph-hero__title .en {
  font-family: var(--font-pixel);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: var(--fw-bold);
  color: var(--blue-600);
  letter-spacing: var(--ls-pixel);
  text-transform: uppercase;
  margin-left: 0;
  background: none;
  -webkit-text-fill-color: var(--blue-600);
}

.ph-hero__sub {
  font-family: var(--font-cn);
  font-size: 14px;
  color: var(--ink-soft);
  line-height: var(--lh-reading);
  max-width: 600px;
  margin-top: var(--sp-2);
}

.ph-hero__sub strong { color: var(--ink); }

/* 4 个统计像素方块 */
.ph-hero__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-3);
  margin-top: var(--sp-4);
}

@media (max-width: 640px) {
  .ph-hero__stats { grid-template-columns: repeat(2, 1fr); }
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--sp-2) var(--sp-3);
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--r-sm);
  box-shadow: var(--sh-pixel-1);
}

.stat__num {
  font-family: var(--font-pixel);
  font-weight: var(--fw-bold);
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1;
  color: var(--blue-600);
  letter-spacing: var(--ls-pixel);
}

.stat__num span {
  font-size: 0.55em;
  color: var(--px-red);
  margin-left: 2px;
  vertical-align: super;
}

.stat__label {
  font-family: var(--font-cn);
  font-size: 11px;
  color: var(--ink-mute);
  margin-top: 4px;
}

.ph-hero__right {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
}

.ph-hero__avatar {
  width: 200px;
  max-width: 100%;
  position: relative;
}

.ph-hero__avatar svg {
  width: 100%;
  height: auto;
  display: block;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}

.ph-hero__avatar .hero__photo {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 50%;
  border: 3px solid var(--blue-600);
  box-shadow: var(--sh-pixel-2);
  object-fit: cover;
  aspect-ratio: 1;
}

.ph-hero__avatar::after { content: none !important; }

@media (max-width: 900px) {
  .ph-hero__right { order: -1; }
  .ph-hero__avatar { width: 160px; }
}

.ph-hero__contact {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 8px 14px;
  background: var(--blue-600);
  border: 2px solid var(--ink);
  color: var(--paper);
  font-family: var(--font-pixel);
  font-size: 11px;
  letter-spacing: var(--ls-pixel);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  text-decoration: none;
  border-radius: var(--r-sm);
  box-shadow: var(--sh-pixel-1);
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}

.ph-hero__contact:hover {
  transform: translate(-1px, -1px);
  box-shadow: var(--sh-pixel-2);
  background: var(--blue-700);
  color: var(--paper);
}

/* 隐藏旧 masthead/eyebrow */
.ph-hero__masthead { display: none; }
.ph-hero__eyebrow  { display: none; }

/* ============================================================
   主项目 ─ 左编号 + 标题描述 + 右大图（PLAY 按钮）
   ============================================================ */

.folio-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.folio-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: var(--sp-3);
  align-items: start;
  background: var(--paper);
  border: 2px solid var(--ink);
  padding: var(--sp-3);
  border-radius: var(--r-sm);
  box-shadow: var(--sh-pixel-1);
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}

.folio-item:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--sh-pixel-2);
}

@media (max-width: 900px) {
  .folio-item {
    grid-template-columns: 1fr;
    gap: var(--sp-3);
  }
}

.folio-item__media {
  position: relative;
  display: flex;
  order: 2;
}

.folio-item__media .ph {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-sm);
}

.folio-item__cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: var(--r-sm);
}

.cover-note {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 2;
  padding: 3px 8px;
  font-family: var(--font-cn);
  font-size: 11px;
  color: var(--paper);
  background: rgba(15, 27, 61, 0.78);
  border-radius: var(--r-sm);
  letter-spacing: 0.02em;
  pointer-events: none;
}

@media (max-width: 900px) {
  .folio-item__media { order: -1; }
}

.folio-item__platforms {
  position: absolute;
  bottom: var(--sp-2);
  left: var(--sp-2);
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.folio-plat {
  padding: 3px 8px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-pixel);
  font-size: 10px;
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-pixel);
  border-radius: var(--r-sm);
  border: 1px solid var(--ink);
}

.folio-item__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0;
  order: 1;
  min-width: 0;
}

.folio-item__top {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-1);
  flex-wrap: wrap;
}

/* 像素编号方块 */
.folio-item__num {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 30px;
  background: var(--blue-600);
  color: var(--paper);
  font-family: var(--font-pixel);
  font-size: 13px;
  font-weight: var(--fw-bold);
  letter-spacing: 0.04em;
  border-radius: var(--r-sm);
  box-shadow: 2px 2px 0 0 var(--ink);
  flex-shrink: 0;
}

.folio-item__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.folio-item__title {
  font-family: var(--font-cn);
  font-size: clamp(16px, 2vw, 20px);
  color: var(--ink);
  font-weight: var(--fw-bold);
  line-height: 1.25;
  margin: 0;
}

.folio-item__role {
  font-family: var(--font-en);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: var(--ls-eyebrow);
  color: var(--blue-600);
  font-weight: var(--fw-semibold);
}

.folio-item__desc {
  font-family: var(--font-cn);
  color: var(--ink-soft);
  line-height: var(--lh-reading);
  font-size: 13px;
}

.folio-item__desc strong { color: var(--ink); font-weight: var(--fw-semibold); }

.folio-item__highlights {
  list-style: none;
  padding: var(--sp-2);
  margin: 4px 0;
  background: var(--blue-50);
  border-left: 3px solid var(--blue-600);
  border-radius: var(--r-sm);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.folio-item__highlights li {
  position: relative;
  padding-left: var(--sp-4);
  font-size: 12px;
  color: var(--ink-soft);
  line-height: var(--lh-reading);
  font-family: var(--font-cn);
}

.folio-item__highlights li::before {
  content: "▸";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--blue-600);
  font-weight: var(--fw-bold);
}

.folio-item__highlights strong { color: var(--ink); }

.folio-item .tag-list { gap: 4px; margin-top: var(--sp-1); }
.folio-item .tag { padding: 2px 8px; font-size: 11px; }

/* ============================================================
   超次元合集 ─ 3 列像素卡片
   ============================================================ */

.cyx-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-2);
}

@media (max-width: 900px) { .cyx-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .cyx-grid { grid-template-columns: 1fr; } }

.cyx-card {
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--r-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--sh-pixel-1);
  transition: transform var(--t-fast), box-shadow var(--t-fast);
  position: relative;
}

.cyx-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--sh-pixel-2);
}

.cyx-card .ph {
  border-radius: 0;
  border: 0;
  border-bottom: 2px solid var(--ink);
}

.cyx-card__body {
  padding: var(--sp-3);
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.cyx-card__body h4 {
  font-family: var(--font-cn);
  font-size: 13px;
  font-weight: var(--fw-bold);
  color: var(--ink);
  line-height: 1.3;
  margin: 0;
}

.cyx-card__body p {
  font-family: var(--font-cn);
  font-size: 11.5px;
  color: var(--ink-soft);
  line-height: var(--lh-reading);
  flex: 1;
}

.cyx-card__body strong { color: var(--ink); }

.cyx-card .tag-list { gap: 3px; margin-top: 2px; }
.cyx-card .tag { padding: 1px 6px; font-size: 10px; }

/* ============================================================
   TECH CARD
   ============================================================ */

.tech-card {
  background: var(--paper);
  border: 2px solid var(--ink);
  padding: var(--sp-5);
  border-radius: var(--r-sm);
  box-shadow: var(--sh-pixel-2);
}

@media (max-width: 768px) { .tech-card { padding: var(--sp-4); } }

.tech-card__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-3);
  padding-bottom: var(--sp-4);
  margin-bottom: var(--sp-4);
  border-bottom: 2px solid var(--ink);
  flex-wrap: wrap;
}

.tech-card__head h3 {
  font-family: var(--font-cn);
  font-size: clamp(20px, 2.4vw, 24px);
  margin-top: var(--sp-1);
  color: var(--ink);
  font-weight: var(--fw-bold);
}

.tech-card__head p {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 13px;
  font-family: var(--font-cn);
}

.tech-card__link {
  font-family: var(--font-pixel);
  font-size: 10px;
  letter-spacing: var(--ls-pixel);
  color: var(--blue-600);
  font-weight: var(--fw-bold);
  white-space: nowrap;
  text-decoration: none;
  text-transform: uppercase;
}

.tech-card__link:hover { color: var(--blue-700); text-decoration: underline; }

.tech-card__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-3);
}

@media (max-width: 768px) { .tech-card__grid { grid-template-columns: 1fr; } }

.tech-feat {
  background: var(--blue-50);
  border: 2px solid var(--blue-600);
  border-radius: var(--r-sm);
  padding: var(--sp-3);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform var(--t-fast);
}

.tech-feat:hover { transform: translate(-1px, -1px); }

.tech-feat__num {
  font-family: var(--font-pixel);
  font-size: 22px;
  font-weight: var(--fw-bold);
  color: var(--blue-600);
  letter-spacing: var(--ls-pixel);
  line-height: 1;
}

.tech-feat h4 {
  font-family: var(--font-cn);
  font-size: 14px;
  font-weight: var(--fw-bold);
  color: var(--ink);
  margin-top: 4px;
}

.tech-feat p {
  font-family: var(--font-cn);
  font-size: 11.5px;
  color: var(--ink-soft);
  line-height: var(--lh-reading);
}

/* ============================================================
   SHADER GRID
   ============================================================ */

.shader-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-3);
}

@media (max-width: 1024px) { .shader-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .shader-grid { grid-template-columns: 1fr; } }

.shader-card { display: flex; flex-direction: column; gap: 4px; }
.shader-card .ph { border-radius: var(--r-sm); }

.shader-card__label {
  font-family: var(--font-cn);
  font-size: 11px;
  color: var(--ink-soft);
  text-align: center;
  padding-top: 2px;
}

.ph--more {
  background: var(--bg);
  color: var(--ink-mute);
  border-style: dashed;
  border-color: var(--rule);
  font-family: var(--font-pixel);
  font-size: 32px;
  letter-spacing: 6px;
  line-height: 1;
}

.ph--more::before,
.ph--more::after { content: none !important; }

/* ============================================================
   COMMISSION
   ============================================================ */

.commission-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding: 0;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--r-sm);
  overflow: hidden;
  box-shadow: var(--sh-pixel-1);
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}

.commission-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--sh-pixel-2);
}

.commission-card .ph {
  border-radius: 0;
  border: 0;
  border-bottom: 2px solid var(--ink);
}

.commission-card h4 {
  padding: var(--sp-3) var(--sp-3) 0;
  font-family: var(--font-cn);
  font-size: 14px;
  font-weight: var(--fw-bold);
  color: var(--ink);
  line-height: 1.3;
}

.commission-card__role {
  padding: 0 var(--sp-3);
  font-family: var(--font-en);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: var(--ls-eyebrow);
  color: var(--blue-600);
  font-weight: var(--fw-semibold);
}

.commission-card p:not(.commission-card__role) {
  padding: 0 var(--sp-3);
  font-family: var(--font-cn);
  font-size: 12px;
  color: var(--ink-soft);
  line-height: var(--lh-reading);
  flex: 1;
}

.commission-card p strong { color: var(--ink); }

.commission-card .tag-list { padding: 0 var(--sp-3) var(--sp-3); gap: 3px; margin-top: 4px; }
.commission-card .tag { padding: 1px 6px; font-size: 10.5px; }

/* ============================================================
   CONTACT ─ 复用 resume 风格
   ============================================================ */

.contact {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: var(--sp-6);
  align-items: start;
  padding: var(--sp-5);
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--r-sm);
  box-shadow: var(--sh-pixel-2);
}

@media (max-width: 768px) {
  .contact {
    grid-template-columns: 1fr;
    padding: var(--sp-4);
    gap: var(--sp-4);
  }
}

.contact__title {
  font-family: var(--font-cn);
  font-size: 18px;
  color: var(--ink);
  margin-bottom: var(--sp-3);
  font-weight: var(--fw-bold);
}

.contact__rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contact__row {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
}

.contact__icon {
  width: 28px;
  height: 28px;
  border-radius: var(--r-sm);
  background: var(--blue-600);
  color: var(--paper);
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
}

.contact__icon svg { width: 14px; height: 14px; }

.contact__label {
  width: 56px;
  color: var(--ink-mute);
  font-size: 11.5px;
  flex-shrink: 0;
  font-family: var(--font-cn);
}

.contact__value {
  color: var(--ink);
  font-size: 14px;
  font-weight: var(--fw-medium);
}

a.contact__value { text-decoration: none; }
a.contact__value:hover { color: var(--blue-600); text-decoration: underline; }

.contact__qr { display: flex; justify-content: center; }

/* OS 卡片 */
.os-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--r-sm);
  padding: var(--sp-4);
  box-shadow: var(--sh-pixel-1);
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}

.os-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--sh-pixel-2);
}

.os-card__head {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding-bottom: var(--sp-3);
  border-bottom: 2px dashed var(--rule);
}

.os-card__icon {
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  background: var(--blue-600);
  color: var(--paper);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 2px solid var(--ink);
}

.os-card__icon svg { width: 18px; height: 18px; }

.os-card__name {
  font-family: var(--font-cn);
  font-size: 17px;
  color: var(--ink);
  margin-bottom: 2px;
  font-weight: var(--fw-bold);
}

.os-card__desc {
  font-family: var(--font-cn);
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: var(--lh-reading);
}

.os-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-top: auto;
  padding-top: var(--sp-3);
  border-top: 2px dashed var(--rule);
}

.os-card__stats {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: right;
}

.os-card .ph-qr { width: 72px; height: 72px; }

/* ============================================================
   VIDEO MODAL ─ 视频弹窗
   ============================================================ */

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
}

.video-modal[hidden] {
  display: none;
}

.video-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 27, 61, 0.78);
  backdrop-filter: blur(2px);
  cursor: pointer;
}

.video-modal__panel {
  position: relative;
  width: min(100%, 1080px);
  max-height: 90vh;
  background: var(--ink);
  border: 2px solid var(--ink);
  border-radius: var(--r-md);
  box-shadow: var(--sh-pixel-2);
  overflow: hidden;
}

.video-modal__close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-pixel);
  font-size: 16px;
  color: var(--paper);
  background: rgba(15, 27, 61, 0.85);
  border: 2px solid var(--paper);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: transform var(--t-fast), background var(--t-fast);
}

.video-modal__close:hover {
  transform: translate(-1px, -1px);
  background: var(--blue-600);
}

.video-modal__video {
  display: block;
  width: 100%;
  max-height: 90vh;
  background: #000;
}

/* ============================================================
   GALLERY MODAL ─ 照片墙弹窗 + 大图浏览
   ============================================================ */

.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
}

.gallery-modal[hidden] {
  display: none;
}

.gallery-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 27, 61, 0.82);
  backdrop-filter: blur(2px);
  cursor: pointer;
}

.gallery-modal__panel {
  position: relative;
  width: min(100%, 1200px);
  max-height: 90vh;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--r-md);
  box-shadow: var(--sh-pixel-2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.gallery-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--ink);
  color: var(--paper);
}

.gallery-modal__title {
  font-family: var(--font-pixel);
  font-size: 16px;
  letter-spacing: var(--ls-wide);
  margin: 0;
  color: var(--paper);
}

.gallery-modal__close {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-pixel);
  font-size: 14px;
  color: var(--paper);
  background: transparent;
  border: 2px solid var(--paper);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background var(--t-fast), transform var(--t-fast);
}

.gallery-modal__close:hover {
  background: var(--blue-600);
  transform: translate(-1px, -1px);
}

.gallery-modal__grid {
  flex: 1;
  overflow-y: auto;
  padding: var(--sp-4);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--sp-3);
}

.gallery-modal__thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: var(--r-sm);
  background: var(--bg);
  cursor: pointer;
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}

.gallery-modal__thumb:hover {
  transform: translate(-1px, -1px);
  box-shadow: var(--sh-pixel-1);
}

.gallery-modal__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ─── 大图浏览层 ─── */

.gallery-lightbox {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-lightbox[hidden] {
  display: none;
}

.gallery-lightbox__img {
  max-width: 92%;
  max-height: 86%;
  object-fit: contain;
  display: block;
}

.gallery-lightbox__back {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 3;
  padding: 6px 12px;
  font-family: var(--font-pixel);
  font-size: 13px;
  color: var(--paper);
  background: rgba(15, 27, 61, 0.85);
  border: 2px solid var(--paper);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background var(--t-fast), transform var(--t-fast);
}

.gallery-lightbox__back:hover {
  background: var(--blue-600);
  transform: translate(-1px, -1px);
}

.gallery-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 44px;
  height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: bold;
  color: var(--paper);
  background: rgba(15, 27, 61, 0.7);
  border: 2px solid var(--paper);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background var(--t-fast);
}

.gallery-lightbox__nav:hover {
  background: var(--blue-600);
}

.gallery-lightbox__prev { left: 16px; }
.gallery-lightbox__next { right: 16px; }

.gallery-lightbox__counter {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  padding: 4px 10px;
  font-family: var(--font-pixel);
  font-size: 12px;
  color: var(--paper);
  background: rgba(15, 27, 61, 0.7);
  border-radius: var(--r-sm);
}

@media (max-width: 600px) {
  .gallery-modal__grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: var(--sp-2);
    padding: var(--sp-3);
  }
  .gallery-lightbox__nav { width: 36px; height: 52px; font-size: 22px; }
}
