/* ==========================================================================
   ★temMobileMirror — 아이템베이 모바일(m.itembay.com) 구성에 맞춘 스타일
   실측 대조: 검색 알약(테두리 3px, radius 35px, 높이 60px) /
             게임 아이콘 5열(라운드 20%) / 배너 786:400 / 안전카드 3개 /
             하단 독 5칸(가운데 검색 강조)
   ========================================================================== */

/* 헤더 — 원 사이트처럼 얇게 */
.m-head { padding: 6px 14px 8px; box-shadow: 0 1px 0 rgba(0,0,0,.04); }
.m-head-top { margin-bottom: 0; }
.m-head-links .m-reg { background: #191919; box-shadow: none; }
.m-head-links .m-reg:active { filter: brightness(1.25); }

.ib-wrap { padding: 0 0 96px; }

/* ---- 1) 검색 알약 -------------------------------------------------------- */
.ib-search {
    display: flex; align-items: center; justify-content: space-between;
    margin: 14px 16px 20px; padding: 0 6px 0 20px;
    height: 56px; box-sizing: border-box;
    border: 3px solid #191919; border-radius: 32px; background: #fff;
}
.ib-search input {
    flex: 1 1 auto; min-width: 0; height: 100%;
    border: 0; outline: none; background: transparent;
    font-size: clamp(12px, 3.6vw, 15px); font-weight: 700; color: #191919;
    font-family: inherit;
}
.ib-search input::placeholder { color: #a8adb8; font-weight: 700; }
.ib-search input::-webkit-search-cancel-button { display: none; }
.ib-search button {
    flex: 0 0 auto; width: 44px; height: 44px; padding: 0;
    border: 0; background: transparent; display: flex;
    align-items: center; justify-content: center;
}
.ib-search button img { width: 40px; height: 40px; display: block; }

/* ---- 2) 섹션 공통 -------------------------------------------------------- */
.ib-sec { padding: 0 16px; margin-bottom: 26px; }
.ib-sec-h {
    display: flex; align-items: center; justify-content: space-between;
    margin: 0 0 12px;
}
.ib-sec-h h3 { margin: 0; font-size: 17px; font-weight: 800; letter-spacing: -.4px; }
.ib-more {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 12px; color: #898a8e; text-decoration: none; font-weight: 600;
}
.ib-more img { width: 5px; height: 10px; }
.ib-total { font-size: 12px; color: var(--tem-sub); }

/* ---- 3) 게임 아이콘 줄 (5열) -------------------------------------------- */
.ib-games {
    list-style: none; margin: 0; padding: 0;
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px 6px;
}
.ib-games li { min-width: 0; }
.ib-games a { display: block; text-decoration: none; text-align: center; }
.ib-games img {
    width: 100%; aspect-ratio: 1 / 1; max-width: 64px;
    border-radius: 18px; object-fit: cover; display: block; margin: 0 auto;
    background: #eef0f4; box-shadow: 0 2px 8px rgba(20,26,48,.10);
}
.ib-games p {
    margin: 6px 0 0; font-size: 11.5px; color: #383d41; font-weight: 600;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ib-games .ib-sk {
    height: 64px; border-radius: 18px; background: #eef0f4;
    animation: ib-pulse 1.2s ease-in-out infinite;
}
@keyframes ib-pulse { 0%,100% { opacity: .55 } 50% { opacity: .95 } }

/* ---- 4) 배너 ------------------------------------------------------------- */
.ib-banner { margin: 0 0 26px; }
.ib-slides {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.ib-slides::-webkit-scrollbar { display: none; }
.ib-slide {
    flex: 0 0 100%; scroll-snap-align: center; display: block;
    padding: 0 16px; box-sizing: border-box;
}
.ib-slide img {
    width: 100%; aspect-ratio: 786 / 400; object-fit: cover;
    border-radius: 12px; display: block; background: #eef0f4;
}
.ib-dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.ib-dots button {
    width: 6px; height: 6px; padding: 0; border: 0; border-radius: 50%;
    background: #d6d9e0; cursor: pointer;
}
.ib-dots button.on { width: 16px; border-radius: 3px; background: #635bca; }

/* ---- 5) 안전 카드 3개 ---------------------------------------------------- */
.ib-help {
    background: #f4f9ff; border-radius: 16px; padding: 18px 16px 14px;
    margin: 0 0 26px; box-sizing: border-box;
}
.ib-help-list {
    list-style: none; margin: 14px 0 0; padding: 0;
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px;
}
.ib-help-list a { display: block; text-align: center; text-decoration: none; }
.ib-help-list img {
    width: 100%; max-width: 64px; aspect-ratio: 1 / 1; object-fit: contain;
}
.ib-help-list p {
    margin: 4px 0 0; font-size: 12px; font-weight: 600; color: #566577;
    display: inline-flex; align-items: center; gap: 2px;
}
.ib-help-list p img { width: 6px; height: 10px; max-width: none; aspect-ratio: auto; }

/* ---- 6) 상품 카드에 게임 아이콘 ------------------------------------------ */
.m-card .m-gi { flex: 0 0 auto; }
.m-card .m-gi img {
    width: 18px; height: 18px; border-radius: 5px; object-fit: cover;
    display: block; background: #eef0f4;
}
.m-card .top { align-items: center; }
.m-card .top .m-tag:first-of-type { margin-left: 2px; }

/* ---- 7) 하단 독 ---------------------------------------------------------- */
.ib-dock {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
    display: grid; grid-template-columns: repeat(5, 1fr);
    align-items: end; height: 62px; padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    background: #fff; border-top: 1px solid #eceef3;
    box-shadow: 0 -4px 16px rgba(20,26,48,.06);
}
.ib-dock a {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; text-decoration: none; color: #8b8f96; min-width: 0;
}
.ib-dock a img { width: 24px; height: 24px; display: block; opacity: .75; }
.ib-dock a.on img { opacity: 1; }
.ib-dock a p {
    margin: 0; font-size: 10.5px; font-weight: 600; letter-spacing: -.2px;
    white-space: nowrap;
}
.ib-dock a.on p { color: #635bca; font-weight: 800; }
.ib-dock-c { position: relative; }
/* 원 사이트의 가운데 버튼은 **육각형 그라데이션 아이콘 자체**가 버튼이다.
   (dock_search.svg 안에 그라데이션 육각형 + 돋보기가 함께 들어 있다)
   → 배경 원을 따로 그리면 두 겹이 된다. */
.ib-dock .ib-dock-cbtn {
    position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%);
    width: 54px; height: 60px;
    display: flex; align-items: center; justify-content: center;
}
.ib-dock .ib-dock-cbtn img {
    width: 51px; height: 58px; opacity: 1;
    filter: drop-shadow(0 4px 10px rgba(99,91,202,.35));
}

/* 독이 본문을 가리지 않게 (footer 도 여백 확보) */
.m-foot { padding-bottom: 84px; }
.m-fab-reg, .m-top { display: none; }

/* 아주 좁은 화면 */
@media (max-width: 344px) {
    .ib-games { gap: 12px 4px; }
    .ib-games p { font-size: 10.5px; }
    .ib-help-list p { font-size: 11px; }
}
