/* ==============================================================================
   Kolive Top Widget Bar Dedicated Stylesheet
   상단 생활 위젯 바 & 모달 전용 스타일 (Zero Inline Style)
============================================================================== */

.kol-top-widget-bar {
    background: #0f172a;
    border-bottom: 1px solid #1e293b;
    color: #e2e8f0;
    font-size: 12px;
    padding: 6px 0;
    position: relative;
    z-index: 1000;
}
.kol-widget-container {
    max-width: var(--container-width, 67.5rem);
    margin: 0 auto;
    padding: var(--container-padding, 0 1rem);
    display: flex;
    align-items: center;
    gap: 12px;
    box-sizing: border-box;
}
.kol-widget-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 700;
    color: #38bdf8;
    white-space: nowrap;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.kol-widget-scroll {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex: 1;
}
.kol-widget-scroll::-webkit-scrollbar { display: none; }
.kol-widget-chip {
    background: #1e293b;
    border: 1px solid #334155;
    color: #cbd5e1;
    padding: 4px 11px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}
.kol-widget-chip:hover {
    background: #2563eb;
    border-color: #3b82f6;
    color: #ffffff;
    transform: translateY(-1px);
}
.kol-widget-quick-info {
    white-space: nowrap;
    font-size: 11.5px;
    color: #94a3b8;
    cursor: pointer;
}
@media (max-width: 768px) {
    .kol-widget-quick-info { display: none; }
}

