/* Cube simulator (Orange Theme) */
.cube-wrap { display:grid; grid-template-columns: 360px 1fr; gap:16px; align-items:start; }
@media (max-width: 980px){ .cube-wrap{ grid-template-columns:1fr; } }

.cube-card{ background:#fff; border:1px solid #e8edf5; border-radius:16px; padding:16px; }
.cube-title{ font-size:18px; font-weight:800; margin:0 0 10px 0; color:#1e293b; }

.cube-right-col { display:flex; flex-direction:column; height:100%; }

.cube-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 12px;
    margin-bottom: 12px;
}
.cube-cum-summary {
    font-size: 13px;
    color: #64748b;
    background: #f8fafc;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}
.cube-cum-summary .val { font-weight: 800; color: #0f172a; margin-left: 4px; }
.cube-cum-summary .sep { margin: 0 8px; color: #cbd5e1; }

.cube-tabs{ display:flex; gap:8px; }
.cube-tab{ flex:1; padding:10px 12px; border-radius:12px; border:1px solid #dbe4f0; background:#fff; font-weight:700; cursor:pointer; color:#64748b; }
/* [수정] 오렌지 테마 */
.cube-tab.is-active{ background:#ff7811; color:#fff; border-color:transparent; }

.cube-field{ margin-top:12px; }

.cube-label{ font-size:13px; font-weight:800; margin-bottom:6px; color:#475569; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.cube-input, .cube-select{ 
    width:100%; 
    height: 42px; 
    padding:0 12px; 
    line-height: 40px;
    border-radius:12px; 
    border:1px solid #dbe4f0; 
    box-sizing: border-box; 
    vertical-align: middle;
}
select.cube-select {
    padding-top: 10px;
    padding-bottom: 10px;
    line-height: 1.2;
}

.cube-row{ display:grid; grid-template-columns: 1fr 1fr; gap:10px; }

@media (max-width: 980px){ 
    .cube-row{ grid-template-columns:1fr; } 
    .cube-row.mobile-2col{ grid-template-columns: 1fr 1fr; }
}

.cube-btn{ width:100%; padding:12px 14px; border-radius:14px; border:1px solid #dbe4f0; background:#fff; font-weight:800; cursor:pointer; }
/* [수정] 오렌지 테마 */
.cube-btn.primary{ background:#ff7811; color:#fff; border-color:transparent; }
.cube-btn.primary:hover{ background:#f97316; }
.cube-btn.warn{ background:#fee2e2; border-color:#fed7aa; color:#ef4444; }
.cube-btn + .cube-btn{ margin-top:10px; }

.cube-btn:disabled {
    background: #e2e8f0;    
    color: #94a3b8;         
    border-color: #cbd5e1;  
    cursor: not-allowed;    
    opacity: 0.8;
}

.cube-lines{ display:grid; gap:8px; }
.cube-line{ display:flex; gap:10px; align-items:center; padding:10px 12px; border:1px solid #edf2f7; border-radius:12px; }
.cube-badge{ min-width:56px; text-align:center; padding:6px 10px; border-radius:999px; background:#f1f5f9; font-weight:800; font-size:12px; }
.cube-line-name{ font-weight:800; }

.cube-log-card { flex: 1; display:flex; flex-direction:column; min-height: 300px; }
.cube-log { 
    flex: 1; 
    overflow-y:auto; 
    border:1px solid #edf2f7; 
    border-radius:12px; 
    padding:10px; 
    background:#fff; 
    font-size:13px; 
    line-height:1.55; 
    white-space:pre-wrap; 
    max-height: 600px;
    color: #64748b;
}

.cube-small{ font-size:12px; color:#94a3b8; }

.cube-grade-wrap{ display:flex; gap:12px; align-items:center; flex-wrap:wrap; }
.cube-grade-badge{ padding:8px 12px; border-radius:12px; border:2px solid #e8edf5; font-weight:800; background:#fff; }
.cube-grade-badge.r-normal{ border-color:#9aa4b2; }
.cube-grade-badge.r-rare{ border-color:#3b82f6; }
.cube-grade-badge.r-epic{ border-color:#a855f7; }
.cube-grade-badge.r-unique{ border-color:#f59e0b; }
.cube-grade-badge.r-legendary{ border-color:#84cc16; }
.cube-grade-badge.r-mystic{ border-color:#e11d48; color:#e11d48; }

.cube-pity-wrap{ min-width: 220px; }
.cube-pity-text{ font-size:12px; color:#6b7280; margin-bottom:6px; font-weight:700; }
.cube-pity-bar{ height:8px; background:#eef2f7; border-radius:999px; overflow:hidden; }
.cube-pity-bar-fill{ height:100%; background:#111827; border-radius:999px; }

.cube-slot-list { display: flex; flex-direction: column; gap: 8px; border: 1px solid #e2e8f0; padding: 8px; border-radius: 12px; background: #f8fafc; }
.cube-slot-row { display: flex; align-items: center; background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px 12px; cursor: pointer; transition: all 0.2s; }
.cube-slot-row:hover { border-color: #cbd5e1; }
.cube-slot-row.on { border-color: #ff7811; background-color: #fff7ed; box-shadow: 0 0 0 1px #ff7811; }
.cube-slot-label { font-size: 13px; font-weight: 700; color: #64748b; width: 60px; }
.cube-slot-val { flex: 1; font-size: 14px; font-weight: 600; color: #0f172a; padding: 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cube-slot-del { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; border: none; background: #f1f5f9; color: #94a3b8; border-radius: 6px; cursor: pointer; font-size: 16px; line-height: 1; }
.cube-slot-del:hover { background: #e2e8f0; color: #64748b; }

.cube-list-container { border: 1px solid #dbe4f0; border-radius: 12px; background: #fff; overflow: hidden; display: flex; flex-direction: column; height: 300px; }
.cube-list-search-box { padding: 10px; border-bottom: 1px solid #edf2f7; background: #f8fafc; flex-shrink: 0; }
.cube-list-search-box input { width: 100%; padding: 8px 12px; border: 1px solid #dbe4f0; border-radius: 8px; font-size: 13px; box-sizing: border-box; }
.cube-list-scroll { flex: 1; overflow-y: auto; padding: 0; }
.cube-list-item { padding: 10px 14px; border-bottom: 1px solid #f1f5f9; font-size: 13px; cursor: pointer; transition: background 0.1s; font-weight: 500; color: #334155; display: flex; justify-content: space-between; align-items: center; }
.cube-list-item:hover { background-color: #f8fafc; }
.cube-list-item.selected { background-color: #fff7ed; color: #c2410c; font-weight: 700; }
.cube-list-item.selected::after { content: '✔'; font-size: 14px; }
.cube-list-empty { padding: 20px; text-align: center; color: #94a3b8; font-size: 13px; }

.cube-estimate-box { margin-top:10px; padding:12px; border-radius:10px; background:#f0f9ff; border:1px solid #bae6fd; font-size:13px; color:#0369a1; line-height:1.6; }
.cube-estimate-box.warn { background:#fef2f2; border-color:#fecaca; color:#b91c1c; }
.cube-est-row { display:flex; justify-content:space-between; align-items:center; }
.cube-est-row .l { font-weight: 600; opacity: 0.8; }
.cube-est-row .v { font-weight: 800; font-size:14px; }
.cube-est-warn { color:#ef4444; font-weight:700; font-size:12px; margin-left:6px; }