/* 가독성·버튼 인식 개선 — 기존 catalog.css / experience.css / group-3d.css 뒤에 불러옵니다. */

/* 1. 흐린 보조 글자 밝게 */
:root { --muted: #c6c9d2; }
.card-alias, .card-platform, .media-label, .breadcrumb, .catalog-info,
.catalog-heading p, .detail-caption, .detail-meta dt, .advisory-area p,
.footer-inner p, .intro-copy, .eyebrow { color: #c6c9d2; }
.game-genre, .detail-about p { color: #e4e6ec; }
.header-inner nav a { opacity: .8; }

/* 2. 자료 보기 = 누를 수 있는 꽉 찬 버튼 */
.card-actions { flex-direction: column; align-items: stretch; gap: 10px; }
.card-actions .button-secondary,
.dialog-actions .button-secondary {
  background: #f5f5f2;
  border-color: #f5f5f2;
  color: #0c0d10;
  font-weight: 800;
  gap: 8px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
  transition: background .2s, transform .2s, box-shadow .2s;
}
.card-actions .button-secondary::after,
.dialog-actions .button-secondary::after {
  content: "→";
  font-weight: 800;
  transition: transform .2s;
}
.card-actions .button-secondary:hover,
.dialog-actions .button-secondary:hover {
  background: #fff !important;
  border-color: #fff;
  color: #0c0d10;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .45);
}
.card-actions .button-secondary:hover::after,
.dialog-actions .button-secondary:hover::after { transform: translateX(3px); }

/* 3. 자문 폼 준비 중 = 버튼이 아니라 상태 표시 */
.button-pending {
  min-height: 0;
  padding: 6px 2px;
  border: 0;
  background: transparent !important;
  color: #a9adb8;
  font-size: .8125rem;
  font-weight: 600;
  justify-content: flex-start;
  gap: 8px;
  cursor: not-allowed;
}
.button-pending::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e0b354;
  flex-shrink: 0;
}
.card-actions .button-pending { padding-left: 4px; padding-right: 4px; }
.advisory-area .button-pending { width: auto; padding: 4px 0; }

/* 4. 나머지 테두리 버튼도 또렷하게 */
.button { border-color: #ffffff80; }
.button:hover:not(:disabled) { border-color: #fff; background: #ffffff1a; }

/* 5. 게임 카드 제목 링크임을 드러냄 */
.card-body h2 a { border-bottom: 1px solid transparent; transition: border-color .2s; }
.card-body h2 a:hover { text-decoration: none; border-bottom-color: #fff; }

@media (max-width: 600px) {
  .card-actions .button { flex: none; }
  .dialog-actions .button-secondary { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .card-actions .button-secondary:hover,
  .dialog-actions .button-secondary:hover { transform: none; }
}

/* 6. 첫 화면 — 참여 게임 한눈에 보기 */
.overview { padding-top: 56px; padding-bottom: 64px; border-top: 1px solid #ffffff2e; }
.ov-head { display: flex; justify-content: space-between; align-items: end; gap: 32px; margin-bottom: 36px; }
.ov-head h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 750; letter-spacing: -.04em; margin: 8px 0 10px; }
.ov-head p:not(.eyebrow) { margin: 0; color: #e4e6ec; font-size: 1rem; }
.ov-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; max-width: 520px; }
.ov-legend li { font-size: .8125rem; font-weight: 700; padding: 6px 12px; border-radius: 999px; border: 1px solid #ffffff40; color: #fff; }
.ov-group + .ov-group { margin-top: 44px; }
.ov-group-title { font-size: 1.25rem; font-weight: 800; margin: 0 0 6px; display: flex; gap: 12px; align-items: baseline; }
.ov-group-title span { font-size: .875rem; font-weight: 600; color: #c6c9d2; }
.ov-list { list-style: none; margin: 0; padding: 0; }
.ov-row { display: grid; grid-template-columns: 200px minmax(200px, 280px) minmax(0, 1fr); gap: 24px; align-items: start; padding: 20px 0; border-bottom: 1px solid #ffffff1f; }
.ov-thumb { position: relative; display: block; aspect-ratio: 16/9; border-radius: 10px; overflow: hidden; background: #111217; border: 1px solid #ffffff26; transition: border-color .2s, transform .3s; }
.ov-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ov-thumb:hover { border-color: #fff; transform: translateY(-2px); }
.ov-no { position: absolute; left: 8px; top: 8px; font-size: .6875rem; font-weight: 800; padding: 3px 7px; border-radius: 5px; background: rgba(8,9,12,.85); color: #fff; }
.ov-info h3 { font-size: 1.125rem; font-weight: 750; line-height: 1.4; margin: 0 0 4px; letter-spacing: -.02em; }
.ov-info h3 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.ov-alias { font-size: .8125rem; color: #c6c9d2; margin: 0 0 8px; }
.ov-genre { font-size: .9375rem; color: #fff; margin: 0 0 2px; line-height: 1.6; }
.ov-platform { font-size: .8125rem; color: #c6c9d2; margin: 0; }
.ov-asks-label { font-size: .75rem; font-weight: 800; letter-spacing: .08em; color: #c6c9d2; margin: 0 0 10px; }
.ask-empty { display: flex; align-items: center; gap: 8px; margin: 0; font-size: .875rem; color: #a9adb8; }
.ask-empty .dot { width: 8px; height: 8px; border-radius: 50%; background: #e0b354; flex-shrink: 0; }
.ask-list { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.ask-item { padding: 12px 14px; border-radius: 10px; background: #15161b; border: 1px solid #ffffff1f; }
.ask-item dt { font-size: .8125rem; font-weight: 800; color: #9fb6ff; margin-bottom: 6px; }
.ask-item dd { margin: 0; }
.ask-item ul { margin: 0; padding-left: 16px; }
.ask-item li { font-size: .9375rem; line-height: 1.6; color: #fff; }
@media (max-width: 900px) {
  .ov-head { display: block; }
  .ov-legend { justify-content: flex-start; margin-top: 18px; }
  .ov-row { grid-template-columns: 160px minmax(0, 1fr); }
  .ov-asks { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .ov-row { grid-template-columns: 120px minmax(0, 1fr); gap: 14px; }
  .ov-info h3 { font-size: 1rem; }
}

/* 7. 참여 게임 목록 — 스크롤 등장·호버 애니메이션 (ov-motion일 때만 숨겼다가 등장) */
:root { --ov-ease: cubic-bezier(.16, 1, .3, 1); }

/* 제목: 마스크 안에서 위로 올라오기 */
.ov-mask { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; }
.ov-mask > span { display: inline-block; }
.ov-motion .ov-head:not(.is-in) .ov-mask > span { transform: translateY(105%); }
.ov-motion .ov-head:not(.is-in) .eyebrow,
.ov-motion .ov-head:not(.is-in) .ov-desc { opacity: 0; transform: translateY(14px); }
.ov-motion .ov-head:not(.is-in) .ov-legend li { opacity: 0; transform: translateY(10px) scale(.92); }
.ov-head .eyebrow, .ov-head .ov-desc, .ov-head .ov-mask > span, .ov-legend li {
  transition: transform .9s var(--ov-ease), opacity .7s ease, background .25s, border-color .25s, color .25s; }
.ov-head .ov-mask > span { transition-delay: .08s; }
.ov-head .ov-desc { transition-delay: .25s; }
.ov-legend li { transition-delay: calc(.35s + var(--i, 0) * 70ms); cursor: default; }
.ov-legend li:hover { background: #fff; color: #0c0d10; border-color: #fff; }

/* 그룹 제목: 밑줄이 왼쪽에서 그려짐 */
.ov-group-title { position: relative; padding-bottom: 12px; }
.ov-group-title::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, #fff, #ffffff20 60%, transparent);
  transform-origin: left; transition: transform 1.1s var(--ov-ease) var(--stagger, 0ms); }
.ov-motion .ov-group-title:not(.is-in)::after { transform: scaleX(0); }
.ov-motion .ov-group-title:not(.is-in) { opacity: 0; transform: translateX(-16px); }
.ov-group-title { transition: opacity .6s ease var(--stagger, 0ms), transform .8s var(--ov-ease) var(--stagger, 0ms); }

/* 게임 한 줄: 썸네일이 커튼처럼 열리고, 글과 질문이 순서대로 */
.ov-row { position: relative; border-bottom: 0; }
.ov-row::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: #ffffff24; transform-origin: left;
  transition: transform 1s var(--ov-ease) calc(var(--stagger, 0ms) + 200ms); }
.ov-thumb { transition: opacity .35s ease var(--stagger, 0ms), border-color .2s, transform .45s var(--ov-ease); }
/* 커튼: clip-path(매 프레임 다시 그림) 대신 덮개를 transform으로 걷어냄 → GPU에서만 처리 */
.ov-thumb::after { content: ""; position: absolute; inset: 0; z-index: 3; background: #0c0d10; transform-origin: right center; transform: scaleX(0);
  transition: transform 1s var(--ov-ease) var(--stagger, 0ms); pointer-events: none; }
.ov-thumb img { transition: transform 1.4s var(--ov-ease) var(--stagger, 0ms); }
.ov-info > *, .ov-asks { transition: opacity .7s ease, transform .9s var(--ov-ease); }
.ov-info > :nth-child(1) { transition-delay: calc(var(--stagger, 0ms) + 120ms); }
.ov-info > :nth-child(2) { transition-delay: calc(var(--stagger, 0ms) + 180ms); }
.ov-info > :nth-child(3) { transition-delay: calc(var(--stagger, 0ms) + 240ms); }
.ov-info > :nth-child(4) { transition-delay: calc(var(--stagger, 0ms) + 300ms); }
.ov-asks { transition-delay: calc(var(--stagger, 0ms) + 360ms); }
.ov-motion .ov-row:not(.is-in) .ov-thumb { opacity: 0; }
.ov-motion .ov-row:not(.is-in) .ov-thumb::after { transform: scaleX(1); }
/* 등장 전·등장 중인 줄만 레이어로 올려 두고, 다 나온 뒤에는 해제 */
.ov-motion .ov-row:not(.is-done) .ov-thumb::after,
.ov-motion .ov-row:not(.is-done) .ov-thumb img,
.ov-motion .ov-row:not(.is-done) .ov-info > *,
.ov-motion .ov-row:not(.is-done) .ov-asks { will-change: transform, opacity; }
.ov-motion .ov-row:not(.is-in) .ov-thumb img { transform: scale(1.25); }
.ov-motion .ov-row:not(.is-in) .ov-info > *,
.ov-motion .ov-row:not(.is-in) .ov-asks { opacity: 0; transform: translateY(18px); }
.ov-motion .ov-row:not(.is-in)::after { transform: scaleX(0); }

/* 질문 카드가 채워지면 하나씩 떠오름 */
.ask-item { transition: opacity .6s ease, transform .8s var(--ov-ease), border-color .25s, background .25s; }
.ask-item:nth-child(2) { transition-delay: 80ms; } .ask-item:nth-child(3) { transition-delay: 160ms; }
.ask-item:nth-child(4) { transition-delay: 240ms; } .ask-item:nth-child(5) { transition-delay: 320ms; } .ask-item:nth-child(6) { transition-delay: 400ms; }
.ov-motion .ov-row:not(.is-in) .ask-item { opacity: 0; transform: translateY(12px); }
.ov-row.is-in .ask-item { transition-delay: calc(var(--stagger, 0ms) + 420ms + var(--k, 0ms)); }
.ask-item:hover { border-color: #9fb6ff80; background: #1a1c24; }

/* 수합 중 점: 숨 쉬듯 깜빡임 */
.ask-empty .dot { animation: ov-breathe 2.4s ease-in-out infinite; }
@keyframes ov-breathe { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* 호버: 줄 전체가 살짝 밝아지고 썸네일이 떠오름 */
.ov-row::before { content: ""; position: absolute; inset: 0 -16px; border-radius: 14px; background: linear-gradient(90deg, #ffffff0d, #ffffff05 60%, transparent);
  opacity: 0; transition: opacity .35s; pointer-events: none; }
.ov-arrow { display: inline-block; margin-left: 8px; opacity: 0; transform: translateX(-8px); transition: opacity .3s, transform .4s var(--ov-ease); }
.ov-view { position: absolute; right: 8px; bottom: 8px; font-size: .75rem; font-weight: 800; padding: 5px 10px; border-radius: 999px; background: #fff; color: #0c0d10;
  opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .4s var(--ov-ease); }
@media (hover: hover) and (pointer: fine) {
  .ov-row:hover::before { opacity: 1; }
  .ov-row:hover .ov-thumb { transform: translateY(-4px); border-color: #ffffff90; }
  .ov-row:hover .ov-thumb img { transform: scale(1.07); }
  .ov-row:hover .ov-view { opacity: 1; transform: none; }
  .ov-row:hover .ov-arrow { opacity: 1; transform: none; }
  .ov-info h3 a:hover { text-decoration: none; }
}
.ov-thumb:focus-visible .ov-view { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .ask-empty .dot { animation: none; }
  .ov-thumb, .ov-thumb::after, .ov-thumb img, .ov-info > *, .ov-asks, .ask-item, .ov-row::after, .ov-group-title, .ov-group-title::after,
  .ov-head .eyebrow, .ov-head .ov-desc, .ov-head .ov-mask > span, .ov-legend li { transition: none !important; }
}

/* 성능: 헤더는 불투명(뒤 내용과 섞어 그리지 않음) */
.site-header { background: #0c0d10 !important; }