/* 모달 */
.kol-widget-modal-backdrop {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    z-index: 99998;
}
.kol-widget-modal {
    display: none;
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 92%;
    max-width: 600px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    z-index: 99999;
    overflow: hidden;
    color: #1e293b;
    font-family: inherit;
    animation: kolModalFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes kolModalFadeIn {
    from { opacity: 0; transform: translate(-50%, -46%) scale(0.96); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.kol-widget-modal-head {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 14px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.kol-widget-modal-head h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}
.kol-widget-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #64748b;
    line-height: 1;
    transition: color 0.15s;
}
.kol-widget-modal-close:hover { color: #0f172a; }
.kol-widget-modal-body {
    padding: 22px;
    max-height: 78vh;
    overflow-y: auto;
}

/* 토스트 알림 */
.kol-widget-toast {
    display: none;
    background: #22c55e;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    padding: 8px;
    animation: kolToastFadeIn 0.2s;
}
@keyframes kolToastFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 로또 볼 */
.kol-lotto-ball {
    display: inline-flex;
    width: 36px; height: 36px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    color: #ffffff;
    box-shadow: 0 3px 6px rgba(0,0,0,0.18);
    margin: 2px;
}
.kol-ball-y { background: radial-gradient(circle at 30% 30%, #fbbf24, #d97706); }
.kol-ball-b { background: radial-gradient(circle at 30% 30%, #60a5fa, #2563eb); }
.kol-ball-r { background: radial-gradient(circle at 30% 30%, #f87171, #dc2626); }
.kol-ball-g { background: radial-gradient(circle at 30% 30%, #34d399, #059669); }
.kol-ball-p { background: radial-gradient(circle at 30% 30%, #a78bfa, #7c3aed); }

.kol-tab-group {
    display: flex;
    gap: 6px;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 16px;
    padding-bottom: 2px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.kol-tab-group::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}
.kol-tab-btn {
    background: none;
    border: none;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    border-radius: 6px 6px 0 0;
    white-space: nowrap;
    transition: all 0.15s;
}
.kol-tab-btn.active {
    color: #2563eb;
    border-bottom: 2px solid #2563eb;
    margin-bottom: -4px;
}
.kol-tab-btn:hover:not(.active) { color: #1e293b; background: #f1f5f9; }

/* 공통 위젯 모달 요소 (Zero Inline Style) */
.kol-widget-loading {
    text-align: center;
    padding: 40px 0;
}
.kol-widget-loading-text {
    margin-top: 10px;
    font-size: 13px;
    color: #64748b;
}

/* 로또 공인 당첨 결과 카드 */
.kol-lotto-official-card {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-radius: 14px;
    padding: 18px 20px;
    color: #ffffff;
    margin-bottom: 20px;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.3);
}
.kol-lotto-official-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding-bottom: 10px;
}
.kol-lotto-official-title {
    font-size: 15px;
    font-weight: 800;
    color: #38bdf8;
    display: flex;
    align-items: center;
    gap: 8px;
}
.kol-lotto-official-date {
    font-size: 12px;
    color: #94a3b8;
}
.kol-lotto-official-balls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.kol-lotto-plus-sign {
    font-size: 18px;
    font-weight: 900;
    color: #cbd5e1;
    margin: 0 4px;
}
.kol-lotto-bonus-label {
    font-size: 11px;
    color: #38bdf8;
    font-weight: 700;
    margin-left: 2px;
}
.kol-lotto-official-prize {
    display: flex;
    justify-content: space-around;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 10px;
    text-align: center;
}
.kol-lotto-prize-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.kol-lotto-prize-lbl {
    font-size: 11px;
    color: #94a3b8;
}
.kol-lotto-prize-val {
    font-size: 14px;
    font-weight: 800;
    color: #facc15;
}

/* 로또 추첨기 섹션 */
.kol-lotto-draw-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 18px;
    text-align: center;
}
.kol-lotto-draw-toolbar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}
.kol-lotto-draw-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
    background: #ffffff;
    padding: 8px;
    border-radius: 10px;
    border: 1px solid #f1f5f9;
}
.kol-lotto-row-label {
    font-weight: 900;
    color: #64748b;
    font-size: 13px;
    width: 24px;
}
.kol-lotto-btn-group {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
}

/* 주식/금융 리스트 요소 */
.kol-stock-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.15s;
}
.kol-stock-card:hover {
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
.kol-stock-info {
    flex: 1;
}
.kol-stock-name {
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
}
.kol-stock-code {
    font-size: 11px;
    color: #64748b;
}
.kol-stock-chart-wrap {
    width: 110px;
    height: 36px;
    margin: 0 10px;
}
.kol-stock-chart-wrap canvas {
    width: 100%;
    height: 100%;
    display: block;
}
.kol-stock-facts {
    font-size: 10.5px;
    color: #64748b;
    margin-left: 5px;
}
.kol-stock-value {
    text-align: right;
}
.kol-stock-price {
    font-size: 15px;
    font-weight: 900;
    color: #0f172a;
}
.kol-stock-diff {
    font-size: 11.5px;
    font-weight: 700;
}
.kol-stock-up { color: #ef4444; }
.kol-stock-down { color: #3b82f6; }

/* 국내 대표 증시 지수 (코스피 / 코스닥) 카드 */
.kol-market-indices {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
}
.kol-index-card {
    background: #0f172a;
    color: #ffffff;
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}
.kol-index-title {
    font-size: 13px;
    font-weight: 800;
    color: #94a3b8;
}
.kol-index-status {
    font-size: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #38bdf8;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
}
.kol-index-val {
    font-size: 20px;
    font-weight: 900;
    margin-top: 2px;
    color: #ffffff;
}
.kol-index-diff {
    font-size: 12px;
    font-weight: 800;
    text-align: right;
}

/* 동남아 주요 통화 환율 & 양방향 계산기 */
.kol-sea-fx-section {
    margin-top: 18px;
    border-top: 1px solid #e2e8f0;
    padding-top: 16px;
}
.kol-sea-fx-title {
    font-size: 13.5px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.kol-sea-fx-badge {
    font-size: 11px;
    font-weight: 600;
    background: #eff6ff;
    color: #2563eb;
    padding: 3px 8px;
    border-radius: 12px;
}
.kol-sea-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}
@media (max-width: 600px) {
    .kol-sea-grid { grid-template-columns: repeat(2, 1fr); }
}
.kol-sea-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 12px;
    text-align: center;
    transition: all 0.15s;
    cursor: pointer;
}
.kol-sea-card:hover, .kol-sea-card.active {
    background: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.12);
}
.kol-sea-name {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
}
.kol-sea-rate {
    font-size: 14.5px;
    font-weight: 900;
    color: #0f172a;
    margin: 4px 0 2px;
}
.kol-sea-sub {
    font-size: 10.5px;
    color: #2563eb;
    font-weight: 700;
}

/* 원 ↔ 동남아 화폐 실시간 간편 계산기 */
.kol-sea-calc-box {
    background: #f1f5f9;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 12px;
}
.kol-sea-calc-head {
    font-size: 12px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
}
.kol-sea-calc-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}
.kol-sea-calc-input {
    flex: 1;
    height: 38px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 0 10px;
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    background: #ffffff;
}
.kol-sea-calc-select {
    height: 38px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 0 8px;
    font-size: 12px;
    font-weight: 700;
    color: #1e293b;
    background: #ffffff;
}
.kol-sea-calc-result {
    margin-top: 10px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.kol-sea-calc-res-label {
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
}
.kol-sea-calc-res-val {
    font-size: 16px;
    font-weight: 900;
    color: #2563eb;
}

/* 주간 날씨 그리드 */
.kol-weather-weekly-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    text-align: center;
}
.kol-weather-weekly-item {
    background: #f8fafc;
    padding: 8px 4px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    box-sizing: border-box;
}

/* 단위변환 그리드 & 폼 */
.kol-unit-box {
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}
.kol-unit-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}
.kol-unit-title {
    font-size: 13px;
    font-weight: 700;
    color: #334155;
}
.kol-unit-swap-btn {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 6px;
}
.kol-unit-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 12px;
    align-items: center;
}
.kol-unit-select {
    width: 100%;
    margin-bottom: 8px;
    font-weight: 700;
    height: 38px;
}
.kol-unit-input {
    width: 100%;
    font-size: 18px;
    font-weight: 800;
    padding: 10px;
    box-sizing: border-box;
}
.kol-unit-equal {
    font-size: 24px;
    font-weight: 900;
    color: #94a3b8;
    text-align: center;
}
.kol-unit-content {
    padding: 10px 0;
}

/* ==============================================================================
   오늘의 운세 위젯 스타일
============================================================================== */
.kol-fortune-banner {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.kol-fortune-banner-sub {
    font-size: 12px;
    font-weight: 700;
    color: #1e40af;
}
.kol-fortune-banner-title {
    font-size: 13.5px;
    font-weight: 800;
    color: #0f172a;
}
.kol-fortune-banner-badge {
    background: #2563eb;
    color: #ffffff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
}
.kol-fortune-picker-wrap {
    margin-bottom: 14px;
}
.kol-fortune-picker-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
}
@media (max-width: 480px) {
    .kol-fortune-picker-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
.kol-fortune-btn {
    padding: 7px 2px;
    font-size: 11.5px;
    font-weight: 700;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #334155;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
}
.kol-fortune-btn:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}
.kol-fortune-btn.active {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}
.kol-fortune-card {
    background: #fefce8;
    border: 1px solid #fef08a;
    padding: 18px;
    border-radius: 12px;
    margin-bottom: 14px;
}
.kol-fortune-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 6px;
}
.kol-fortune-card-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}
.kol-fortune-card-title {
    font-size: 15px;
    font-weight: 900;
    color: #854d0e;
}
.kol-fortune-card-badge {
    background: #e0f2fe;
    color: #0369a1;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
}
.kol-fortune-card-score {
    font-size: 13px;
    font-weight: 800;
    color: #ca8a04;
}
.kol-fortune-sipsin {
    font-size: 12px;
    font-weight: 800;
    color: #0284c7;
    margin-bottom: 6px;
}
.kol-fortune-card-desc {
    font-size: 13px;
    color: #713f12;
    line-height: 1.65;
    margin: 0;
}
.kol-fortune-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    text-align: center;
    font-size: 12px;
}
.kol-fortune-stat-box {
    background: #f8fafc;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}
.kol-fortune-stat-label {
    color: #64748b;
    font-size: 11px;
}
.kol-fortune-stat-val {
    font-weight: 800;
    color: #0f172a;
    margin-top: 2px;
}
.kol-fortune-footer {
    margin-top: 10px;
    text-align: right;
    font-size: 11px;
    color: #94a3b8;
}
.kol-fortune-input-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 14px;
}
.kol-fortune-input-title {
    font-size: 13px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 8px;
}
.kol-fortune-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
}
.kol-fortune-input-field {
    flex: 1;
    height: 38px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 0 10px;
    font-size: 13px;
    background: #ffffff;
}

/* ==============================================================================
   주요 환율 & 귀금속 스타일
============================================================================== */
.kol-finance-section-title {
    font-size: 13px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 10px;
}
.kol-finance-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 18px;
}
@media (max-width: 480px) {
    .kol-finance-grid-2 {
        grid-template-columns: 1fr;
    }
}
.kol-finance-card {
    background: #f8fafc;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}
.kol-finance-card-name {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
}
.kol-finance-card-price {
    font-size: 17px;
    font-weight: 900;
    color: #0f172a;
    margin-top: 2px;
}
.kol-finance-card-diff {
    font-size: 11px;
    font-weight: 700;
    margin-top: 2px;
}
.kol-diff-up {
    color: #ef4444;
}
.kol-diff-down {
    color: #3b82f6;
}
.kol-finance-footer {
    margin-top: 14px;
    font-size: 10.5px;
    color: #94a3b8;
    text-align: right;
}

/* ==============================================================================
   상단 위젯바 맞춤 편집 모달 스타일
============================================================================== */
.kol-custom-edit-wrap {
    padding: 4px 0;
}
.kol-custom-edit-desc {
    font-size: 12.5px;
    color: #64748b;
    margin-bottom: 14px;
}
.kol-custom-edit-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.kol-custom-edit-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.15s ease;
}
.kol-custom-edit-item:hover {
    background: #f1f5f9;
}
.kol-custom-edit-item.active {
    background: #eff6ff;
    border-color: #3b82f6;
}
.kol-custom-edit-left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.kol-custom-edit-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}
.kol-custom-edit-title {
    font-size: 13.5px;
    font-weight: 800;
    color: #0f172a;
}
.kol-custom-edit-sub {
    font-size: 11px;
    color: #64748b;
}
.kol-custom-edit-right {
    display: flex;
    align-items: center;
    gap: 10px;
}
.kol-custom-order-btns {
    display: flex;
    gap: 4px;
}
.kol-custom-order-btn {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #475569;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    padding: 0;
}
.kol-custom-order-btn:hover {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}
.kol-custom-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #2563eb;
}
.kol-custom-edit-submit {
    margin-top: 20px;
    text-align: center;
}
.kol-custom-submit-btn {
    padding: 10px 28px;
    font-weight: 800;
    font-size: 14px;
    border-radius: 8px;
}

