/*
 * Couponi mobile responsive consolidated stylesheet
 * Includes phases 1-5 plus final stability adjustments.
 * Final baseline: 2026-06-09
 */


/* ===== SOURCE: coupon_mobile.css ===== */
/*
 * 쿠포니 모바일 공통 보정
 * - PC 레이아웃과 기능은 유지
 * - 모바일에서 메뉴를 서랍형으로 전환
 * - 표 영역만 가로 스크롤
 * - 폼/버튼/카드의 터치 사용성 통일
 */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

.coupon-app,
.coupon-content,
.coupon-card,
.coupon-content * {
    box-sizing: border-box;
}

.coupon-content {
    min-width: 0;
}

.coupon-content img,
.coupon-home img {
    max-width: 100%;
    height: auto;
}

.coupon-content pre,
.coupon-content code,
.coupon-content .coupon-code-block {
    max-width: 100%;
    overflow-x: auto;
}

.coupon-mobile-menu-toggle,
.coupon-mobile-menu-close,
.coupon-mobile-nav-overlay,
.coupon-mobile-sidebar-head,
.coupon-mobile-table-guide {
    display: none;
}

.coupon-mobile-table-scroll {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.coupon-mobile-table-scroll > table {
    margin: 0;
}

@media (max-width: 900px) {
    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    body.coupon-mobile-nav-open {
        overflow: hidden;
        touch-action: none;
    }

    .coupon-app {
        width: 100%;
        max-width: 100%;
        overflow-x: clip;
    }

    /* 상단바 */
    .coupon-topbar {
        position: sticky;
        top: 0;
        z-index: 1200;
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
        width: 100%;
        min-height: 56px;
        height: auto;
        padding: 9px 10px;
        box-shadow: 0 2px 12px rgba(15, 23, 42, .18);
    }

    .coupon-topbar-left {
        display: flex;
        align-items: center;
        flex-wrap: nowrap;
        width: 100%;
        min-width: 0;
        gap: 9px;
    }

    .coupon-mobile-menu-toggle {
        display: inline-flex;
        flex: 0 0 auto;
        align-items: center;
        justify-content: center;
        gap: 5px;
        min-width: 60px;
        min-height: 38px;
        padding: 6px 9px;
        border: 1px solid rgba(255, 255, 255, .32);
        border-radius: 9px;
        background: rgba(255, 255, 255, .08);
        color: #fff;
        font: inherit;
        font-size: 13px;
        font-weight: 800;
        cursor: pointer;
    }

    .coupon-mobile-menu-icon {
        font-size: 20px;
        line-height: 1;
    }

    .coupon-brand {
        flex: 0 1 auto;
        min-width: 0;
        font-size: 17px;
        white-space: nowrap;
    }

    .coupon-page-title {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 13px;
    }

    .coupon-topbar-right {
        display: flex;
        align-items: center;
        flex-wrap: nowrap;
        gap: 7px;
        width: 100%;
        max-width: 100%;
        padding: 1px 0 2px;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .coupon-topbar-right::-webkit-scrollbar {
        display: none;
    }

    .coupon-topbar-right > * {
        flex: 0 0 auto;
    }

    .coupon-top-link {
        min-height: 34px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 6px 9px;
        white-space: nowrap;
    }

    .coupon-login-user {
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* 모바일 메뉴 서랍 */
    .coupon-mobile-nav-overlay {
        position: fixed;
        inset: 0;
        z-index: 1290;
        width: 100%;
        height: 100%;
        border: 0;
        background: rgba(15, 23, 42, .52);
        opacity: 0;
        pointer-events: none;
        transition: opacity .2s ease;
    }

    body.coupon-mobile-nav-open .coupon-mobile-nav-overlay {
        display: block;
        opacity: 1;
        pointer-events: auto;
    }

    .coupon-layout {
        display: block;
        width: 100%;
        min-height: calc(100vh - 56px);
    }

    .coupon-sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 1300;
        display: block;
        width: min(88vw, 340px);
        max-width: 340px;
        height: 100dvh;
        padding: 0 12px 30px;
        overflow-y: auto;
        overscroll-behavior: contain;
        border: 0;
        border-right: 1px solid #e5e7eb;
        background: #fff;
        box-shadow: 18px 0 42px rgba(15, 23, 42, .24);
        transform: translateX(-105%);
        transition: transform .22s ease;
    }

    body.coupon-mobile-nav-open .coupon-sidebar {
        transform: translateX(0);
    }

    .coupon-mobile-sidebar-head {
        position: sticky;
        top: 0;
        z-index: 2;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        min-height: 58px;
        margin: 0 -12px 12px;
        padding: 9px 12px;
        border-bottom: 1px solid #e5e7eb;
        background: #111827;
        color: #fff;
    }

    .coupon-mobile-sidebar-head strong {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 17px;
    }

    .coupon-mobile-menu-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 40px;
        width: 40px;
        height: 40px;
        padding: 0;
        border: 1px solid rgba(255, 255, 255, .35);
        border-radius: 10px;
        background: rgba(255, 255, 255, .1);
        color: #fff;
        font-size: 28px;
        line-height: 1;
        cursor: pointer;
    }

    .coupon-sidebar .coupon-menu-group {
        margin-bottom: 16px;
    }

    .coupon-sidebar .coupon-menu-title {
        margin: 0 0 7px 3px;
    }

    .coupon-sidebar .coupon-menu-dropdown {
        display: block;
        width: 100%;
        min-width: 0;
        margin: 0 0 8px;
    }

    .coupon-sidebar .coupon-menu-summary {
        min-height: 44px;
        padding: 10px 12px;
        font-size: 14px;
    }

    .coupon-sidebar .coupon-menu-dropdown-body {
        padding-left: 5px;
    }

    .coupon-sidebar .coupon-side-link,
    .coupon-sidebar .coupon-menu-dropdown-body .coupon-side-link {
        display: block;
        width: 100%;
        min-height: 42px;
        margin: 3px 0;
        padding: 10px 11px;
        line-height: 1.35;
    }

    /* 본문 */
    .coupon-content,
    .coupon-content.coupon-merchant-compact {
        width: 100%;
        max-width: none;
        min-width: 0;
        padding: 12px;
        overflow: visible;
    }

    .coupon-content-head {
        margin-bottom: 10px;
        padding: 0;
    }

    .coupon-content-head h1,
    .coupon-content-title-row h1 {
        font-size: clamp(20px, 5.5vw, 25px);
        line-height: 1.25;
        word-break: keep-all;
    }

    .coupon-content-head p {
        display: block;
        margin-top: 5px;
        font-size: 13px;
        line-height: 1.45;
    }

    .coupon-card,
    .coupon-policy-card,
    .coupon-stat-card {
        width: 100%;
        min-width: 0;
        padding: 14px;
        border-radius: 12px;
    }

    .coupon-card h2 {
        font-size: 17px;
        line-height: 1.35;
    }

    .coupon-page-head,
    .coupon-section-head,
    .coupon-admin-overview-head,
    .coupon-section-title-row {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .coupon-page-head > *,
    .coupon-section-head > *,
    .coupon-admin-overview-head > * {
        max-width: 100%;
    }

    /* 폼 */
    .coupon-content form,
    .coupon-card form {
        max-width: 100%;
        min-width: 0 !important;
    }

    .coupon-content input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
    .coupon-content select,
    .coupon-content textarea,
    .coupon-card input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
    .coupon-card select,
    .coupon-card textarea {
        max-width: 100%;
        min-height: 44px;
        font-size: 16px;
    }

    .coupon-content textarea,
    .coupon-card textarea {
        min-height: 92px;
    }

    .coupon-filter-form,
    .coupon-admin-filter-form,
    .coupon-history-search-form,
    .waiting-history-filter {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        align-items: stretch !important;
        width: 100%;
    }

    .coupon-filter-form .coupon-form-row,
    .coupon-admin-filter-form .coupon-form-row {
        width: 100%;
        min-width: 0;
    }

    .coupon-actions,
    .coupon-inline-actions,
    .coupon-form-actions,
    .direct-actions,
    .market-primary-actions,
    .coupon-home-alert-actions {
        display: flex;
        flex-wrap: wrap;
        align-items: stretch;
        gap: 8px;
        max-width: 100%;
    }

    .coupon-page-head .coupon-actions > .coupon-btn,
    .coupon-section-head .coupon-actions > .coupon-btn,
    .coupon-form-actions > .coupon-btn,
    .direct-actions > .coupon-btn {
        flex: 1 1 140px;
        min-height: 44px;
        text-align: center;
    }

    .coupon-btn,
    button.coupon-btn,
    input.coupon-btn {
        min-height: 42px;
        line-height: 1.25;
        white-space: normal;
        touch-action: manipulation;
    }

    /* 그리드: 모바일 1열, 요약 KPI는 2열 유지 */
    .coupon-grid,
    .coupon-dashboard-grid,
    .coupon-admin-two-col,
    .coupon-guide-steps,
    .merchant-view-grid,
    .merchant-ad-hero,
    .merchant-ad-section-grid,
    .merchant-product-grid,
    .coupon-form-grid-2,
    .coupon-form-grid-3,
    .coupon-product-edit-grid,
    .coupon-issue-policy-form,
    .coupon-history-direct-inputs,
    .coupon-help-grid-modal,
    .coupon-issue-policy-form-compact,
    .friend-transfer-list,
    .market-location-grid,
    .market-product-grid,
    .market-benefit-grid,
    .market-bottom-grid,
    .coupon-application-meta,
    .merchant-dashboard-grid,
    .direct-order-grid,
    .direct-settings-grid,
    .item-grid,
    .item-form-grid,
    .option-grid,
    .option-channel-grid,
    .option-row,
    .couponi-kitchen-grid,
    .couponi-order-sheet-wrap,
    .res-main,
    .res-grid,
    .res-day,
    .couponi-policy-grid,
    .waiting-setting-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .coupon-admin-stat-grid,
    .coupon-status-summary-grid,
    .coupon-control-stat-grid,
    .coupon-overview-kpi-grid,
    .merchant-dashboard-stat-grid,
    .couponi-order-status-grid,
    .res-summary,
    .waiting-history-kpis,
    .waiting-kpi-grid,
    .coupon-summary-row,
    .register-summary-row {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }

    .item-channel-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .coupon-item,
    .coupon-history-head,
    .friend-transfer-item,
    .transfer-request-item,
    .item-card-head,
    .option-head,
    .option-group-title {
        min-width: 0;
    }

    /* 표: 페이지 전체가 아닌 표만 좌우 이동 */
    .coupon-table-wrap,
    .coupon-mobile-table-scroll {
        width: 100%;
        max-width: calc(100vw - 24px);
        margin: 0;
        overflow-x: auto;
        overflow-y: hidden;
        border: 1px solid #e5e7eb;
        border-radius: 10px;
        background: #fff;
        -webkit-overflow-scrolling: touch;
    }

    .coupon-table-wrap > .coupon-table,
    .coupon-mobile-table-scroll > table,
    .coupon-mobile-table-scroll > .coupon-table {
        display: table;
        width: max-content;
        min-width: 720px;
        max-width: none;
        white-space: normal;
    }

    .coupon-mobile-table-guide {
        display: block;
        margin: 0 0 6px;
        color: #64748b;
        font-size: 12px;
        line-height: 1.4;
    }

    .coupon-table th,
    .coupon-table td,
    .coupon-mobile-table-scroll th,
    .coupon-mobile-table-scroll td {
        min-width: 90px;
        padding: 9px 8px;
        vertical-align: top;
    }

    .coupon-table td .coupon-btn,
    .coupon-mobile-table-scroll td .coupon-btn {
        min-height: 36px;
        padding: 7px 9px;
        font-size: 12px;
    }

    /* 팝업/모달 */
    .coupon-modal,
    .coupon-dialog,
    [role="dialog"] {
        width: calc(100vw - 24px) !important;
        max-width: calc(100vw - 24px) !important;
        max-height: calc(100dvh - 32px) !important;
        overflow-y: auto;
    }

    .coupon-policy-footer {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px 9px;
        padding: 14px 4px 6px;
        font-size: 12px;
        line-height: 1.5;
        text-align: center;
    }

    .coupon-proxy-banner {
        flex-direction: column;
        align-items: stretch;
        gap: 9px;
    }

    .coupon-proxy-end {
        width: 100%;
        min-height: 42px;
        text-align: center;
    }

    /* 지역 첫 화면 */
    .coupon-home-topbar {
        padding: 13px 12px !important;
    }

    .coupon-home-topbar-inner {
        width: 100%;
        align-items: stretch !important;
        gap: 12px;
    }

    .coupon-home-brand h1 {
        font-size: 21px;
    }

    .coupon-home-user {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        gap: 8px !important;
    }

    .coupon-home-login-name {
        grid-column: 1 / -1;
    }

    .coupon-home-user .coupon-home-btn {
        width: 100%;
        min-height: 44px;
        padding: 9px 10px;
        text-align: center;
    }

    .coupon-home-wrap {
        width: 100%;
        padding: 16px 12px 34px !important;
    }

    .coupon-home-hero {
        padding: 28px 18px !important;
        border-radius: 18px !important;
    }

    .coupon-home-hero h2 {
        font-size: clamp(27px, 8vw, 34px) !important;
        line-height: 1.25;
    }

    .coupon-home-hero p {
        font-size: 15px;
        line-height: 1.6;
    }

    .coupon-home-actions {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr);
        gap: 8px !important;
    }

    .coupon-home-actions .coupon-home-btn {
        width: 100%;
        min-height: 46px;
        justify-content: center;
    }

    .coupon-home-category-bar {
        flex-wrap: nowrap !important;
        width: 100%;
        padding-bottom: 5px;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .coupon-home-category-bar::-webkit-scrollbar {
        display: none;
    }

    .coupon-home-category-btn {
        flex: 0 0 auto;
        min-height: 40px;
    }

    .coupon-home-carousel-btn {
        display: none;
    }

    .coupon-home-grid {
        gap: 11px;
        margin-right: -12px;
        padding-right: 12px;
    }

    .coupon-home-card.coupon-home-merchant-card {
        flex-basis: 88% !important;
        min-width: 270px !important;
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .coupon-mobile-menu-text {
        display: none;
    }

    .coupon-mobile-menu-toggle {
        min-width: 42px;
        width: 42px;
        padding: 5px;
    }

    .coupon-page-title {
        font-size: 12px;
    }

    .coupon-topbar-right {
        gap: 6px;
    }

    .coupon-top-link {
        padding: 6px 8px;
        font-size: 12px;
    }

    .coupon-content {
        padding: 9px;
    }

    .coupon-card,
    .coupon-policy-card,
    .coupon-stat-card {
        padding: 12px;
    }

    .coupon-table-wrap,
    .coupon-mobile-table-scroll {
        max-width: calc(100vw - 18px);
    }

    .coupon-admin-stat-grid,
    .coupon-status-summary-grid,
    .coupon-control-stat-grid,
    .coupon-overview-kpi-grid,
    .merchant-dashboard-stat-grid,
    .couponi-order-status-grid,
    .res-summary,
    .waiting-history-kpis,
    .waiting-kpi-grid,
    .coupon-summary-row,
    .register-summary-row,
    .item-channel-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .coupon-home-user {
        grid-template-columns: minmax(0, 1fr);
    }

    .coupon-home-card.coupon-home-merchant-card {
        flex-basis: 92% !important;
        min-width: 250px !important;
    }
}


/* ===== SOURCE: coupon_mobile_phase2.css ===== */
/*
 * 쿠포니 모바일 반응형 2차 보완
 * 대상: 가맹점 대시보드, 주문관리, 예약관리, 상품·메뉴·옵션 관리,
 *       고객 대시보드/내 예약 등 자주 사용하는 실무 화면
 * 원칙: PC 화면 유지, 모바일에서 터치·가독성·처리 버튼 배치 개선
 */

@media (max-width: 900px) {
    /* 공통: 상단 필터/탭은 한 줄 스크롤로 유지해 세로 공간 절약 */
    .coupon-mobile-chip-row,
    .couponi-order-tabs,
    .res-filter,
    .reservation-filter,
    .couponi-date-shortcuts {
        display: flex !important;
        flex-wrap: nowrap !important;
        width: 100%;
        max-width: 100%;
        gap: 7px !important;
        padding: 2px 0 7px;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .coupon-mobile-chip-row::-webkit-scrollbar,
    .couponi-order-tabs::-webkit-scrollbar,
    .res-filter::-webkit-scrollbar,
    .reservation-filter::-webkit-scrollbar,
    .couponi-date-shortcuts::-webkit-scrollbar {
        display: none;
    }

    .couponi-order-tabs > *,
    .res-filter > *,
    .reservation-filter > *,
    .couponi-date-shortcuts > * {
        flex: 0 0 auto !important;
        white-space: nowrap !important;
    }

    /* 가맹점 대시보드 */
    .merchant-dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }

    .merchant-dashboard-stat {
        min-width: 0;
        padding: 13px 11px !important;
        border-radius: 12px !important;
    }

    .merchant-dashboard-stat h3 {
        min-height: 34px;
        margin-bottom: 4px !important;
        font-size: 12px !important;
        line-height: 1.35;
        word-break: keep-all;
    }

    .merchant-dashboard-stat strong {
        font-size: 23px !important;
        line-height: 1.15;
    }

    .merchant-dashboard-actions,
    .coupon-summary-actions {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px !important;
    }

    .merchant-dashboard-actions .coupon-btn,
    .coupon-summary-actions .coupon-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-width: 0;
        min-height: 48px;
        margin: 0;
        padding: 9px 8px;
        text-align: center;
        line-height: 1.3;
        word-break: keep-all;
    }

    /* 주문관리 */
    .couponi-order-alert-box {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr);
        align-items: stretch !important;
        padding: 12px !important;
    }

    .couponi-order-alert-box > div {
        min-width: 0;
    }

    .couponi-order-alert-left {
        align-items: flex-start !important;
    }

    #couponiEnableSoundBtn {
        width: 100%;
        min-height: 46px;
    }

    .couponi-order-tabs {
        margin-bottom: 10px !important;
    }

    .couponi-order-tabs .coupon-btn {
        min-width: 92px;
        min-height: 42px;
    }

    .couponi-date-filter {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        align-items: end !important;
        gap: 8px !important;
    }

    .couponi-date-filter label,
    .couponi-date-filter input[type="datetime-local"] {
        width: 100%;
        min-width: 0;
    }

    .couponi-date-filter > .coupon-btn {
        grid-column: 1 / -1;
        width: 100%;
        min-height: 46px;
    }

    .couponi-order-sheet {
        min-width: 0;
        overflow: hidden;
        padding: 13px !important;
    }

    .couponi-order-sheet-head {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: start !important;
    }

    .couponi-order-sheet-title,
    .couponi-order-sheet-items,
    .couponi-order-sheet-memo {
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .couponi-order-sheet-title {
        font-size: 18px !important;
    }

    .couponi-order-sheet-total {
        font-size: 20px !important;
    }

    .couponi-order-sheet-bottom {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr);
        align-items: stretch !important;
        gap: 9px !important;
    }

    .couponi-order-actions {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr);
        align-items: stretch !important;
        justify-content: stretch !important;
        width: 100%;
    }

    .couponi-status-form,
    .couponi-order-actions form,
    .couponi-order-actions .coupon-btn,
    .couponi-order-actions .couponi-delete-btn {
        width: 100%;
        min-width: 0 !important;
    }

    .couponi-status-select {
        min-height: 46px !important;
        font-size: 16px;
    }

    .couponi-delete-btn {
        min-height: 44px !important;
    }

    .couponi-ip-row {
        align-items: flex-start !important;
    }

    /* 예약관리 */
    .res-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .res-stat {
        min-width: 0;
        padding: 12px 10px !important;
    }

    .res-stat strong {
        font-size: 22px !important;
    }

    .res-filter a,
    .reservation-filter a {
        min-height: 40px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .res-period-form {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: end !important;
        gap: 8px !important;
    }

    .res-period-form > div,
    .res-period-form input {
        width: 100%;
        min-width: 0;
    }

    .res-period-form > .coupon-btn {
        grid-column: 1 / -1;
        width: 100%;
    }

    .res-card {
        min-width: 0;
        padding: 14px !important;
    }

    .res-head {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: start !important;
    }

    .res-main > div,
    .reservation-meta > div {
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .res-actions {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr);
        align-items: stretch !important;
        gap: 8px !important;
    }

    .res-actions form {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: stretch !important;
        width: 100%;
        gap: 7px !important;
    }

    .res-actions form .coupon-btn:only-of-type {
        grid-column: 1 / -1;
    }

    .res-actions input:not([type="hidden"]),
    .res-actions button {
        width: 100%;
        max-width: none !important;
        min-width: 0;
    }

    .res-time-form {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        gap: 7px !important;
    }

    .res-time-form input,
    .res-time-form button {
        width: 100%;
        min-width: 0 !important;
    }

    .res-time-form input[type="text"],
    .res-time-form button {
        grid-column: 1 / -1;
    }

    #reservationUpdateNotice {
        align-items: stretch;
    }

    #reservationUpdateNotice .coupon-btn {
        width: 100%;
        margin-top: 8px;
    }

    /* 상품·메뉴 관리 */
    .item-grid {
        gap: 10px !important;
    }

    .item-channel-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 7px !important;
    }

    .item-channel,
    .option-channel {
        display: flex;
        align-items: center;
        gap: 7px;
        min-height: 46px;
        padding: 9px !important;
    }

    .item-card {
        padding: 12px !important;
        overflow: hidden;
    }

    .item-card-head {
        display: grid !important;
        grid-template-columns: 74px minmax(0, 1fr);
        gap: 10px !important;
    }

    .item-thumb {
        width: 74px !important;
        height: 74px !important;
    }

    .item-actions {
        grid-column: 1 / -1;
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100% !important;
        gap: 7px;
    }

    .item-actions .coupon-btn,
    .item-actions summary {
        width: 100%;
        min-width: 0;
        text-align: center;
    }

    .item-card details,
    .option-group-card details {
        width: 100%;
        max-width: 100%;
    }

    .item-card details form,
    .option-group-card details form {
        width: 100%;
        min-width: 0 !important;
        max-width: 100%;
    }

    /* 옵션 관리 */
    .option-group-card {
        min-width: 0;
        padding: 12px !important;
        overflow: hidden;
    }

    .option-group-title,
    .option-head {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr);
        gap: 9px;
    }

    .option-group-title .coupon-actions,
    .option-head .coupon-actions {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr);
        width: 100%;
        margin-top: 0 !important;
    }

    .option-row {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
        gap: 8px !important;
        width: 100%;
    }

    .option-row > label:first-of-type,
    .option-form-actions {
        grid-column: 1 / -1;
    }

    .option-form-actions {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: center;
        gap: 7px !important;
    }

    .option-form-actions .coupon-btn {
        width: 100%;
    }

    /* 고객 대시보드 / 내 예약 */
    .coupon-summary-actions,
    .reservation-actions {
        width: 100%;
    }

    .reservation-item {
        min-width: 0;
        padding: 13px !important;
    }

    .reservation-head {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px !important;
    }

    .reservation-store {
        font-size: 17px !important;
        overflow-wrap: anywhere;
    }

    .reservation-actions {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px !important;
    }

    .reservation-actions .reservation-btn,
    .reservation-actions form {
        width: 100%;
        min-width: 0;
        text-align: center;
    }

    .reservation-cancel-row {
        grid-column: 1 / -1;
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 7px !important;
        width: 100%;
        margin-top: 0 !important;
    }

    .reservation-cancel-row input,
    .reservation-cancel-row button {
        width: 100%;
        min-width: 0 !important;
        margin: 0 !important;
    }
}

