/* =============================================
   딱새샵 가챠 - 메인 스타일시트
   ============================================= */

@import url('shop-detail-content.css');

:root {
    --primary: #6c5ce7;
    --primary-dark: #5a4bd1;
    --secondary: #00cec9;
    --accent: #fd79a8;
    --success: #00b894;
    --warning: #fdcb6e;
    --danger: #d63031;
    --dark: #252b30;
    /* 보조 텍스트: 이전(#636e72)보다 진하게 가독성 우선 */
    --gray: #4a545c;
    --gray-soft: #5d6a73;
    --light: #f5f6fa;
    --white: #ffffff;
    --border: #e4e7ef;
    --surface: #ffffff;
    --shadow: 0 2px 15px rgba(30, 40, 60, 0.07);
    --shadow-lg: 0 12px 40px rgba(30, 40, 60, 0.1);
    --radius: 12px;
    --radius-sm: 8px;
    /* 쇼핑몰 상단: 보라 단일 계열만 (청록 믹스 없음) */
    --header-shop: linear-gradient(168deg, #7366e0 0%, #5c4ed4 42%, #4f41c4 100%);
    --header-admin: #3d4654;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--light);
    color: var(--dark);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

main.container { flex: 1 0 auto; width: 100%; }

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ─── 헤더 ───────────────────────────────── */

.site-header {
    background: var(--header-shop);
    color: var(--white);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(45, 35, 100, 0.18);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

/* 쇼핑몰과 구분되는 관리자 헤더 */
.site-header--admin {
    background: var(--header-admin);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--white);
    letter-spacing: -0.5px;
}

.site-logo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 10px;
    flex-shrink: 0;
    /* 밝은/흰색 로고가 헤더 배경에 묻히지 않도록 어두운 받침 */
    background: rgba(15, 20, 40, 0.55);
    box-shadow:
        0 1px 4px rgba(0, 0, 0, 0.25),
        inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.site-logo-text {
    line-height: 1.2;
}

.site-nav {
    display: flex;
    gap: 8px;
}

.site-nav a {
    color: rgba(255, 255, 255, 0.93);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.site-nav a:hover,
.site-nav a.active {
    color: var(--white);
    background: rgba(255,255,255,0.15);
}

/* ─── 컨테이너 ────────────────────────────── */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: clamp(20px, 2.5vw, 32px) clamp(16px, 3vw, 24px);
}

.page-title {
    font-size: clamp(1.45rem, 2.5vw, 1.85rem);
    font-weight: 800;
    margin-bottom: 24px;
    letter-spacing: -0.5px;
    color: var(--dark);
}

/* ─── 카드 ────────────────────────────────── */

.card {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.2s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(108, 92, 231, 0.12);
}

.card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #e8eaef;
}

.card-body {
    padding: 20px;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

/* ─── 박스 그리드 ─────────────────────────── */

.box-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

/* ─── 박스 상세 ─────────────────────────────── */

.box-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-bottom: 32px;
}

.box-info {
    background: var(--white);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
}

.box-price {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
}

.box-remaining {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 8px;
}

.box-remaining.has-items { background: #dfe6fd; color: var(--primary); }
.box-remaining.empty { background: #ffeaa7; color: #e17055; }

/* 일반상품 카드·상세: 가챠 박스와 동일 톤의 구매 가능 / 준비중 / 품절 스트립 */
.product-avail-strip {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 10px 12px;
    border-radius: 8px;
    margin-top: 8px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.product-avail-strip--buy {
    background: #dfe6fd;
    color: var(--primary);
}

.product-avail-strip__buy {
    font-weight: 800;
    font-size: 1.05rem;
    line-height: 1.3;
}

.product-avail-strip__nums {
    color: var(--primary);
    font-weight: 800;
}

.product-avail-strip--preparing {
    background: #ede7f6;
    color: #5b4b9a;
    border: 1px solid rgba(108, 92, 231, 0.28);
}

.product-avail-strip--soldout {
    background: #ffeaa7;
    color: #e17055;
}

.product-avail-strip__title {
    font-weight: 800;
    font-size: 1.05rem;
    line-height: 1.25;
}

.product-avail-strip__sub {
    font-size: 0.82rem;
    font-weight: 600;
    opacity: 0.92;
    line-height: 1.35;
}

/* ─── 아이템 그리드 (박스 내부) ─────────────── */

.items-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.item-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px;
    text-align: center;
    position: relative;
    transition: all 0.3s;
}

.item-card.drawn {
    opacity: 0.4;
    filter: grayscale(1);
}

.item-card.drawn::after {
    content: '품절';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    background: var(--danger);
    color: var(--white);
    padding: 6px 20px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.9rem;
}

.item-img {
    width: 100%;
    height: 120px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    background: var(--light);
}

.item-name {
    font-weight: 600;
    font-size: 0.9rem;
}

/* 가챠 당첨 결과: 카드는 박스 상세(item-card)와 동일, 배치는 항상 가운데 묶음 정렬(1개·여러 개 공통) */
.items-grid.gacha-draw-results {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 16px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.items-grid.gacha-draw-results .item-card {
    flex: 0 1 240px;
    width: 100%;
    max-width: 280px;
    min-width: 0;
}

/* 결제 완료(뽑기 결과) 화면: 결과 이미지 더 크게 */
.items-grid.gacha-draw-results:not(.gacha-draw-results--mypage) .item-card {
    flex-basis: 300px;
    max-width: 360px;
}

.items-grid.gacha-draw-results:not(.gacha-draw-results--mypage) .item-img {
    height: 180px;
    margin-bottom: 12px;
}

/* 마이페이지 주문 카드: 한 줄 설명·금액과 정렬이 맞도록 당첨 카드만 왼쪽부터 */
.items-grid.gacha-draw-results.gacha-draw-results--mypage {
    justify-content: flex-start;
    margin-left: 0;
    margin-right: 0;
    max-width: none;
}

/* 마이페이지 당첨 상품: 뿌듯함·시선 고정용 패널 */
.order-ship-row--gacha-win {
    background: transparent !important;
    padding-top: 6px !important;
    padding-bottom: 10px !important;
}

.gacha-win-panel {
    padding: 14px 14px 16px;
    border-radius: 14px;
    background: linear-gradient(152deg, rgba(108, 92, 231, 0.11) 0%, rgba(162, 155, 254, 0.08) 45%, rgba(253, 121, 168, 0.07) 100%);
    border: 1px solid rgba(108, 92, 231, 0.18);
    box-shadow: 0 6px 24px rgba(80, 65, 180, 0.08);
}

.gacha-win-panel__head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.gacha-win-panel__badge {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: linear-gradient(145deg, #7c6fe6 0%, #5c4ed4 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(92, 78, 212, 0.35);
}

.gacha-win-panel__badge i,
.gacha-win-panel__badge svg {
    width: 22px;
    height: 22px;
}

.gacha-win-panel__title {
    font-size: 0.98rem;
    font-weight: 900;
    color: var(--dark);
    letter-spacing: -0.02em;
}

.gacha-win-panel__meta {
    margin: 3px 0 0;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--gray);
    line-height: 1.35;
}

.gacha-win-panel__grid {
    margin-top: 0 !important;
}

.gacha-draw-results--mypage .gacha-win-card,
.order-detail-gacha-win .gacha-draw-results .gacha-win-card {
    position: relative;
    padding: 14px 12px 14px !important;
    border-radius: 12px !important;
    border: 1px solid rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 4px 18px rgba(108, 92, 231, 0.12);
    background: var(--white);
    overflow: hidden;
}

.gacha-win-card__n {
    position: absolute;
    top: 8px;
    right: 8px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 900;
    line-height: 22px;
    text-align: center;
    color: #5c4ed4;
    background: rgba(108, 92, 231, 0.12);
    z-index: 1;
}

.gacha-draw-results--mypage .gacha-win-card .item-img,
.order-detail-gacha-win .gacha-draw-results .gacha-win-card .item-img {
    height: 128px;
    margin-bottom: 10px;
}

.gacha-draw-results--mypage .gacha-win-card .item-name,
.order-detail-gacha-win .gacha-draw-results .gacha-win-card .item-name {
    font-weight: 800;
    font-size: 0.88rem;
    color: var(--primary-dark);
}

.gacha-draw-results .item-name {
    word-break: keep-all;
    overflow-wrap: anywhere;
    line-height: 1.4;
}


/* ─── 버튼 ────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 28px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}
.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(90, 75, 200, 0.28);
    color: var(--white);
}

.btn-accent {
    background: #e84393;
    color: var(--white);
}
.btn-accent:hover {
    background: #d6306e;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(232, 67, 147, 0.28);
    color: var(--white);
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}
.btn-outline:hover { background: var(--primary); color: var(--white); }

.btn-sm { padding: 6px 14px; font-size: 0.85rem; }
.btn-xs { padding: 4px 10px; font-size: 0.78rem; font-weight: 700; border-radius: 7px; }
.btn-lg { padding: 16px 40px; font-size: 1.15rem; }
.btn-block { width: 100%; }

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* ─── 뽑기 버튼 (특별) ────────────────────── */

.draw-btn {
    width: 100%;
    padding: 20px;
    font-size: 1.3rem;
    margin-top: 20px;
    border-radius: var(--radius);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(253,121,168,0.5); }
    50% { box-shadow: 0 0 0 15px rgba(253,121,168,0); }
}

.draw-btn:disabled { animation: none; }

/* ─── 모달 (뽑기 결과) ────────────────────── */

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active { display: flex; }

.modal {
    background: var(--white);
    border-radius: var(--radius);
    padding: 40px;
    text-align: center;
    max-width: 420px;
    width: 90%;
    animation: modalIn 0.4s ease-out;
}

@keyframes modalIn {
    from { transform: scale(0.8) translateY(30px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

.modal h2 {
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.modal .result-img {
    width: 180px;
    height: 180px;
    object-fit: contain;
    border-radius: var(--radius);
    margin: 16px auto;
    background: var(--light);
}

.modal .result-name {
    font-size: 1.3rem;
    font-weight: 800;
    margin: 12px 0;
}

/* 주문 상세 모달 (마이페이지) */
.modal.modal--order-detail {
    width: min(920px, 92vw);
    max-width: 920px;
    padding: 0;
    text-align: left;
    max-height: min(86vh, 760px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.order-detail-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    background: #fafbfd;
}

.order-detail-modal__title {
    font-size: 0.98rem;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.order-detail-modal__close {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.95);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
}

.order-detail-modal__close:hover {
    color: var(--primary);
    border-color: rgba(108, 92, 231, 0.22);
}

.order-detail-modal__close svg {
    width: 18px;
    height: 18px;
}

.order-detail-modal__body {
    padding: 14px;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1 1 auto;
    min-height: 0;
}

.modal--order-detail .order-detail-modal__body {
    overflow-wrap: anywhere;
    word-break: keep-all;
}

.modal--order-detail .order-detail-modal__body .order-detail-two-col {
    grid-template-columns: 1fr 1fr;
}

@media (max-width: 720px) {
    .modal--order-detail .order-detail-modal__body .order-detail-two-col {
        grid-template-columns: 1fr !important;
    }
}

/* ─── 바텀시트 (마이페이지 주문 상세) ─────────── */
.bottom-sheet-overlay {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: none;
    align-items: flex-end;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    padding: 10px;
}

.bottom-sheet-overlay.is-open {
    display: flex;
}

.bottom-sheet {
    width: min(920px, 100%);
    max-height: min(86vh, 760px);
    background: var(--surface);
    border-radius: 18px 18px 12px 12px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 18px 60px rgba(30, 40, 60, 0.22);
    transform: translateY(18px);
    opacity: 0;
    transition: transform 0.18s ease, opacity 0.18s ease;
    overflow: hidden;
}

.bottom-sheet-overlay.is-open .bottom-sheet {
    transform: translateY(0);
    opacity: 1;
}

.bottom-sheet__handle {
    width: 44px;
    height: 5px;
    border-radius: 999px;
    background: rgba(45, 52, 54, 0.18);
    margin: 10px auto 6px;
}

.bottom-sheet__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 10px 14px 12px;
    border-bottom: 1px solid var(--border);
    background: #fafbfd;
}

.bottom-sheet__title {
    font-size: 0.95rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    color: var(--dark);
}

.bottom-sheet__close {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.95);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
}

.bottom-sheet__close:hover {
    color: var(--primary);
    border-color: rgba(108, 92, 231, 0.22);
}

.bottom-sheet__close svg {
    width: 18px;
    height: 18px;
}

.bottom-sheet__body {
    padding: 12px;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

/* 바텀시트 열릴 때 배경 스크롤 방지 */
html.is-bottom-sheet-open,
body.is-bottom-sheet-open {
    overflow: hidden;
}

.bottom-sheet__body .order-sheet-root.card {
    box-shadow: none;
    border: none;
}

@media (max-width: 520px) {
    .bottom-sheet-overlay {
        padding: 8px;
    }
    .bottom-sheet {
        border-radius: 16px 16px 12px 12px;
        max-height: 88vh;
    }
    .bottom-sheet__body {
        padding: 10px;
    }
}

/* ─── 알림 ────────────────────────────────── */

.alert {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-weight: 500;
}

.alert-success { background: #c8f7dc; color: #00695c; }
.alert-danger { background: #fddede; color: #c62828; }
.alert-info { background: #dfe6fd; color: #283593; }

/* ─── 폼 ──────────────────────────────────── */

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: var(--surface);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.12);
}

textarea.form-control { resize: vertical; min-height: 80px; }

select.form-control { cursor: pointer; }

/* ─── 테이블 ──────────────────────────────── */

.table-wrap {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    overflow: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

th {
    background: var(--light);
    font-weight: 700;
    font-size: 0.86rem;
    color: #3d454c;
    text-transform: uppercase;
    letter-spacing: 0.35px;
}

.table-row--warn {
    background: #fff5f5;
}

/* ─── 배지 ────────────────────────────────── */

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge-active { background: #c8f7dc; color: var(--success); }
.badge-soldout { background: #ffeaa7; color: #e17055; }
.badge-hidden { background: #f0f0f0; color: var(--gray); }
.badge-preparing { background: #e8e0ff; color: #6c5ce7; }

/* ─── 푸터 ────────────────────────────────── */

.site-footer {
    flex-shrink: 0;
    text-align: center;
    padding: 36px 20px 28px;
    margin-top: auto;
    color: var(--gray);
    font-size: 0.88rem;
    background: var(--light);
    border-top: 1px solid var(--border);
}

/* ─── 반응형 ──────────────────────────────── */

@media (max-width: 768px) {
    .box-detail { grid-template-columns: 1fr; }
    .items-grid { grid-template-columns: repeat(2, 1fr); }
    .header-inner { flex-direction: column; height: auto; padding: 12px 20px; gap: 8px; }
    .site-nav { flex-wrap: wrap; justify-content: center; }
    .site-nav a { padding: 6px 10px; font-size: 0.82rem; }

    .order-header-inner { flex-direction: column; gap: 8px; align-items: flex-start !important; }
}

@media (max-width: 480px) {
    .items-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .container { padding: 16px 12px; }
}

/* ─── 레이아웃·유틸 (페이지 일관성) ─────────── */

.layout-narrow {
    max-width: 420px;
    margin: 0 auto;
}

.layout-narrow--wide {
    max-width: 440px;
}

.layout-narrow--center {
    text-align: center;
}

.layout-inquiry {
    max-width: 720px;
}

.layout-profile {
    max-width: 640px;
}

.page-title--center {
    text-align: center;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-muted { color: var(--gray); }
.text-muted-soft { color: var(--gray-soft); }
.link-subtle { color: var(--gray); }
.link-subtle:hover { color: var(--primary); }

/* 홈·섹션 헤더 */
.home-section {
    margin-bottom: 48px;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 12px;
    flex-wrap: wrap;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.section-subtitle {
    font-size: 0.9rem;
    color: var(--gray);
    margin-top: 4px;
    line-height: 1.55;
}

.hr-soft {
    border: none;
    border-top: 2px solid var(--light);
    margin: 0 0 40px;
}

/* ─── 마이페이지 · 주문 탭 (합배송 → 주문내역 흐름) ─ */

.mypage-orders-flow {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* 진행 중인 합배송 — 카드 전체 톤 통일(회색/흰 이중 블록 제거) */
.mypage-bundle.card {
    border-color: rgba(108, 92, 231, 0.14);
    box-shadow: 0 4px 22px rgba(45, 35, 100, 0.07);
}

.mypage-bundle {
    margin-bottom: 28px;
    padding: 0;
    overflow: hidden;
}

.mypage-bundle > .order-header-inner {
    background: var(--surface);
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.mypage-bundle .order-no-text {
    color: var(--primary-dark);
    font-weight: 800;
}

.mypage-bundle__body {
    padding: 18px 20px 20px;
    background: var(--surface);
}

.mypage-bundle-head__title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--dark);
    letter-spacing: -0.35px;
}

.mypage-bundle__panels {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 0;
}

@media (min-width: 960px) {
    .mypage-bundle__panels {
        grid-template-columns: 1fr 1fr;
        gap: 18px;
        align-items: stretch;
    }
}

.mypage-bundle__panel,
.mypage-bundle__panel--form {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px 18px;
    box-shadow: 0 1px 0 rgba(30, 40, 60, 0.04);
}

.mypage-bundle__panel-title {
    font-weight: 800;
    font-size: 0.92rem;
    margin-bottom: 12px;
    color: var(--dark);
    letter-spacing: -0.2px;
}

.mypage-bundle__panel:not(.mypage-bundle__panel--form) .mypage-bundle__panel-title {
    color: var(--primary-dark);
}

.mypage-bundle__addr {
    white-space: pre-line;
    color: var(--dark);
    font-size: 0.92rem;
    line-height: 1.6;
    margin-top: 8px;
    font-weight: 500;
}

/* 배송지 수정 폼: 읽기 전용 필드만 은은한 구분 */
.mypage-bundle__panel--form .form-control[readonly] {
    background: #f4f6f9;
    color: var(--dark);
    border-color: var(--border);
}

.mypage-bundle__orders-head {
    font-weight: 800;
    font-size: 0.93rem;
    margin: 22px 0 12px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    color: var(--dark);
    letter-spacing: -0.2px;
}

.mypage-bundle-lines {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mypage-bundle-line {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
}

.mypage-bundle-line__visual {
    flex-shrink: 0;
    width: 112px;
}

.mypage-bundle-line__body {
    min-width: 0;
    flex: 1;
}

.mypage-bundle-thumb {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    object-fit: cover;
    background: var(--light);
    display: block;
}

.mypage-bundle-thumb--ph {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed var(--border);
}

.mypage-bundle-thumb-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.mypage-bundle-thumb-strip__img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--light);
    flex-shrink: 0;
}

.mypage-bundle-thumb-strip__img--ph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    border: 1px solid var(--border);
}

.mypage-bundle-thumb-strip__more {
    font-size: 0.72rem;
    font-weight: 900;
    color: var(--primary);
    padding: 0 4px;
    line-height: 40px;
}

.mypage-bundle-line__title {
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: min(520px, 100%);
}

.mypage-bundle-line__draw {
    margin-top: 4px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: min(520px, 100%);
}

.mypage-bundle-line__meta {
    font-size: 0.85rem;
    color: var(--gray);
    margin-top: 2px;
    font-weight: 500;
}

.mypage-bundle-line__price {
    text-align: right;
    flex-shrink: 0;
    align-self: center;
}

.mypage-bundle-line__amount {
    font-weight: 900;
    color: var(--primary);
}

.mypage-past-head {
    margin: 4px 0 18px;
}

.mypage-past-head .section-title {
    font-size: 1.28rem;
    margin-bottom: 6px;
}

.mypage-past-head .section-subtitle {
    margin: 0;
    max-width: 44rem;
}

.card.card--static {
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.card.card--static:hover {
    transform: none;
    box-shadow: var(--shadow);
}

.order-card-user {
    padding: 0;
    overflow: hidden;
}

.order-card-user--muted {
    opacity: 0.72;
}

/* 환불/취소 카드에서도 '상세'는 선명하게 */
.order-card-user--muted .order-user-grid__detail,
.order-card-user--muted .order-card-horiz__detail {
    opacity: 1;
}

.order-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    background: #f6f7f9;
    gap: 12px;
    flex-wrap: wrap;
}

.order-header-inner__left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.order-header-inner__date {
    font-size: 0.86rem;
    color: var(--gray);
    font-weight: 500;
}

.order-type-pill {
    font-size: 0.75rem;
    padding: 3px 9px;
    border-radius: 8px;
    font-weight: 800;
}

.order-type-pill--gacha {
    background: #f8e8ff;
    color: #9b59b6;
}

.order-type-pill--product {
    background: #e8f4ff;
    color: #2980b9;
}

.order-header-inner__right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.order-no-text {
    font-size: 0.84rem;
    color: var(--dark);
    font-weight: 700;
}

.order-detail-link {
    font-size: 0.84rem;
    color: var(--gray);
    text-decoration: none;
    font-weight: 700;
}

.order-detail-link:hover {
    color: var(--primary);
}

/* 주문 카드: 기본은 세로(다른 화면 호환), 마이페이지 목록은 --horiz */
.order-card-body {
    display: flex;
    flex-direction: column;
    gap: 0;
    align-items: stretch;
}

.order-card-body--horiz {
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.order-card-body--horiz:not(.order-card-body--has-tail) .order-card-user__main--horiz {
    flex: 1 1 auto;
    width: 100%;
    max-width: none;
    border-bottom: none;
}

.order-card-user__tail {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    padding: 8px 14px 8px 12px;
    border-left: 1px solid var(--border);
    background: #fafbfd;
}

.order-card-user__main {
    flex: none;
    width: 100%;
    min-width: 0;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid var(--border);
}

.order-card-user__main--horiz {
    flex: 0 1 auto;
    max-width: min(42%, 280px);
    min-width: min(160px, 38vw);
    padding: 10px 12px 10px 14px;
    border-bottom: none;
    gap: 10px;
    align-items: center;
}

.order-card-body--has-tail .order-card-user__main--horiz {
    flex-shrink: 0;
}

.order-thumb-link {
    flex-shrink: 0;
    text-decoration: none;
    display: block;
    line-height: 0;
}

.order-thumb {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
    background: var(--light);
}

.order-thumb--horiz,
.order-thumb.order-thumb--horiz {
    width: 44px;
    height: 44px;
    border-radius: 9px;
}

.order-thumb--ph {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    background: var(--light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #b2bec3;
}

.order-thumb--ph.order-thumb--horiz {
    width: 44px;
    height: 44px;
    border-radius: 9px;
}

.order-card-user__meta-block {
    min-width: 0;
    flex: 1 1 auto;
}

.order-card-user__title-link {
    text-decoration: none;
    color: inherit;
    display: block;
    min-width: 0;
}

.order-card-user__title-row {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    justify-content: flex-start;
    gap: 8px 12px;
    flex-wrap: nowrap;
    min-width: 0;
}

.order-card-user__title--horiz {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
}

.order-card-user__price--horiz {
    margin-top: 0;
    flex-shrink: 0;
    font-size: 0.92rem;
    white-space: nowrap;
}

.order-card-user__title {
    font-weight: 700;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: min(520px, 100%);
}

.order-card-user__price {
    font-size: 1.12rem;
    font-weight: 800;
    color: var(--primary);
    margin-top: 4px;
}

.order-card-user__ship {
    flex: none;
    width: 100%;
    max-width: none;
    padding: 14px 18px 16px;
    border-left: none;
    border-top: none;
    background: #fafbfd;
}

.order-card-user__ship--compact {
    padding: 12px 14px 14px;
    background: #fafbfd;
    border-top: 1px solid var(--border);
}

.order-card-quick {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.order-card-quick__row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px 14px;
}

.order-card-quick__status {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
}

.order-card-quick__icon {
    width: 28px;
    height: 28px;
    border-radius: 9px;
}

.order-card-quick__status-txt {
    font-weight: 800;
    font-size: 0.88rem;
    color: var(--dark);
}

.order-card-quick__track {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    text-align: right;
    flex-shrink: 0;
}

.order-card-quick__track-co {
    font-size: 0.74rem;
    color: var(--gray);
    font-weight: 700;
}

.order-card-quick__track-no {
    font-size: 0.85rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    color: var(--dark);
}

.order-card-quick__pending-note {
    font-size: 0.8rem;
    color: var(--gray);
    font-weight: 600;
}

.order-card-quick__gacha {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 4px;
}

.order-card-quick__gacha-thumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.order-card-quick__gacha-img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--light);
    border: 1px solid var(--border);
}

.order-card-quick__gacha-img--ph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    line-height: 1;
    box-sizing: border-box;
}

.order-card-quick__gacha-more {
    font-size: 0.7rem;
    font-weight: 900;
    color: var(--primary);
    padding: 2px 6px;
}

.order-card-quick__gacha-sum {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--dark);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.order-card-quick__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--primary);
    background: rgba(108, 92, 231, 0.08);
    border: 1px solid rgba(108, 92, 231, 0.2);
    text-decoration: none !important;
    transition: background 0.15s ease, border-color 0.15s ease;
    box-sizing: border-box;
}

.order-card-quick__link:hover {
    background: rgba(108, 92, 231, 0.14);
    border-color: rgba(108, 92, 231, 0.35);
}

/* 마이페이지 주문 카드: 본문 가로 한 줄 (썸네일·상품·배송·가챠·상세) */
.order-card-user__tail .order-card-quick--horiz {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px 10px;
    min-width: min(260px, 100%);
}

.order-card-quick__ship-strip {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
}

.order-card-quick__icon--horiz {
    width: 24px;
    height: 24px;
    border-radius: 8px;
    flex-shrink: 0;
}

.order-card-quick__icon--horiz svg,
.order-card-quick__icon--horiz i svg {
    width: 14px !important;
    height: 14px !important;
}

.order-card-quick--horiz .order-card-quick__status-txt {
    font-size: 0.8rem;
    flex-shrink: 0;
    white-space: nowrap;
}

.order-card-quick__track-inline {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    min-width: 0;
    flex: 1 1 auto;
    font-size: 0.76rem;
    color: var(--dark);
}

.order-card-quick__track-inline .order-card-quick__track-co {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: inherit;
    font-weight: 700;
    color: var(--gray);
}

.order-card-quick__track-inline .order-card-quick__track-no {
    flex-shrink: 0;
    white-space: nowrap;
    font-size: inherit;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.order-card-quick__track-sep {
    opacity: 0.45;
    flex-shrink: 0;
}

.order-card-quick--horiz .order-card-quick__pending-note {
    font-size: 0.74rem;
    white-space: nowrap;
}

.order-card-quick__gacha-thumbs--horiz {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.order-card-quick__gacha-img--horiz {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    object-fit: cover;
    background: var(--light);
    border: 1px solid var(--border);
    box-sizing: border-box;
}

.order-card-quick__gacha-img--horiz.order-card-quick__gacha-img--ph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
}

.order-card-horiz__detail {
    flex-shrink: 0;
    margin-left: auto;
    padding: 5px 11px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--primary);
    background: rgba(108, 92, 231, 0.1);
    border: 1px solid rgba(108, 92, 231, 0.22);
    text-decoration: none !important;
    white-space: nowrap;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.order-card-horiz__detail:hover {
    background: rgba(108, 92, 231, 0.16);
    border-color: rgba(108, 92, 231, 0.32);
}

/* 마이페이지 주문 목록: 4열 (상품명 | 배송상태 | 금액 | 상세) */
.order-user-list-columns {
    /* 빈공간을 줄이기 위해 '상태' 열을 더 컴팩트하게 */
    /* 상품/배송은 넓게, 금액/상세는 고정폭으로 "쭉" 배치 */
    /* 상태 칸이 너무 가운데에 몰리지 않게, 시작점을 더 왼쪽으로 */
    /* 상품 | 금액(배지+금액) | 상세 */
    --order-grid-cols: minmax(0, 1fr) minmax(160px, max-content) 52px;
}

.order-list-colhead {
    display: none;
}

@media (min-width: 520px) {
    .order-list-colhead {
        display: grid;
        grid-template-columns: var(--order-grid-cols);
        column-gap: 0;
        row-gap: 6px;
        align-items: end;
        padding: 0 16px 8px 16px;
        font-size: 0.72rem;
        font-weight: 800;
        color: var(--gray);
        letter-spacing: -0.01em;
    }

    .order-list-colhead span:nth-child(1) {
        padding-right: 8px;
    }

    .order-list-colhead span:nth-child(2),
    .order-list-colhead span:nth-child(3),
    .order-list-colhead span:nth-child(4) {
        border-left: 1px solid var(--border);
        padding-left: 14px;
    }

    .order-list-colhead span:nth-child(3) {
        text-align: right;
        padding-right: 2px;
    }
}

.order-card-user-grid {
    display: grid;
    grid-template-columns: var(--order-grid-cols);
    column-gap: 14px;
    row-gap: 8px;
    align-items: center;
    /* 카드 내부 상하 패딩을 줄여 밀도를 올림 */
    padding: 12px 14px 13px;
}

/* 주문내역 한 줄: 폰트/라인하이트 통일 */
.order-card-user-grid {
    --order-inline-gap: 10px;
    font-size: 0.92rem;
    line-height: 1.15;
}

.order-user-grid__product {
    min-width: 0;
    padding-right: 4px;
}

.order-user-grid__product-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

/* 주문내역: 썸네일은 왼쪽에 크게, 텍스트는 좌측 정렬 */
.order-user-grid__product-row {
    align-items: center;
    justify-content: flex-start;
    gap: var(--order-inline-gap);
}

.order-thumb--horiz,
.order-thumb.order-thumb--horiz,
.order-thumb--ph.order-thumb--horiz {
    width: 52px;
    height: 52px;
    border-radius: 12px;
}

.order-user-grid__title-block {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
    text-align: left;
    align-self: center;
}

/* (중복 정의 제거) title-block은 한 줄 중앙정렬 고정 */

.order-card-user-grid .order-card-user__title.order-user-grid__title {
    display: block;
    -webkit-line-clamp: initial;
    -webkit-box-orient: initial;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1;
    font-size: inherit;
    max-width: none;
}

.order-user-grid__gacha {
    margin-top: 6px;
}

.order-user-grid__status {
    min-width: 0;
    padding: 4px 0 6px 0;
}

.order-user-grid__status-fallback {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: var(--order-inline-gap);
    width: 100%;
    min-width: 0;
    white-space: nowrap;
    line-height: 1.15;
}

.order-card-user-grid .order-card-quick__status-txt,
.order-card-user-grid .order-card-quick__pending-note,
.order-card-user-grid .order-card-quick__track-inline,
.order-card-user-grid .order-user-grid__amount,
.order-card-user-grid .order-card-horiz__detail {
    font-size: inherit;
    line-height: 1.15;
}

.order-user-grid__status .badge {
    font-size: 0.82rem;
    padding: 3px 9px;
}

.order-user-grid__status .order-type-pill {
    font-size: 0.82rem;
    padding: 3px 9px;
    border-radius: 8px;
}

.order-user-grid__ship-wrap {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    width: 100%;
    min-width: 0;
}

.order-user-grid__ship-strip.order-card-quick__ship-strip {
    flex-wrap: nowrap;
    align-items: center;
    row-gap: 0;
}

/* 운송장: 상태 텍스트 옆에 자연스럽게 */
.order-user-grid__status .order-card-quick__track-inline {
    margin-left: 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-user-grid__status .order-card-quick__track-inline .order-card-quick__track-co {
    max-width: 6.5rem;
}

.order-user-grid__status .order-card-quick__track-inline .order-card-quick__track-no {
    font-variant-numeric: tabular-nums;
}

.order-user-grid__track-line {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    padding-left: 0;
    width: 100%;
    box-sizing: border-box;
    text-align: right;
}

.order-user-grid__track-co {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--gray);
    line-height: 1.25;
}

.order-user-grid__track-no {
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    font-variant-numeric: tabular-nums;
    color: var(--dark);
    line-height: 1.25;
    word-break: break-all;
    max-width: 100%;
}

.order-user-grid__status-fallback {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: var(--order-inline-gap);
    width: 100%;
    min-width: 0;
    white-space: nowrap;
    line-height: 1.15;
    min-height: auto;
}

.order-user-grid__amount {
    font-weight: 800;
    color: var(--primary);
    white-space: nowrap;
    text-align: right;
    justify-self: stretch;
    align-self: center;
    padding: 6px 0;
    min-width: 0;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.order-user-grid__mini-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(45, 52, 54, 0.06);
    border: 1px solid rgba(45, 52, 54, 0.14);
    color: var(--dark);
    font-weight: 800;
    line-height: 1;
    gap: 6px;
}

.order-user-grid__mini-badge .mini-badge__icon,
.order-user-grid__mini-badge .mini-badge__icon svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* 상태별 컬러 (mini-badge 텍스트값 기준) */
.order-user-grid__mini-badge.is-refund {
    background: rgba(214, 48, 49, 0.10);
    border-color: rgba(214, 48, 49, 0.22);
    color: #b02324;
}

.order-user-grid__mini-badge.is-pending {
    background: rgba(253, 203, 110, 0.22);
    border-color: rgba(253, 203, 110, 0.42);
    color: #8a5a00;
}

.order-user-grid__mini-badge.is-ship {
    background: rgba(0, 184, 148, 0.12);
    border-color: rgba(0, 184, 148, 0.22);
    color: #00695c;
}

.order-user-grid__mini-badge.is-pay-pending {
    background: rgba(253, 203, 110, 0.22);
    border-color: rgba(253, 203, 110, 0.42);
    color: #8a5a00;
}

/* 상품정보 제공고시 */
.disclosure-table-wrap {
    border: 1px solid var(--light);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}
.disclosure-table {
    width: 100%;
    border-collapse: collapse;
}
.disclosure-table th,
.disclosure-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--light);
    vertical-align: top;
    font-size: 0.92rem;
    line-height: 1.55;
}
.disclosure-table th {
    width: 34%;
    background: #fafbfc;
    color: var(--gray);
    font-weight: 800;
}
.disclosure-table tr:last-child th,
.disclosure-table tr:last-child td {
    border-bottom: none;
}

.order-user-grid__mini-badge.is-prepare {
    background: rgba(253, 203, 110, 0.18);
    border-color: rgba(253, 203, 110, 0.35);
    color: #7a5100;
}

.order-user-grid__mini-badge.is-shipped {
    background: rgba(116, 185, 255, 0.18);
    border-color: rgba(116, 185, 255, 0.35);
    color: #1e6fbf;
}

.order-user-grid__mini-badge.is-delivered {
    background: rgba(0, 184, 148, 0.12);
    border-color: rgba(0, 184, 148, 0.22);
    color: #00695c;
}

.order-user-grid__mini-badge.is-ship-pending {
    background: rgba(45, 52, 54, 0.06);
    border-color: rgba(45, 52, 54, 0.14);
    color: var(--dark);
}

.order-user-grid__amount-txt {
    font-weight: 900;
}

.order-card-user--muted .order-user-grid__amount {
    color: var(--dark);
    font-weight: 700;
    opacity: 0.88;
}

.order-user-grid__detail {
    justify-self: stretch;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 4px 0;
    align-self: center;
    line-height: 1;
}

.order-card-user-grid .order-card-horiz__detail {
    margin-left: 0;
}

@media (max-width: 519px) {
    .order-user-list-columns .order-card-user-grid {
        grid-template-columns: minmax(108px, 1fr) minmax(88px, 110px) minmax(64px, max-content) 46px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        align-items: start;
        padding: 10px 10px 12px;
    }

    .order-user-grid__status {
        padding-left: 10px;
    }

    .order-user-grid__track-line {
        padding-left: 26px;
    }
}

.order-ship-stack {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.order-ship-row {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.order-ship-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.order-ship-row:first-child {
    padding-top: 0;
}

.order-ship-row--gacha {
    background: var(--light);
    margin: 0 -18px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--border);
}

.order-ship-placeholder {
    font-size: 0.88rem;
    color: var(--gray);
    line-height: 1.55;
    margin-top: 6px;
    font-weight: 500;
}

.order-ship-grid__label {
    font-size: 0.78rem;
    color: #2f383e;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.order-ship-icon {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.order-ship-status-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.order-ship-status-text {
    font-weight: 800;
    font-size: 0.92rem;
    color: var(--dark);
    white-space: nowrap;
}

.order-gacha-mini {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 0;
}

.order-gacha-mini img {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    object-fit: cover;
    background: var(--light);
    flex-shrink: 0;
}

.order-gacha-mini__label {
    font-size: 0.76rem;
    color: #3d454c;
    font-weight: 800;
}

.order-gacha-mini__name {
    font-size: 0.86rem;
    font-weight: 800;
    color: var(--primary-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ship-track-box .t {
    font-size: 0.86rem;
    color: var(--gray);
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.ship-track-box .n {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--dark);
    margin-top: 4px;
    letter-spacing: 0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ship-addr-box .name {
    margin-top: 3px;
    font-size: 0.86rem;
    color: var(--dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
}

.ship-addr-box .addr {
    margin-top: 3px;
    font-size: 0.84rem;
    color: var(--gray);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.25;
    max-height: 2.5em;
}

.icon-md {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.icon-xl {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.icon-result {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
}

/* 헤더 장바구니 배지 */
.nav-cart-badge {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    border-radius: 10px;
    padding: 1px 7px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 4px;
    line-height: 1.35;
    vertical-align: middle;
}

/* 푸터 */
.footer-inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
    margin-bottom: 12px;
    font-size: 0.85rem;
}

.footer-links a {
    color: inherit;
    text-decoration: underline;
}

.footer-links .footer-privacy {
    font-weight: 700;
}

.footer-meta {
    font-size: 0.84rem;
    color: var(--gray);
    line-height: 1.75;
}

.footer-copy {
    margin-top: 10px;
}

/* 경고 스트립 (로그인 인증 재발송 등) */
.alert-warning-strip {
    background: #fff8e6;
    border: 1px solid #ffc107;
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.alert-warning-strip__text {
    font-size: 0.88rem;
    color: #856404;
}

/* 회원가입 약관 블록 */
.form-agree-box {
    margin: 16px 0;
    padding: 16px;
    background: var(--light);
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
}

.form-agree-box label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
}

.form-agree-box label + label {
    margin-top: 10px;
}

.form-agree-box input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
}

/* 카드 패딩 변형 */
.card--p-lg {
    padding: 32px;
}

.card--p-md {
    padding: 24px;
}

.card--sticky-summary {
    height: fit-content;
    position: sticky;
    top: 88px;
}

/* 장바구니·체크아웃 2단 */
.layout-cart {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
}

.layout-checkout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 32px;
}

.order-summary-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.row-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.3rem;
    font-weight: 800;
    padding-top: 12px;
    border-top: 2px solid var(--light);
}

/* 마이페이지 상단 탭 */
.tab-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--light);
    padding-bottom: 8px;
    flex-wrap: wrap;
}

/* 안내 패널 (문의 등) */
.notice-panel {
    margin-bottom: 20px;
    padding: 14px 16px;
    background: #f0f7ff;
    border: 1px solid rgba(108, 92, 231, 0.25);
    border-radius: 10px;
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--dark);
}

.notice-panel__title {
    display: block;
    margin-bottom: 6px;
    color: var(--primary-dark);
    font-size: 0.95rem;
}

.notice-panel__body {
    display: block;
    font-size: 0.88rem;
    color: var(--dark);
    opacity: 0.92;
    line-height: 1.6;
}

/* 인증 배너 (프로필) */
.email-verify-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px 18px;
    margin-bottom: 20px;
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 10px;
}

.email-verify-banner__text {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    color: #c53030;
}

.email-verify-banner .icon-sm {
    width: 18px;
    height: 18px;
    color: #c53030;
    flex-shrink: 0;
}

/* 문의 상태 뱃지 */
.badge-inquiry-answered {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 999px;
    background: #e6fffa;
    color: #00b894;
    font-weight: 700;
}

.badge-inquiry-pending {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 999px;
    background: #fff3e0;
    color: #d35400;
    font-weight: 700;
}

.admin-reply-box {
    margin-top: 12px;
    padding: 12px 14px;
    background: var(--light);
    border-radius: 8px;
    border-left: 3px solid var(--primary);
}

/* 카드형 플레이스홀더 이미지 */
.card-img--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b2bec3;
}

/* 페이지네이션 */
.pagination-row {
    margin-top: 18px;
    display: flex;
    justify-content: center;
    gap: 10px;
    align-items: center;
}

.pagination-row__status {
    color: var(--dark);
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0.88;
}

.btn.is-disabled {
    pointer-events: none;
    opacity: 0.5;
}

/* 인증·결과 화면 공통 */
.auth-result-title {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.auth-result-lede {
    color: var(--gray);
    font-size: 1.02rem;
    line-height: 1.6;
    font-weight: 500;
    margin-bottom: 24px;
}

@media (max-width: 900px) {
    .layout-cart,
    .layout-checkout {
        grid-template-columns: 1fr;
    }

    .card--sticky-summary {
        position: static;
    }

    .layout-admin-2col {
        grid-template-columns: 1fr;
    }
}

/* ─── 관리자 UI (admin_layout · 대시보드 등) ───────────────── */

.admin-app {
    background: #eef0f4;
}

.admin-app main.container {
    padding-bottom: 40px;
}

.admin-app .site-footer {
    padding: 20px;
    font-size: 0.84rem;
    color: var(--gray);
    background: #dfe4ea;
    border-top: 1px solid #cdd2d8;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: clamp(14px, 2vw, 20px);
    margin-bottom: 32px;
}

.stat-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 22px 22px 22px 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-card .stat-value {
    font-size: clamp(1.65rem, 4vw, 2.1rem);
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
    line-height: 1.15;
}

.stat-card .stat-label {
    color: var(--gray);
    font-size: 0.86rem;
    margin-top: 8px;
    font-weight: 500;
}

.section-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2rem 0 1rem;
    gap: 12px;
    flex-wrap: wrap;
}

.section-heading {
    font-size: 1.22rem;
    font-weight: 800;
    letter-spacing: -0.4px;
    margin: 0;
    color: var(--dark);
}

.subsection-title {
    font-size: 1.22rem;
    font-weight: 800;
    letter-spacing: -0.4px;
    margin: 2rem 0 1rem;
    color: var(--dark);
}

.page-header-row {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 24px;
    gap: 12px;
    flex-wrap: wrap;
}

.page-header-row .page-title {
    margin-bottom: 0;
    margin-right: auto;
}

.mb-section {
    margin-bottom: 2rem;
}

.table-empty {
    text-align: center;
    color: var(--gray);
    padding: 2rem 1rem !important;
}

.thumb-admin {
    width: 28px;
    height: 28px;
    object-fit: cover;
    border-radius: 6px;
    vertical-align: middle;
    margin-right: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.thumb-admin--lg {
    width: 32px;
    height: 32px;
}

.btn-outline.btn--duplicate {
    border-color: var(--primary);
    color: var(--primary);
}

/* 관리자 카드 목록 (박스 등) */
.card-row-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.card-row-head__main {
    min-width: 0;
}

.card-title-tight {
    margin-bottom: 6px;
}

.card-meta-line {
    margin: 0;
    color: var(--gray);
    font-size: 0.92rem;
}

.card-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.form-inline {
    display: inline;
    margin: 0;
}

.admin-back-link {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 16px;
    display: inline-block;
}

.admin-back-link:hover {
    color: var(--primary);
}

.admin-back-row {
    margin-bottom: 16px;
}

.badge--lg {
    font-size: 0.9rem;
    padding: 5px 14px;
}

.layout-admin-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: start;
}

.subsection-title--sm {
    font-size: 1.12rem;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -0.3px;
}

/* 관리자: 컴팩트 버튼·입력 (목록·일괄 처리 툴바) */
.admin-app .btn-xs {
    padding: 4px 10px;
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: 6px;
    line-height: 1.3;
}

.admin-app .btn-xs.btn-primary:hover,
.admin-app .btn-xs.btn-outline:hover {
    transform: translateY(-1px);
}

.admin-app .form-control--sm {
    padding: 5px 10px;
    font-size: 0.8125rem;
    min-height: 34px;
    border-width: 1px;
}

.admin-app .label-sm {
    font-size: 0.84rem;
    font-weight: 700;
    display: block;
    margin-bottom: 4px;
    color: var(--dark);
}

.admin-app .filter-bar {
    display: flex;
    gap: 16px 20px;
    margin-bottom: 18px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.admin-app .filter-bar__field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.admin-app .filter-bar__field .form-control {
    width: auto;
    min-width: 9rem;
}

.admin-app .bulk-actions-bar {
    display: flex;
    gap: 8px 12px;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.admin-app .bulk-actions-bar .form-group {
    margin-bottom: 0;
}

.admin-app .checkbox-label-inline {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    font-size: 0.84rem;
    color: var(--dark);
    opacity: 0.88;
    font-weight: 500;
    margin: 0 2px 2px 0;
    white-space: nowrap;
}

.admin-app .admin-hint {
    font-size: 0.86rem;
    color: var(--gray);
    align-self: center;
    line-height: 1.5;
    max-width: 28rem;
    font-weight: 500;
}

/* 주문 목록 테이블 */
.table-wrap--orders {
    overflow-x: auto;
    max-width: 100%;
}

.orders-table {
    width: max-content;
    min-width: 100%;
}

.orders-table th,
.orders-table td {
    vertical-align: middle;
}

.orders-table .col-payment,
.orders-table .col-status,
.orders-table .col-actions {
    white-space: nowrap;
}

.orders-table .col-ship {
    white-space: normal;
}

.orders-table .col-ship .ship-row-fields {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.orders-table .col-ship form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}

.orders-table tbody tr.is-muted {
    opacity: 0.5;
}

.orders-table .col-address-note {
    font-size: 0.8rem;
    color: var(--gray);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 320px;
}

/* 주문 상세 */
.order-detail-stack {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
    align-items: start;
}

.order-detail-dl {
    width: 100%;
    font-size: 0.9rem;
    border-collapse: collapse;
}

.order-detail-dl td {
    padding: 6px 0;
    vertical-align: top;
}

.order-detail-dl td:first-child {
    color: var(--gray);
    width: 35%;
}

.order-detail-dl td.amount-strong {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--primary);
}

.card-section-title {
    font-size: 1.08rem;
    font-weight: 800;
    margin: 0 0 16px;
    letter-spacing: -0.3px;
    color: var(--dark);
}

.order-detail-note {
    margin-top: 14px;
    color: var(--gray);
    font-size: 0.85rem;
    line-height: 1.5;
}

.admin-form-row {
    display: flex;
    gap: 8px 12px;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.admin-form-row .form-group {
    margin-bottom: 0;
}

.admin-form-row--tight {
    margin-bottom: 12px;
}

.ship-form-bar {
    display: grid;
    grid-template-columns: minmax(100px, 160px) minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
}

.ship-form-bar .form-group {
    margin-bottom: 0;
}

.action-buttons-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.admin-text-note {
    margin-top: 8px;
    font-size: 0.84rem;
    color: var(--gray);
    font-weight: 500;
    line-height: 1.55;
}

/* 문의 */
.filter-pills {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.filter-pills__meta {
    font-size: 0.9rem;
    color: var(--dark);
    font-weight: 600;
    opacity: 0.9;
    margin-left: auto;
}

.inquiry-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.inquiry-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -0.3px;
}

.inquiry-meta {
    font-size: 0.86rem;
    color: var(--gray);
    margin-bottom: 12px;
}

.inquiry-body-block {
    white-space: pre-wrap;
    line-height: 1.65;
    padding: 14px;
    background: var(--light);
    border-radius: var(--radius-sm);
}

.inquiry-reply-box.card {
    border-left: 4px solid var(--primary);
}

.inquiry-reply-title {
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--primary);
}

.inquiry-reply-meta {
    font-size: 0.82rem;
    color: var(--gray);
    margin-bottom: 10px;
}

.inquiry-reply-text {
    white-space: pre-wrap;
    line-height: 1.65;
}

.pagination-bar {
    margin-top: 16px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.pagination-bar__status {
    font-size: 0.88rem;
    color: var(--gray);
}

.admin-app .min-w-140 {
    min-width: 140px;
}

.admin-app .min-w-150 {
    min-width: 150px;
}

.admin-app .max-w-tracking {
    max-width: 9rem;
}

.text-meta {
    font-size: 0.88rem;
    color: var(--gray);
    font-weight: 500;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.admin-app td.td-nowrap {
    white-space: nowrap;
    font-size: 0.85rem;
}

.admin-app td.td-max {
    max-width: 240px;
}

.admin-app .text-subtle {
    font-size: 0.82rem;
    color: var(--gray);
    font-weight: 500;
}

.admin-app .fw-semibold {
    font-weight: 600;
}

@media (max-width: 900px) {
    .order-detail-stack {
        grid-template-columns: 1fr;
    }

    .ship-form-bar {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .admin-app .header-inner {
        align-items: flex-start;
    }

    .admin-app .site-nav {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
        padding-bottom: 6px;
        gap: 6px;
        scrollbar-width: thin;
    }

    .admin-app .site-nav a {
        flex-shrink: 0;
        padding: 8px 12px;
        font-size: 0.82rem;
    }
}
