/* ===== 카드 갤러리 ===== */
body.gal-lock { overflow: hidden; }
.gal-modal { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.78); display: flex; align-items: center; justify-content: center; padding: 12px; }
.gal-modal.hidden, .gal-detail.hidden { display: none; }
.gal-panel { width: 100%; max-width: 760px; max-height: 100%; display: flex; flex-direction: column; background: linear-gradient(#1c1414, #0d0a0a); border: 1px solid rgba(245,201,106,.45); border-radius: 18px; padding: 14px; box-shadow: 0 0 30px rgba(220,38,38,.25); color: #fde68a; }
.gal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.gal-title { font-size: 1.15rem; font-weight: 800; }
.gal-progress { font-size: .8rem; color: #fcd34d; opacity: .85; margin-top: 2px; }
.gal-x { width: 32px; height: 32px; border-radius: 9999px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2); color: #fff; flex-shrink: 0; }
.gal-bar { height: 6px; border-radius: 9999px; background: rgba(255,255,255,.1); margin: 8px 0; overflow: hidden; }
#gal-bar-fill { height: 100%; background: linear-gradient(90deg, #f59e0b, #fde047); transition: width .4s; }
.gal-filters { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.gal-f { flex-shrink: 0; font-size: .75rem; padding: 4px 10px; border-radius: 9999px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.18); color: #e4e4e7; white-space: nowrap; }
.gal-f.on { background: #f59e0b; color: #111; border-color: #fde047; font-weight: 700; }
.gal-msg { font-size: .8rem; color: #fca5a5; min-height: 0; }
.gal-msg:not(:empty) { margin: 2px 0 8px; }
.gal-login { margin-left: 6px; padding: 2px 10px; border-radius: 9999px; background: #f59e0b; color: #111; font-weight: 700; }
.gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; overflow-y: auto; padding: 2px; }
@media (min-width: 768px) { .gal-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); } }
.gal-card { position: relative; aspect-ratio: 3/4; border-radius: 10px; overflow: hidden; background: #18181b; border: 2px solid var(--gc, #52525b); padding: 0; }
.gal-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gal-card.locked { background: repeating-linear-gradient(45deg, #111, #111 6px, #18181b 6px, #18181b 12px); border-color: #3f3f46; display: flex; align-items: center; justify-content: center; }
.gal-q { font-size: 1.8rem; font-weight: 900; color: rgba(255,255,255,.22); }
.gal-name { position: absolute; left: 0; right: 0; bottom: 0; font-size: .68rem; padding: 10px 2px 3px; text-align: center; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.85)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gal-rar { position: absolute; top: 3px; left: 3px; font-size: .6rem; font-weight: 800; padding: 0 4px; border-radius: 4px; background: var(--gc, #52525b); color: #111; }
.gal-rar.inline { position: static; font-size: .75rem; }
.gal-crown { position: absolute; top: 2px; right: 2px; font-size: .9rem; line-height: 0; filter: drop-shadow(0 0 3px #000); }
.gal-crown .ui-ic { width: 16px; height: 16px; vertical-align: top; }   /* 썸네일 왕관: 얼굴을 가리지 않게 모서리에 작게 */
.gal-crown.big { font-size: 1.6rem; top: 4px; right: 6px; }
.gal-crown.big .ui-ic { width: 30px; height: 30px; }
.gal-card.mvp, .gal-dbox.mvp .gal-dimg { border-color: #fbbf24 !important; box-shadow: 0 0 0 1px #fde047, 0 0 12px rgba(251,191,36,.7); }
.rar-N { --gc: #9ca3af; } .rar-R { --gc: #84cc16; } .rar-HR { --gc: #3b82f6; } .rar-SR { --gc: #a855f7; } .rar-UR { --gc: #eab308; } .rar-MR { --gc: #ef4444; }
.gal-f.rar-N, .gal-f.rar-R, .gal-f.rar-HR, .gal-f.rar-SR, .gal-f.rar-UR, .gal-f.rar-MR { border-color: var(--gc); }
.gal-f.on[class*="rar-"] { background: var(--gc); color: #111; }
.gal-detail { position: fixed; inset: 0; z-index: 75; background: rgba(0,0,0,.7); display: flex; align-items: center; justify-content: center; padding: 16px; }
.gal-dbox { position: relative; width: 100%; max-width: 300px; background: #141010; border: 1px solid rgba(245,201,106,.45); border-radius: 18px; padding: 14px; text-align: center; color: #fde68a; }
.gal-dx { position: absolute; top: 8px; right: 8px; z-index: 2; }
.gal-dimg { position: relative; width: 72%; margin: 0 auto; aspect-ratio: 3/4; border-radius: 12px; overflow: hidden; border: 3px solid var(--gc); }
.gal-dimg img { width: 100%; height: 100%; object-fit: cover; }
.gal-dname { font-size: 1.2rem; font-weight: 800; margin-top: 8px; color: #fff; }
.gal-drar { font-size: .85rem; margin-top: 2px; color: #e4e4e7; }
.gal-rows { text-align: left; margin-top: 10px; font-size: .85rem; background: rgba(0,0,0,.35); border-radius: 12px; padding: 4px 12px; }
.gal-row { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,.08); color: #a1a1aa; }
.gal-row:last-child { border-bottom: 0; } .gal-row b { color: #fafafa; }
/* 종료 화면 */
.gal-end { margin-bottom: 12px; }
.gal-hint { font-size: .8rem; color: #fcd34d; background: rgba(0,0,0,.35); border: 1px dashed rgba(252,211,77,.4); border-radius: 12px; padding: 8px; }
.gal-end-title { font-size: .85rem; font-weight: 700; color: #fde68a; margin-bottom: 6px; }
.gal-new-txt { color: #fde047; }
.gal-end-row { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.gal-end-card { position: relative; width: 58px; aspect-ratio: 3/4; border-radius: 8px; overflow: hidden; border: 2px solid var(--gc); background: #18181b; }
.gal-end-card img { width: 100%; height: 100%; object-fit: cover; }
.gal-end-name { position: absolute; bottom: 0; left: 0; right: 0; font-size: .55rem; color: #fff; background: rgba(0,0,0,.75); white-space: nowrap; overflow: hidden; }
.gal-new { position: absolute; top: 2px; left: 50%; transform: translateX(-50%); font-size: .55rem; font-weight: 900; color: #111; background: #fde047; border-radius: 4px; padding: 0 3px; animation: galPop .9s ease-in-out infinite alternate; }
.gal-cnt { position: absolute; top: 2px; right: 2px; font-size: .55rem; color: #fff; background: rgba(0,0,0,.7); border-radius: 4px; padding: 0 3px; }
@keyframes galPop { from { transform: translateX(-50%) scale(1); } to { transform: translateX(-50%) scale(1.15); } }
.gal-head, .gal-bar, .gal-filters, .gal-msg { flex-shrink: 0; }
.gal-grid { flex: 1 1 auto; min-height: 0; align-content: start; grid-auto-rows: max-content; }
.gal-card { height: auto; min-height: 0; }
/* ===== VIP 왕관 등급 ===== */
.vip-blue { --vc: #3b82f6; } .vip-purple { --vc: #a855f7; } .vip-yellow { --vc: #facc15; } .vip-red { --vc: #ef4444; }
.gal-crown i { font-style: normal; font-size: .5em; position: absolute; right: -2px; bottom: -2px; }
.gal-crown { filter: drop-shadow(0 0 4px var(--vc, #000)); }
.gal-card.vip, .gal-dbox.vip .gal-dimg { border-color: var(--vc) !important; box-shadow: 0 0 0 1px var(--vc), 0 0 12px var(--vc); }
.gal-card.vip-red, .gal-dbox.vip-red .gal-dimg, .gal-end-card .vip-red { animation: vipShimmer 1.6s ease-in-out infinite; }
.gal-dbox.vip-red { border-color: #ef4444; animation: vipShimmer 1.6s ease-in-out infinite; }
@keyframes vipShimmer { 0%,100% { box-shadow: 0 0 0 1px #ef4444, 0 0 8px #ef4444; } 50% { box-shadow: 0 0 0 2px #fca5a5, 0 0 22px #f87171, 0 0 34px rgba(250,204,21,.45); } }
.gal-dbox.deco-gold .gal-dimg { outline: 3px solid #fbbf24; outline-offset: 2px; }
.gal-dbox.deco-bg { background: radial-gradient(circle at 50% 20%, rgba(250,204,21,.25), transparent 60%), linear-gradient(160deg, #2a1240, #141010 55%, #3a1010); }
.gal-tname { color: var(--vc); font-weight: 700; }
.gal-dbox { max-height: calc(100vh - 32px); overflow-y: auto; }
.gal-zbtn { position: absolute; bottom: 6px; right: 6px; width: 34px; height: 34px; border-radius: 9999px; background: rgba(0,0,0,.6); border: 1px solid rgba(255,255,255,.35); font-size: 1rem; }
.gal-dimg img { cursor: zoom-in; }
.gal-vip { margin-top: 10px; text-align: left; background: rgba(0,0,0,.35); border-radius: 12px; padding: 8px 10px; }
.gal-vip-h { font-size: .85rem; font-weight: 800; display: flex; justify-content: space-between; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.gal-vip-h span { font-weight: 500; font-size: .72rem; color: #a1a1aa; }
.gal-sk { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 10px; background: rgba(255,255,255,.04); margin-bottom: 6px; }
.gal-sk.locked { opacity: .75; border: 1px dashed rgba(255,255,255,.18); }
.gal-sk-lock { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; background: #0a0a0a; border-radius: 8px; flex-shrink: 0; }
.gal-sk-img { width: 44px; height: 44px; padding: 0; border-radius: 8px; overflow: hidden; flex-shrink: 0; border: 1px solid rgba(255,255,255,.25); }
.gal-sk-img img { width: 100%; height: 100%; object-fit: cover; }
.gal-sk-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: .8rem; }
.gal-sk-txt b { color: #fafafa; } .gal-sk-txt span { font-size: .7rem; color: #a1a1aa; }
.gal-voice { flex-shrink: 0; font-size: .72rem; padding: 4px 8px; border-radius: 9999px; background: #f59e0b; color: #111; font-weight: 700; }
.gal-perk { font-size: .75rem; color: #71717a; padding: 3px 4px; } .gal-perk.on { color: #fde68a; }
.gal-zoom { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.92); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px; }
.gal-zoom.hidden { display: none; }
.gal-zimg { max-width: 100%; max-height: calc(100vh - 110px); object-fit: contain; border-radius: 12px; }
.gal-zx { position: absolute; top: 12px; right: 12px; }
.gal-zcap { margin-top: 10px; color: #fff; text-align: center; font-size: .9rem; } .gal-zcap div { font-size: .75rem; color: #a1a1aa; }
.gal-end-card .gal-crown { top: 0; right: 1px; font-size: .75rem; }
.gal-promo { margin-top: 8px; font-size: .85rem; font-weight: 800; color: var(--vc); background: rgba(0,0,0,.4); border: 1px solid var(--vc); border-radius: 12px; padding: 6px 10px; }
.gal-power{color:#fbbf24;font-weight:900}
.gal-share{position:absolute;top:12px;left:12px;z-index:3;padding:6px 12px;border-radius:999px;background:rgba(15,23,42,.85);border:1px solid rgba(255,255,255,.25);color:#fff;font-weight:800;font-size:13px}
.gal-share:disabled{opacity:.7}
.gal-kakao{top:50px;background:#fee500;color:#191919;border-color:#fee500}

/* 도감 수집률 구간 보상 */
.gal-miles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 0 0 8px; flex-shrink: 0; }
.gal-mile { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: 8px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); color: #e4e4e7; font-size: 10px; line-height: 1.25; cursor: pointer; }
.gal-mile b { font-size: 12px; color: #fde68a; }
.gal-mile span { color: #fcd34d; text-align: center; }
.gal-mile i { font-style: normal; font-weight: 800; color: #a1a1aa; }
.gal-mile.ready { border-color: #fbbf24; box-shadow: 0 0 8px rgba(251,191,36,.45); }
.gal-mile.ready i { color: #fbbf24; }
.gal-mile.got { opacity: .55; cursor: default; }
.gal-mile:disabled { cursor: default; }
@media (max-width: 420px) {
  .gal-mile span { font-size: 9px; }
}