@media (max-width: 560px) {
    .merchant-dashboard-actions,
    .coupon-summary-actions,
    .reservation-actions,
    .item-actions,
    .option-form-actions {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .couponi-date-filter,
    .res-period-form,
    .res-time-form,
    .option-row,
    .reservation-cancel-row {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .couponi-date-filter > *,
    .res-period-form > *,
    .res-time-form > *,
    .option-row > *,
    .reservation-cancel-row > * {
        grid-column: 1 !important;
    }

    .res-actions form {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .res-head,
    .reservation-head,
    .couponi-order-sheet-head {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .res-status,
    .reservation-status,
    .couponi-order-sheet-total {
        justify-self: start;
    }

    .item-card-head {
        grid-template-columns: 64px minmax(0, 1fr) !important;
    }

    .item-thumb {
        width: 64px !important;
        height: 64px !important;
    }

    .item-channel-grid,
    .option-channel-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}

@media (max-width: 900px) {
    .couponi-order-tabs .coupon-btn.active {
        border-color: #111827;
        background: #111827;
        color: #fff;
    }
}


/* ===== SOURCE: coupon_mobile_phase3.css ===== */
/*
 * 쿠포니 모바일 반응형 3차 보완
 * 대상: 가맹점 소개, 고객 쿠폰/할인권/내 예약, 대기표 관리/이력
 * 원칙: PC 유지, 모바일에서 정보 우선순위와 터치 조작 개선
 */

@media (max-width: 900px) {
    /* 고객·공개 화면 공통 */
    .market-store-page,
    .reservation-list,
    .coupon-wallet-compact-grid {
        min-width: 0;
    }

    .market-store-hero-info,
    .market-store-section,
    .coupon-wallet-compact-card,
    .reservation-item,
    .discount-card {
        min-width: 0;
        overflow: hidden;
    }

    .market-store-desc,
    .market-rich-text,
    .coupon-wallet-main,
    .coupon-wallet-meta,
    .reservation-meta,
    .discount-card,
    .discount-code-box {
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    /* 가맹점 소개 */
    .market-store-page {
        gap: 12px !important;
    }

    .market-store-hero-info,
    .market-store-section {
        padding: 16px !important;
        border-radius: 15px !important;
    }

    .market-store-hero-info h2 {
        margin-bottom: 8px !important;
        font-size: 23px !important;
    }

    .market-store-desc {
        line-height: 1.65 !important;
    }

    .market-store-photo,
    .market-store-photo-placeholder {
        min-height: 210px !important;
        border-radius: 15px !important;
    }

    .market-store-section-head {
        margin-bottom: 12px !important;
    }

    .market-store-section-head h2 {
        font-size: 20px !important;
    }

    .market-product-grid {
        gap: 10px !important;
    }

    .market-product-card,
    .market-benefit-card {
        border-radius: 14px !important;
    }

    .market-product-body,
    .market-benefit-card {
        padding: 14px !important;
    }

    .market-primary-actions {
        position: sticky;
        bottom: calc(8px + env(safe-area-inset-bottom));
        z-index: 30;
        padding: 8px;
        border: 1px solid #e5e7eb;
        border-radius: 14px;
        background: rgba(255, 255, 255, .96);
        box-shadow: 0 10px 28px rgba(15, 23, 42, .16);
        backdrop-filter: blur(8px);
    }

    .market-order-btn {
        min-height: 48px !important;
        font-size: 17px !important;
    }

    .market-map-card iframe {
        height: 220px !important;
    }

    /* 고객 대시보드 */
    .coupon-summary-card {
        padding: 13px !important;
    }

    .coupon-summary-row {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px !important;
    }

    .coupon-summary-item {
        min-width: 0;
        padding: 11px 8px !important;
        border-radius: 11px;
        text-align: center;
    }

    .coupon-summary-label {
        display: block;
        min-height: 32px;
        font-size: 12px !important;
        line-height: 1.35;
        word-break: keep-all;
    }

    .coupon-summary-count {
        font-size: 22px !important;
    }

    /* 쿠폰함 */
    .coupon-wallet-compact-card {
        padding: 13px !important;
    }

    .coupon-wallet-card-top {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr);
        gap: 8px !important;
    }

    .coupon-wallet-badges {
        gap: 5px !important;
    }

    .coupon-select-line {
        width: fit-content;
        max-width: 100%;
        min-height: 34px;
        white-space: normal !important;
    }

    .coupon-wallet-summary-row {
        align-items: center !important;
    }

    .coupon-wallet-compact-card h2 {
        font-size: 16px !important;
    }

    .coupon-wallet-actions {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: stretch !important;
        gap: 7px !important;
    }

    .coupon-wallet-actions > *,
    .coupon-wallet-actions .coupon-btn,
    .coupon-wallet-details,
    .coupon-wallet-details > summary {
        width: 100%;
        min-width: 0;
    }

    .coupon-wallet-actions .coupon-btn,
    .coupon-wallet-details > summary {
        min-height: 43px;
        display: flex !important;
        align-items: center;
        justify-content: center;
        padding: 8px !important;
        text-align: center;
    }

    .coupon-wallet-detail-panel {
        width: 100% !important;
        max-width: none !important;
        box-shadow: none !important;
    }

    /* 재방문 할인권 */
    .discount-card {
        padding: 14px !important;
    }

    .discount-code-box {
        padding: 10px !important;
        font-size: 14px;
    }

    .discount-use-actions,
    .discount-card .coupon-actions {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr);
        gap: 7px !important;
    }

    .discount-use-actions .coupon-btn,
    .discount-card .coupon-actions .coupon-btn {
        width: 100%;
        min-height: 44px;
        margin: 0;
    }

    /* 내 예약 */
    .reservation-item {
        padding: 13px !important;
    }

    .reservation-head {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: start !important;
    }

    .reservation-store {
        min-width: 0;
        font-size: 17px !important;
    }

    .reservation-status {
        margin-top: 0 !important;
        font-size: 12px !important;
    }

    .reservation-actions,
    .reservation-cancel-row {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        gap: 7px !important;
    }

    .reservation-actions > *,
    .reservation-actions .reservation-btn,
    .reservation-cancel-row input,
    .reservation-cancel-row button {
        width: 100%;
        min-width: 0 !important;
        margin: 0 !important;
    }

    .reservation-btn {
        min-height: 43px;
        display: flex !important;
        align-items: center;
        justify-content: center;
        padding: 8px !important;
        text-align: center;
    }

    .reservation-cancel-row {
        grid-template-columns: minmax(0, 1fr);
    }

    /* 대기표 관리 */
    .waiting-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }

    .waiting-kpi {
        min-width: 0;
        padding: 11px 9px !important;
        text-align: center;
    }

    .waiting-kpi h3 {
        min-height: 32px;
        font-size: 12px !important;
        line-height: 1.35;
        word-break: keep-all;
    }

    .waiting-kpi strong {
        font-size: 22px !important;
    }

    .section-title-row {
        align-items: stretch !important;
    }

    .section-title-row > * {
        min-width: 0;
    }

    .waiting-live-label {
        align-self: flex-start;
    }

    .waiting-actions {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        gap: 6px !important;
    }

    .waiting-actions form,
    .waiting-actions .coupon-btn,
    .waiting-actions button {
        width: 100%;
        min-width: 0;
        margin: 0 !important;
    }

    .waiting-actions .coupon-btn,
    .waiting-actions button {
        min-height: 40px;
        padding: 7px !important;
    }

    .waiting-setting-grid {
        gap: 9px !important;
    }

    .waiting-checks {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr);
        gap: 7px !important;
    }

    .waiting-checks label {
        min-height: 42px;
        padding: 8px 10px;
        border: 1px solid #e5e7eb;
        border-radius: 9px;
        background: #f8fafc;
    }

    .waiting-url {
        font-size: 12px !important;
    }

    /* 대기표 이력 */
    .waiting-history-head {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr);
        align-items: stretch !important;
    }

    .waiting-history-head .coupon-btn {
        width: 100%;
    }

    .waiting-history-filter {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }

    .waiting-history-filter .coupon-form-row,
    .waiting-history-filter input,
    .waiting-history-filter select {
        width: 100%;
        min-width: 0;
    }

    .waiting-history-filter > .coupon-btn {
        width: 100%;
        margin: 0;
    }

    .waiting-history-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }

    .waiting-history-kpi {
        min-width: 0;
        padding: 11px 8px !important;
        text-align: center;
    }

    .waiting-history-kpi h3 {
        min-height: 32px;
        font-size: 12px !important;
        word-break: keep-all;
    }

    .waiting-history-delete .coupon-btn {
        width: 100%;
        min-height: 45px;
    }

    /* 가로 표 안내를 조금 더 눈에 띄게 */
    .coupon-mobile-table-guide {
        display: block;
        margin: 2px 0 7px;
        color: #64748b;
        font-size: 12px;
        font-weight: 700;
        text-align: right;
    }
}