/* ==============================================================================
   Mobile & Responsive Enhancements (360px ~ 768px)
============================================================================== */
@media (max-width: 640px) {
    .kol-widget-modal {
        width: 95%;
        max-width: 95%;
        border-radius: 14px;
    }
    .kol-widget-modal-head {
        padding: 12px 16px;
    }
    .kol-widget-modal-head h3 {
        font-size: 14.5px;
    }
    .kol-widget-modal-body {
        padding: 14px 12px;
        max-height: 82vh;
    }
    .kol-stock-chart-wrap {
        width: 80px;
        height: 32px;
        margin: 0 6px;
    }
    .kol-stock-name {
        font-size: 13px;
    }
    .kol-stock-price {
        font-size: 13.5px;
    }
    .kol-stock-facts {
        display: none;
    }
    .kol-weather-weekly-grid {
        display: flex;
        overflow-x: auto;
        gap: 6px;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }
    .kol-weather-weekly-item {
        min-width: 58px;
        flex: 0 0 58px;
    }
    .kol-lotto-official-balls {
        gap: 4px;
    }
    .kol-lotto-ball {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }
    .kol-tab-btn {
        padding: 7px 10px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .kol-top-widget-bar {
        padding: 4px 0;
    }
    .kol-widget-container {
        gap: 8px;
        padding: 0 10px;
    }
    .kol-widget-scroll {
        -webkit-overflow-scrolling: touch;
        touch-action: pan-x;
        padding-right: 8px;
    }
    .kol-widget-chip {
        padding: 3px 9px;
        font-size: 11.5px;
    }
    .kol-widget-modal {
        width: 95%;
        max-width: calc(100vw - 16px);
        border-radius: 14px;
    }
    .kol-widget-modal-head {
        padding: 12px 16px;
    }
    .kol-widget-modal-head h3 {
        font-size: 14.5px;
    }
    .kol-widget-modal-body {
        padding: 16px 14px;
        max-height: 82vh;
        max-height: calc(85dvh - env(safe-area-inset-bottom, 0px));
        padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    }
    .kol-custom-edit-item {
        padding: 8px 10px;
        gap: 8px;
    }
    .kol-custom-name {
        font-size: 13px;
    }
    .kol-custom-desc {
        font-size: 10.5px;
    }
    .kol-market-indices {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    .kol-sea-grid {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }
    .kol-sea-card {
        padding: 8px 6px;
    }
    .kol-sea-rate {
        font-size: 13px;
    }
    .kol-sea-calc-inputs {
        flex-direction: column;
        align-items: stretch;
    }
    .kol-sea-calc-select {
        width: 100%;
    }
    .kol-unit-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .kol-unit-equal {
        transform: rotate(90deg);
        margin: -4px 0;
    }
}

/* 상단 위젯바 모달 내 맞춤 편집 */
.kol-custom-edit-container {
    padding: 4px 0;
}
.kol-custom-edit-guide {
    font-size: 12.5px;
    color: #64748b;
    margin-bottom: 14px;
    line-height: 1.5;
}
.kol-custom-edit-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.kol-custom-edit-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    transition: all 0.15s ease;
    gap: 10px;
}
.kol-custom-edit-item.active {
    background: #f0f7ff;
    border-color: #93c5fd;
}
.kol-custom-order-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.kol-custom-order-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: #e2e8f0;
    color: #475569;
    font-size: 11px;
    font-weight: 800;
}
.kol-custom-edit-item.active .kol-custom-order-badge {
    background: #2563eb;
    color: #ffffff;
}
.kol-custom-order-btns {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.kol-custom-order-btn {
    width: 20px;
    height: 16px;
    border-radius: 3px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #64748b;
    font-size: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: all 0.15s ease;
}
.kol-custom-order-btn:hover {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}
.kol-custom-info-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
    cursor: pointer;
}
.kol-custom-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}
.kol-custom-text-wrap {
    min-width: 0;
}
.kol-custom-name {
    font-size: 13.5px;
    font-weight: 800;
    color: #0f172a;
}
.kol-custom-desc {
    font-size: 11px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.kol-custom-check-wrap {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}
.kol-custom-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #2563eb;
}
.kol-custom-action-wrap {
    margin-top: 20px;
    text-align: center;
}
.kol-custom-submit-btn {
    padding: 10px 28px;
    font-weight: 800;
    font-size: 14px;
    border-radius: 8px;
    background: #2563eb;
    color: #ffffff;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
}
.kol-custom-submit-btn:hover {
    background: #1d4ed8;
}
.kol-widget-chip-setting {
    border-style: dashed;
    border-color: #475569;
    color: #94a3b8;
    background: transparent;
}
.kol-widget-chip-setting:hover {
    background: #1e293b;
    border-color: #64748b;
    color: #e2e8f0;
}
.kol-custom-mypage-link-wrap {
    margin-top: 14px;
    text-align: center;
}
.kol-custom-mypage-link {
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    text-decoration: underline;
    transition: color 0.15s ease;
}
.kol-custom-mypage-link:hover {
    color: #2563eb;
}