@media (max-width: 560px) {
    .coupon-summary-row,
    .coupon-wallet-actions,
    .reservation-actions,
    .waiting-actions,
    .waiting-history-filter {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .market-store-hero-info,
    .market-store-section,
    .coupon-wallet-compact-card,
    .reservation-item,
    .discount-card {
        padding: 12px !important;
    }

    .coupon-wallet-summary-row {
        align-items: flex-start !important;
    }

    .coupon-wallet-thumb-mini {
        width: 46px !important;
        height: 46px !important;
        flex-basis: 46px !important;
    }
}


/* ===== SOURCE: coupon_mobile_phase4.css ===== */
/*
 * 쿠포니 모바일 반응형 4차 보완
 * 대상: 긴 입력폼, 설정 화면, 파일 업로드, 체크 권한, 예약 운영시간, 모달
 * 원칙: PC 화면과 업무 로직을 유지하고 모바일 입력/저장 동선만 개선
 */

.coupon-mobile-save-dock {
    display: none;
}

.coupon-file-selected-name,
.coupon-mobile-copy-row,
.coupon-time-caption {
    display: none;
}

@media (max-width: 900px) {
    /* 입력폼 공통 */
    .coupon-content .coupon-form-row,
    .coupon-content .coupon-form-grid > label,
    .coupon-content .coupon-form-section label {
        min-width: 0;
    }

    .coupon-content .coupon-form-row > label:not(.coupon-check-label):not(.coupon-inline-check),
    .coupon-content .coupon-form-grid > label {
        display: grid;
        gap: 7px;
        color: #1f2937;
        font-size: 14px;
        line-height: 1.4;
    }

    .coupon-content input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
    .coupon-content select,
    .coupon-content textarea {
        width: 100% !important;
        min-width: 0 !important;
        border-color: #cbd5e1;
        border-radius: 11px;
        padding: 11px 12px;
        background: #fff;
        box-shadow: inset 0 1px 2px rgba(15, 23, 42, .025);
    }

    .coupon-content input:focus,
    .coupon-content select:focus,
    .coupon-content textarea:focus {
        border-color: #2563eb;
        outline: 3px solid rgba(37, 99, 235, .14);
        outline-offset: 0;
    }

    .coupon-content input:disabled,
    .coupon-content select:disabled,
    .coupon-content textarea:disabled {
        color: #64748b;
        background: #f1f5f9;
    }

    .coupon-content .coupon-help {
        margin-top: 7px;
        line-height: 1.55;
        overflow-wrap: anywhere;
    }

    /* 터치하기 쉬운 체크박스/권한 */
    .coupon-content .coupon-check-label,
    .coupon-content .waiting-checks label,
    .coupon-content .coupon-inline-check,
    .coupon-content .coupon-mobile-check-card {
        display: flex !important;
        align-items: flex-start !important;
        width: 100%;
        min-height: 44px;
        margin: 0 0 7px !important;
        padding: 10px 11px;
        gap: 9px !important;
        border: 1px solid #dbe3ee;
        border-radius: 11px;
        background: #f8fafc;
        font-size: 13px !important;
        line-height: 1.45;
        cursor: pointer;
    }

    .coupon-content .coupon-check-label input,
    .coupon-content .waiting-checks input,
    .coupon-content .coupon-inline-check input,
    .coupon-content .coupon-mobile-check-card input {
        flex: 0 0 auto;
        width: 20px !important;
        height: 20px !important;
        min-height: 20px !important;
        margin: 0;
        accent-color: #2563eb;
    }

    .coupon-content .coupon-staff-permission-form {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 5px !important;
        min-width: 250px;
    }

    .coupon-content .coupon-staff-permission-form .coupon-btn {
        width: 100%;
        margin-top: 4px;
    }

    /* 파일 업로드 */
    .coupon-content input[type="file"] {
        min-height: 52px !important;
        padding: 6px !important;
        border: 1px dashed #94a3b8 !important;
        background: #f8fafc !important;
        color: #475569;
    }

    .coupon-content input[type="file"]::file-selector-button {
        min-height: 38px;
        margin-right: 9px;
        padding: 8px 12px;
        border: 0;
        border-radius: 9px;
        background: #e2e8f0;
        color: #0f172a;
        font-weight: 800;
        cursor: pointer;
    }

    .coupon-file-selected-name {
        display: block;
        margin-top: 6px;
        padding: 8px 10px;
        border-radius: 9px;
        background: #eff6ff;
        color: #1d4ed8;
        font-size: 12px;
        line-height: 1.4;
        overflow-wrap: anywhere;
    }

    .coupon-image-preview {
        width: 100%;
        max-width: 420px !important;
        height: auto;
        max-height: 240px;
        object-fit: cover;
    }

    /* 자동 인식한 버튼 행 */
    .coupon-mobile-auto-actions,
    .coupon-content .coupon-page-actions,
    .coupon-content .coupon-form-actions {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        gap: 8px !important;
        align-items: stretch !important;
    }

    .coupon-mobile-auto-actions > .coupon-btn,
    .coupon-mobile-auto-actions > button,
    .coupon-content .coupon-page-actions > .coupon-btn,
    .coupon-content .coupon-form-actions > .coupon-btn,
    .coupon-content .coupon-form-actions > button {
        width: 100% !important;
        min-width: 0 !important;
        min-height: 45px;
        margin: 0 !important;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .coupon-content form.coupon-long-form > button[type="submit"].coupon-btn {
        width: 100%;
        min-height: 48px;
        margin-top: 12px;
        font-size: 16px;
    }

    /* 예약 설정의 시간 입력 */
    .coupon-content .res-days {
        gap: 9px !important;
    }

    .coupon-content .res-day {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 9px !important;
        padding: 11px !important;
        background: #fff;
    }

    .coupon-content .res-day > label {
        grid-column: 1 / -1;
        margin: 0 !important;
    }

    .coupon-time-field {
        display: grid;
        min-width: 0;
        gap: 5px;
    }

    .coupon-time-caption {
        display: block;
        color: #64748b;
        font-size: 11px;
        font-weight: 800;
    }

    .coupon-content .res-ex-row {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        align-items: stretch !important;
        gap: 7px !important;
        padding: 12px 0 !important;
    }

    .coupon-content .res-ex-row form,
    .coupon-content .res-ex-row .coupon-btn {
        width: 100%;
    }

    /* 공개주소 복사 */
    .coupon-content .res-url,
    .coupon-content .waiting-url {
        min-width: 0;
        overflow-wrap: anywhere;
        word-break: break-all;
    }

    .coupon-mobile-copy-row {
        display: flex;
        justify-content: flex-end;
        margin: 6px 0 10px;
    }

    .coupon-mobile-copy-row .coupon-btn {
        min-height: 38px;
        padding: 7px 11px;
        font-size: 12px;
    }

    /* 등급/옵션/관리 테이블은 내부에서만 좌우 이동 */
    .coupon-content .couponi-tier-table-wrap,
    .coupon-content .option-table-wrap,
    .coupon-content .coupon-table-wrap {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* 팝업/모달 */
    .coupon-modal-backdrop {
        padding: 12px !important;
        align-items: center !important;
        overflow-y: auto;
    }

    .coupon-modal-box,
    .coupon-content [role="dialog"] {
        width: 100% !important;
        max-width: 100% !important;
        max-height: calc(100dvh - 24px) !important;
        margin: auto !important;
        overflow-y: auto !important;
        border-radius: 15px !important;
    }

    .coupon-modal-head {
        position: sticky;
        top: 0;
        z-index: 2;
        padding: 13px !important;
        background: #fff;
        border-bottom: 1px solid #e5e7eb;
    }

    .coupon-modal-close {
        width: 42px !important;
        height: 42px !important;
        min-height: 42px !important;
    }

    /* 수정 중인 긴 폼 저장 바 */
    .coupon-mobile-save-dock {
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: calc(8px + env(safe-area-inset-bottom));
        z-index: 2147482500;
        align-items: center;
        gap: 8px;
        padding: 9px;
        border: 1px solid #cbd5e1;
        border-radius: 14px;
        background: rgba(255, 255, 255, .97);
        box-shadow: 0 14px 38px rgba(15, 23, 42, .24);
        backdrop-filter: blur(10px);
    }

    .coupon-mobile-save-dock.is-visible {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .coupon-mobile-save-dock-main {
        width: 100%;
        min-height: 47px;
        border: 0;
        border-radius: 11px;
        background: #111827;
        color: #fff;
        font-size: 15px;
        font-weight: 900;
        cursor: pointer;
    }

    .coupon-mobile-save-dock-close {
        width: 43px;
        min-width: 43px;
        height: 43px;
        border: 1px solid #d1d5db;
        border-radius: 11px;
        background: #fff;
        color: #475569;
        font-size: 20px;
        cursor: pointer;
    }

    body.coupon-mobile-save-dock-open {
        padding-bottom: calc(78px + env(safe-area-inset-bottom));
    }

    /* 검증 오류 위치를 쉽게 확인 */
    .coupon-mobile-invalid-field {
        animation: couponMobileInvalidPulse 1.2s ease;
    }

    @keyframes couponMobileInvalidPulse {
        0%, 100% { outline-color: rgba(220, 38, 38, .12); }
        50% { outline-color: rgba(220, 38, 38, .45); }
    }
}

@media (max-width: 560px) {
    .coupon-mobile-auto-actions,
    .coupon-content .coupon-page-actions,
    .coupon-content .coupon-form-actions {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .coupon-content .res-day {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .coupon-content .res-day > label {
        grid-column: auto;
    }
}


/* ===== SOURCE: coupon_mobile_phase5.css ===== */
/*
 * 쿠포니 모바일 반응형 5차 보완
 * 대상: 처음 사용자 안내, 페이지 도움말, 빈 화면, 처리중 표시, 맨 위로 이동
 * 원칙: 기존 업무 로직과 PC 화면은 유지하고 모바일 학습성과 피드백만 강화
 */

.coupon-mobile-help-toggle,
.coupon-mobile-help-panel,
.coupon-mobile-progress,
.coupon-mobile-backtop {
    display: none;
}

@media (max-width: 900px) {
    /* 제목 영역의 모바일 도움말 버튼 */
    .coupon-content-title-row {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 10px;
    }

    .coupon-content-title-row h1 {
        min-width: 0;
        margin: 0;
        overflow-wrap: anywhere;
    }

    .coupon-mobile-help-toggle {
        display: inline-flex;
        flex: 0 0 auto;
        align-items: center;
        justify-content: center;
        min-width: 72px;
        min-height: 40px;
        padding: 8px 11px;
        border: 1px solid #bfdbfe;
        border-radius: 999px;
        background: #eff6ff;
        color: #1d4ed8;
        font-size: 13px;
        font-weight: 800;
        line-height: 1;
        cursor: pointer;
    }

    .coupon-mobile-help-toggle::before {
        content: '?';
        display: inline-grid;
        place-items: center;
        width: 20px;
        height: 20px;
        margin-right: 6px;
        border-radius: 50%;
        background: #2563eb;
        color: #fff;
        font-size: 12px;
        font-weight: 900;
    }

    .coupon-mobile-help-toggle:focus-visible {
        outline: 3px solid rgba(37, 99, 235, .2);
        outline-offset: 2px;
    }

    /* 처음 사용자 안내 패널 */
    .coupon-mobile-help-panel {
        display: none;
        margin: 0 0 14px;
        padding: 15px;
        border: 1px solid #bfdbfe;
        border-radius: 16px;
        background: linear-gradient(180deg, #f8fbff 0%, #eff6ff 100%);
        box-shadow: 0 8px 22px rgba(37, 99, 235, .08);
    }

    .coupon-mobile-help-panel.is-open {
        display: block;
        animation: couponHelpIn .18s ease-out;
    }

    .coupon-mobile-help-panel-head {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
        margin-bottom: 11px;
    }

    .coupon-mobile-help-panel-title {
        margin: 0;
        color: #0f172a;
        font-size: 17px;
        font-weight: 900;
        line-height: 1.35;
    }

    .coupon-mobile-help-panel-subtitle {
        margin: 4px 0 0;
        color: #475569;
        font-size: 13px;
        line-height: 1.5;
    }

    .coupon-mobile-help-panel-close {
        flex: 0 0 auto;
        width: 34px;
        height: 34px;
        border: 0;
        border-radius: 50%;
        background: rgba(255, 255, 255, .88);
        color: #475569;
        font-size: 22px;
        line-height: 1;
        cursor: pointer;
    }

    .coupon-mobile-help-steps {
        display: grid;
        gap: 9px;
        margin: 0;
        padding: 0;
        list-style: none;
        counter-reset: couponHelpStep;
    }

    .coupon-mobile-help-steps li {
        position: relative;
        min-height: 42px;
        padding: 10px 10px 10px 46px;
        border: 1px solid rgba(148, 163, 184, .28);
        border-radius: 12px;
        background: rgba(255, 255, 255, .92);
        color: #334155;
        font-size: 14px;
        line-height: 1.5;
        overflow-wrap: anywhere;
        counter-increment: couponHelpStep;
    }

    .coupon-mobile-help-steps li::before {
        content: counter(couponHelpStep);
        position: absolute;
        top: 9px;
        left: 10px;
        display: grid;
        place-items: center;
        width: 26px;
        height: 26px;
        border-radius: 50%;
        background: #2563eb;
        color: #fff;
        font-size: 13px;
        font-weight: 900;
    }

    .coupon-mobile-help-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 8px;
        margin-top: 12px;
    }

    .coupon-mobile-help-action {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 42px;
        padding: 9px 11px;
        border: 1px solid #cbd5e1;
        border-radius: 11px;
        background: #fff;
        color: #334155;
        font-size: 13px;
        font-weight: 800;
        text-align: center;
        cursor: pointer;
    }

    .coupon-mobile-help-action.is-primary {
        border-color: #2563eb;
        background: #2563eb;
        color: #fff;
    }

    .coupon-mobile-help-action:only-child {
        grid-column: 1 / -1;
    }

    /* 비어 있는 목록과 카드의 식별성 개선 */
    .coupon-mobile-empty-state,
    td.coupon-mobile-empty-state,
    .coupon-empty-box.coupon-mobile-empty-state,
    .coupon-empty.coupon-mobile-empty-state {
        position: relative;
        padding: 24px 14px !important;
        color: #64748b !important;
        background: #f8fafc !important;
        text-align: center !important;
        line-height: 1.6;
        overflow-wrap: anywhere;
    }

    .coupon-mobile-empty-state::before {
        content: '✓';
        display: grid;
        place-items: center;
        width: 36px;
        height: 36px;
        margin: 0 auto 9px;
        border-radius: 50%;
        background: #e2e8f0;
        color: #64748b;
        font-size: 18px;
        font-weight: 900;
    }

    tr.coupon-mobile-empty-row > td {
        border-radius: 12px;
    }

    /* 폼 전송 중 중복 클릭 방지 안내 */
    .coupon-mobile-progress {
        position: fixed;
        top: max(10px, env(safe-area-inset-top));
        left: 50%;
        z-index: 2500;
        display: none;
        align-items: center;
        gap: 9px;
        width: max-content;
        max-width: calc(100vw - 28px);
        min-height: 44px;
        padding: 10px 14px;
        border: 1px solid rgba(15, 23, 42, .1);
        border-radius: 999px;
        background: rgba(15, 23, 42, .94);
        color: #fff;
        box-shadow: 0 10px 28px rgba(15, 23, 42, .24);
        font-size: 14px;
        font-weight: 800;
        transform: translateX(-50%);
    }

    .coupon-mobile-progress.is-visible {
        display: inline-flex;
    }

    .coupon-mobile-progress::before {
        content: '';
        width: 17px;
        height: 17px;
        border: 2px solid rgba(255, 255, 255, .35);
        border-top-color: #fff;
        border-radius: 50%;
        animation: couponMobileSpin .75s linear infinite;
    }

    form.coupon-mobile-is-submitting {
        cursor: wait;
    }

    form.coupon-mobile-is-submitting button[type="submit"],
    form.coupon-mobile-is-submitting input[type="submit"] {
        opacity: .72;
        pointer-events: none;
    }

    /* 맨 위로 버튼 */
    .coupon-mobile-backtop {
        position: fixed;
        right: 14px;
        bottom: calc(18px + env(safe-area-inset-bottom));
        z-index: 1050;
        display: grid;
        place-items: center;
        width: 46px;
        height: 46px;
        border: 1px solid #cbd5e1;
        border-radius: 50%;
        background: rgba(255, 255, 255, .96);
        color: #334155;
        box-shadow: 0 8px 22px rgba(15, 23, 42, .16);
        font-size: 21px;
        font-weight: 900;
        opacity: 0;
        visibility: hidden;
        transform: translateY(8px);
        transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
        cursor: pointer;
    }

    .coupon-mobile-backtop.is-visible {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    body.coupon-mobile-save-dock-open .coupon-mobile-backtop {
        bottom: calc(88px + env(safe-area-inset-bottom));
    }

    /* 안내 패널과 기존 카드가 붙지 않도록 여백 보완 */
    .coupon-mobile-help-panel + .coupon-card,
    .coupon-mobile-help-panel + form,
    .coupon-mobile-help-panel + .coupon-table-wrap,
    .coupon-mobile-help-panel + .coupon-mobile-table-scroll {
        margin-top: 0;
    }

    @keyframes couponHelpIn {
        from { opacity: 0; transform: translateY(-5px); }
        to { opacity: 1; transform: translateY(0); }
    }

    @keyframes couponMobileSpin {
        to { transform: rotate(360deg); }
    }
}

@media (max-width: 430px) {
    .coupon-mobile-help-actions {
        grid-template-columns: 1fr;
    }

    .coupon-mobile-help-toggle {
        min-width: 42px;
        padding-left: 9px;
        padding-right: 9px;
        font-size: 0;
    }

    .coupon-mobile-help-toggle::before {
        margin-right: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .coupon-mobile-help-panel,
    .coupon-mobile-progress::before,
    .coupon-mobile-backtop {
        animation: none !important;
        transition: none !important;
    }
}


/* ===== FINAL PHASE 6: stability, accessibility, safe areas ===== */
:root {
    --coupon-mobile-safe-top: env(safe-area-inset-top, 0px);
    --coupon-mobile-safe-right: env(safe-area-inset-right, 0px);
    --coupon-mobile-safe-bottom: env(safe-area-inset-bottom, 0px);
    --coupon-mobile-safe-left: env(safe-area-inset-left, 0px);
    --coupon-mobile-vh: 1vh;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    min-width: 0;
    overflow-x: hidden;
}

img,
svg,
video,
canvas,
iframe {
    max-width: 100%;
}

.coupon-content,
.coupon-content > *,
.coupon-card,
.coupon-grid,
.coupon-form-grid,
.coupon-layout,
.coupon-main {
    min-width: 0;
}

@media (max-width: 900px) {
    body {
        padding-left: var(--coupon-mobile-safe-left);
        padding-right: var(--coupon-mobile-safe-right);
    }

    button,
    [role="button"],
    input[type="button"],
    input[type="submit"],
    input[type="reset"],
    .coupon-btn,
    .coupon-side-link,
    .coupon-menu-summary {
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }

    button,
    input[type="button"],
    input[type="submit"],
    input[type="reset"],
    .coupon-btn {
        min-height: 44px;
    }

    input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
    select,
    textarea {
        max-width: 100%;
        font-size: max(16px, 1em);
        scroll-margin-top: 88px;
        scroll-margin-bottom: 35vh;
    }

    textarea {
        resize: vertical;
    }

    .coupon-mobile-topbar {
        padding-top: max(10px, var(--coupon-mobile-safe-top));
        padding-left: max(12px, var(--coupon-mobile-safe-left));
        padding-right: max(12px, var(--coupon-mobile-safe-right));
    }

    #coupon-sidebar,
    .coupon-sidebar {
        height: calc(var(--coupon-mobile-vh) * 100);
        max-height: 100dvh;
        padding-bottom: calc(18px + var(--coupon-mobile-safe-bottom));
        overscroll-behavior: contain;
    }

    body.coupon-mobile-nav-open {
        overflow: hidden;
        height: calc(var(--coupon-mobile-vh) * 100);
        touch-action: none;
    }

    .coupon-mobile-table-scroll,
    .coupon-table-wrap {
        position: relative;
        max-width: 100%;
        overscroll-behavior-x: contain;
        scrollbar-gutter: stable;
        scroll-behavior: smooth;
        box-shadow: inset -14px 0 12px -16px rgba(15, 23, 42, .55),
                    inset 14px 0 12px -16px rgba(15, 23, 42, .55);
    }

    .coupon-mobile-table-scroll.is-scroll-start,
    .coupon-table-wrap.is-scroll-start {
        box-shadow: inset -14px 0 12px -16px rgba(15, 23, 42, .55);
    }

    .coupon-mobile-table-scroll.is-scroll-end,
    .coupon-table-wrap.is-scroll-end {
        box-shadow: inset 14px 0 12px -16px rgba(15, 23, 42, .55);
    }

    .coupon-mobile-table-scroll.is-scroll-start.is-scroll-end,
    .coupon-table-wrap.is-scroll-start.is-scroll-end {
        box-shadow: none;
    }

    .coupon-mobile-save-dock,
    .coupon-mobile-bottom-action,
    .coupon-mobile-progress {
        padding-bottom: calc(10px + var(--coupon-mobile-safe-bottom));
    }

    .coupon-mobile-backtop {
        bottom: calc(18px + var(--coupon-mobile-safe-bottom));
        right: max(14px, var(--coupon-mobile-safe-right));
    }

    body.coupon-mobile-save-dock-open .coupon-mobile-backtop {
        bottom: calc(86px + var(--coupon-mobile-safe-bottom));
    }

    body.coupon-mobile-keyboard-open .coupon-mobile-save-dock,
    body.coupon-mobile-keyboard-open .coupon-mobile-backtop,
    body.coupon-mobile-keyboard-open .coupon-mobile-bottom-action {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }

    .coupon-modal,
    [role="dialog"],
    .modal-content,
    .popup-content {
        max-width: calc(100vw - 24px);
        max-height: calc((var(--coupon-mobile-vh) * 100) - 24px - var(--coupon-mobile-safe-top) - var(--coupon-mobile-safe-bottom));
        overflow: auto;
        overscroll-behavior: contain;
    }

    .coupon-content h1,
    .coupon-content h2,
    .coupon-content h3,
    .coupon-content p,
    .coupon-content td,
    .coupon-content th,
    .coupon-content label,
    .coupon-content a,
    .coupon-content button {
        overflow-wrap: anywhere;
        word-break: keep-all;
    }

    .coupon-content pre,
    .coupon-content code {
        overflow-wrap: normal;
        word-break: normal;
    }

    :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
        outline: 3px solid #2563eb;
        outline-offset: 2px;
    }

    .coupon-mobile-table-scroll:focus-visible,
    .coupon-table-wrap:focus-visible {
        outline-offset: -2px;
    }
}

@media (max-width: 900px) and (orientation: landscape) and (max-height: 560px) {
    .coupon-mobile-topbar {
        min-height: 48px;
        padding-top: 6px;
        padding-bottom: 6px;
    }

    #coupon-sidebar,
    .coupon-sidebar {
        padding-top: 8px;
    }

    .coupon-mobile-help-panel.is-open {
        max-height: calc((var(--coupon-mobile-vh) * 100) - 64px);
        overflow-y: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

@media (forced-colors: active) {
    :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
        outline: 2px solid CanvasText;
    }
}

@media print {
    .coupon-mobile-menu-toggle,
    .coupon-mobile-menu-close,
    .coupon-mobile-nav-overlay,
    .coupon-mobile-help-toggle,
    .coupon-mobile-help-panel,
    .coupon-mobile-save-dock,
    .coupon-mobile-backtop,
    .coupon-mobile-progress,
    .coupon-mobile-table-guide {
        display: none !important;
    }

    .coupon-mobile-table-scroll,
    .coupon-table-wrap {
        overflow: visible !important;
        box-shadow: none !important;
    }
}
